Open VMS Operating System Concepts, Second Edition

Chapter 4 showed how the paging hardware keeps processes from interfering with one another. The very feature that empowers a multiprogramming system also protects a process from accidental interference by other processes and ensures privacy as a result. However, this advantage also poses a problem: how do processes communicate? Communication is a necessary and reasonable thing to want to do, but achieving it shouldn't mean the advantages of paging must be given up.
The topic of process communication is broken into two parts, synchronization and data sharing. The first is covered in this chapter, the second in Chapter 6. Normally, to synchronize means to coordinate the actions of several independent units, such as synchronized swimmers or watches. The implication is that these units do exactly the same thing at exactly the same time-there is spatial and temporal duplication. But when applied to software, synchronize means the operation of one process affects or controls the operation of another.
There are a number of synchronization methods available to the application designer, and the specific method chosen depends on trade-offs.
Figure 5.1 presents a synopsis of three methods commonly implemented on operating systems.
The first method of process synchronization, called hibernate-wake, is implemented in the OpenVMS operating system by two system services, $HIBER and $WAKE. $HIBER was introduced in conjunction with TIMER in Chapter 3. That example used $SCHDWK to set a timer, which created a "wakeup call," and then it executed $HIBER to block the process. Instead of...