Open VMS Operating System Concepts, Second Edition

Previous chapters briefly mentioned processes co-residing in memory or multiprogramming. This chapter will describe how this is done. A rule of thumb is that a time-sharing user consumes only one second of CPU time for every minute he or she is connected to the computer-in other words, one user uses one-sixtieth of the computer's resource. In Chapter 3 we justified sharing CPU by showing that a single process does not use all parts of the computer system all the time. Sharing computer resources is an economic necessity. Therefore, to optimize the total resource, the time-sharing operating system must switch from one process to another, executing a portion of each process at every switch. However, the process switching time must be fast so that the overhead incurred does not outweigh the sharing benefit. In the early 1960s, system designers realized that to minimize this context switch time, the set of executing processes must be resident in memory, which implies that the processes must co-reside in some fashion.
The most obvious approach to multiprogramming is simply to assign physical memory to each process as it logs in; this is called contiguous allocation. But this solution has many drawbacks. The first drawback is determining the size of the allocation because the amount of memory space a process might need cannot be determined at login. One solution is to equate a process to an image. For example, in OpenVMS terms, C, LINK, and RUN could be considered separate processes and allocated...