Open VMS Operating System Concepts, Second Edition

This chapter investigates paging thoroughly. In particular, shows how OpenVMS and VAX work together to solve paging problems. In addition to showing how the operating system implements paging, the chapter will make observations about process performance in a paged, multiprogramming environment.
Paging is one of the most clever advances in the history of computer hardware and software. It is an artifact supported by hardware made expressly for the benefit of software, in particular, for time-sharing systems. Unlike many other hardware advances, which are made simply because the technology improved, paging directly benefits software applications. It adds a level of complexity to the hardware that would never be allowed if hardware designers had their way.
Consider the following example of paging. An OpenVMS user has logged on; hence, a process has been created. The user enters a RUN command to activate an image. (Refer to Figure 2.12 yfor the DCL command cycle.) As discussed in Chapter 2, image activation consists of reading the specified .EXE file from disk into memory in order to execute it. But, and this is very important to understand, the entire file is not read into memory at the time the RUN command is entered. In fact, the file is read in page-by-page, as it is required. The entire file may never need to be moved into memory. Say the user's program contains an error that terminates the image immediately, then moving the entire program into memory would be a waste of I/O resources...