Summary

Linux is a multiuser and multitasking operating system, and thus has to manage multiple processes from multiple users. In this chapter, you have learned that processes are a very important and fundamental abstraction of Linux. The data structure used to represent individual processes has connections with nearly every subsystem of the kernel.

You have seen how Linux implements the traditional fork/exec model inherited from Unix to create new processes that are hierarchically related to their parent, and have also been introduced to Linux-specific extensions to the traditional Unix model in the form of namespaces and the clone system call. Both allow for fine-tuning how a process perceives the system, and which resources are shared between parent and child processes. Explicit methods that enable otherwise separated processes to communicate are discussed in Chapter 5.

Additionally, you have seen how the available computational resources are distributed between processes by the scheduler. Linux supports pluggable scheduling modules, and these are used to implement completely fair and POSIX soft real-time scheduling policies. The scheduler decides when to switch between which tasks, and is augmented by architecture-specific routines to implement the context switching proper.

Finally, I have discussed how the scheduler must be augmented to service systems with multiple CPUs, and how kernel preemption and low-latency modifications make Linux handle time-constrained situations better.

35Actually, TASK_KILLABLE is not a completely new task state, but an extension to TASK_UNINTERRUPTIBLE. The effect is, however, identical.

Continue reading here: Overview

Was this article helpful?

0 0