4.5. The process data structure

The operating system must handle many processes and will maintain a data structure holding their descriptors. This could be set up in a number of ways. The aim is that the operating system should be able to choose and run the highest-priority process as quickly as possible. Selecting a process to run on a processor is called process scheduling. The selection policy determines which process will be selected and is effected by the scheduling algorithm. Setting up a process state in the processor's registers is called dispatching. Figure 4.7 shows one possible data structure: an array or table of process descriptors; many alternatives are possible.

Figure 4.7. A possible process structure.

Get Operating Systems: Concurrent and Distributed Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.