<P> This is not the same as the mechanisms provided by calls such as mmap and Win32's MapViewOfFile, because inter-file pointers do not work when mapping files into semi-arbitrary places . In Multics, a file (or a segment from a multi-segment file) is mapped into a segment in the address space, so files are always mapped at a segment boundary . A file's linkage section can contain pointers for which an attempt to load the pointer into a register or make an indirect reference through it causes a trap . The unresolved pointer contains an indication of the name of the segment to which the pointer refers and an offset within the segment; the handler for the trap maps the segment into the address space, puts the segment number into the pointer, changes the tag field in the pointer so that it no longer causes a trap, and returns to the code where the trap occurred, re-executing the instruction that caused the trap . This eliminates the need for a linker completely and works when different processes map the same file into different places in their private address spaces . </P> <P> Some operating systems provide for swapping entire address spaces, in addition to whatever facilities they have for paging and segmentation . When this occurs, the OS writes those pages and segments currently in real memory to swap files . In a swap - in, the OS reads back the data from the swap files but does not automatically read back pages that had been paged out at the time of the swap out operation . </P> <P> IBM's MVS, from OS / VS2 Release 2 through z / OS, provides for marking an address space as unswappable; doing so does not pin any pages in the address space . This can be done for the duration of a job by entering the name of an eligible main program in the Program Properties Table with an unswappable flag . In addition, privileged code can temporarily make an address space unswappable With a SYSEVENT Supervisor Call instruction (SVC); certain changes in the address space properties require that the OS swap it out and then swap it back in, using SYSEVENT TRANSWAP . </P>

How address translation is carried out in linux virtual memory scheme