Virtual memory

Software within the operating system may extend these capabilities, utilizing, e.g., disk storage, to provide a virtual address space that can exceed the capacity of real memory and thus reference more memory than is physically present in the computer.

[6] Older operating systems, such as those for the mainframes of the 1960s, and those for personal computers of the early to mid-1980s (e.g., DOS),[7] generally have no virtual memory functionality,[dubious – discuss] though notable exceptions for mainframes of the 1960s include: During the 1960s and early '70s, computer memory was very expensive.

Most modern operating systems that support virtual memory also run each process in its own dedicated address space.

However, some older operating systems (such as OS/VS1 and OS/VS2 SVS) and even modern ones (such as IBM i) are single address space operating systems that run all processes in a single address space composed of virtualized memory.

The hardware to translate virtual addresses to physical addresses typically requires a significant chip area to implement, and not all chips used in embedded systems include that hardware, which is another reason some of those systems do not use virtual memory.

A claim that the concept of virtual memory was first developed by German physicist Fritz-Rudolf Güntsch at the Technische Universität Berlin in 1956 in his doctoral thesis, Logical Design of a Digital Computer with Multiple Asynchronous Rotating Drums and Automatic High Speed Memory Operation,[9][10] does not stand up to careful scrutiny.

This is exactly the situation in computers with cache memory, one of the earliest commercial examples of which was the IBM System/360 Model 85.

This is exactly analogous to Güntsch's system, designed as a means to improve performance, rather than to solve the problems involved in multi-programming.

From 1959 to 1961, W. R. Lonergan was manager of the Burroughs Product Planning Group which included Barton, Donald Knuth as consultant, and Paul King.

In May 1960, UCLA ran a two-week seminar "Using and Exploiting Giant Computers" to which Paul King and two others were sent.

Paul King took the ideas back to Burroughs and it was determined that virtual memory should be designed into the core of the B5000.[18]: 3 .

[22] IBM introduced the Start Interpretive Execution (SIE) instruction as part of 370-XA on the 3081, and VM/XA versions of VM to exploit it.

Dynamic address translation required expensive and difficult-to-build specialized hardware; initial implementations slowed down access to memory slightly.

By 1969, the debate over virtual memory for commercial computers was over;[8] an IBM research team led by David Sayre showed that their virtual memory overlay system consistently worked better than the best manually controlled systems.

Stolen page frames that have been modified are written back to auxiliary storage before they are added to the free queue.

For example, interrupt mechanisms rely on an array of pointers to their handlers, such as I/O completion and page fault.

In OS/VS1 and similar OSes, some parts of systems memory are managed in "virtual-real" mode, called "V=R".

Thrashing occurs when there is insufficient memory available to store the working sets of all active programs.

This reduces demand on real memory by swapping out the entire working set of one or more processes.

A system thrashing is often a result of a sudden spike in page demand from a small number of running programs.

The basic idea is to set a token in the system, which is randomly given to a process that has page faults when thrashing happens.

[30] In this updated swap-token implementation, a priority counter is set for each process to track the number of swap-out pages.

The fragmentation thus becomes a problem passed to programmers who may well distort their program to match certain page sizes.

This difference has important consequences; a segment is not a page with variable length or a simple way to lengthen the address space.

[39] 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.

[41] 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 addition, privileged code can temporarily make an address space unswappable using a SYSEVENT Supervisor Call instruction (SVC); certain changes[43] in the address space properties require that the OS swap it out and then swap it back in, using SYSEVENT TRANSWAP.

Virtual memory combines active RAM and inactive memory on DASD [ a ] to form a large range of contiguous addresses.
The University of Manchester Atlas Computer was the first computer to feature true virtual memory.