O'Reilly logo

Operating Systems in Depth by Thomas W. Doeppner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Basic Concepts

  • 3.1 Context Switching

    • 3.1.1 Procedures

      • 3.1.1.1 Intel x86 Stack Frames

      • 3.1.1.2 SPARC Stack Frames

    • 3.1.2 Threads and Coroutines

    • 3.1.3 System Calls

    • 3.1.4 Interrupts

  • 3.2 Input/Output Architectures

  • 3.3 Dynamic Storage Allocation

    • 3.3.1 Best-Fit and First-Fit Algorithms

    • 3.3.2 Buddy System

    • 3.3.3 Slab Allocation

  • 3.4 Linking and Loading

    • 3.4.1 Static Linking and Loading

    • 3.4.2 Shared Libraries

  • 3.5 Booting

  • 3.6 Conclusions

  • 3.7 Exercises

  • 3.8 References

This chapter covers a number of basic concepts that, though not unique to operating systems, are essential for much of what comes later. We start with the architectural issues involved in context switching: subroutine, thread, user/privileged, and normal/interrupt-mode switching. We then discuss some other architectural issues: memory caches and basic I/O architecture. Finally, we briefly go over the software concepts of dynamic storage allocation and of program linking and loading.

CONTEXT SWITCHING

We use the somewhat nebulous term "context" to mean the setting in which execution is currently taking place. This setting determines what information, in the form of storage contents, is available. For example, when a thread is executing within a procedure, it has available to it the procedure's local variables as well as all its process's global variables. When a thread has invoked a method of some object, then not only are local and global variables available, but so are instance variables. When a thread makes a system call, the processor switches ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required