We are now about to start a detailed stu`dy of how operating systems are designed and created. The most essential concept in any operating system is the process: an abstraction of a running program. Everything else depends on this concept, and it is important that the operating system designer (and student) have a thorough understanding of what a process is as early as possible.

Processes are one of the oldest and most important abstractions that operating systems provide. They support the ability to have (pseudo) simultaneous operation even when there is only one CPU available. They turn a single CPU into multiple virtual CPUs. Without the process abstraction, modern computing could not exist. In this section we will go into extensive detail about processes and their first cousins, threads.


All latest computers frequently do various things at the same time. People used to working with personal computers may not be fully aware of this fact, so a few examples may make the point clearer. First examine a Web server. Requests come in from all over asking for Web pages. When a request comes in, the server checks to see if the page needed is in the cache. If it is, it is sent back; if it is not, a disk request is started to fetch it. However, from the CPU's point of view, disk requests take a very long time. While waiting for the disk request to complete, many more requests may come in. If there are multiple disks present, some or all of them may be fired off to other disks long before the first request is satisfied. Obviously some way is required to model and control this concurrency. Processes (and especially threads) can help here.

Now examine a user PC. When the system is booted, many processes are secretly started, often unknown to the user. For instance, a process may be started up to wait for incoming e-mail. Another process may run on behalf of the antivirus program to check from time to time if any new virus definitions are available. In addition, explicit user processes may be running, printing files and burning a CDROM, all while the user is surfing the Web. All this activity has to be managed, and a multiprogramming system supporting multiple processes comes in very useful here.

In any multiprogramming system, the CPU switches from process to process quickly, running each for tens or hundreds of milliseconds. While, strictly speaking, at any instant of time, the CPU is running only one process, in the course of 1 second, it may work on several of them, giving the false impression of parallelism. Sometimes people speak of pseudoparallelism in this perspective, to compare it with the true hardware parallelism of multiprocessor systems (which have two or more CPUs sharing the same physical memory). Keeping track of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have developed a conceptual model (sequential processes) that makes parallelism easier to handle. That model, its uses, and some of its consequences form the subject of this section.


process, multiprogramming, multiprocessor systems