Jump to content

Operating System Design/Virtual

From Wikibooks, open books for an open world

Virtual memory is a memory management technique that offers two main benefits:

  • Each process "thinks" it has all the system's memory to itself
  • It becomes possible to access more memory than the actual physical amount

Virtual memory is very useful and is implemented in most operating systems by using the memory management unit (MMU) in the CPU.

The second is accomplished by the MMU setting up a small, contiguous portion of the hard drive and treating it like physical RAM. That is, the operating system will place memory segments or pages into the file as if it were loading it into actual RAM. Thus, it has a place to hold "unused" pages of memory until they are needed and have a place to "Swap Out" memory segments that are no longer needed in memory. This technology is commonly used in paging, our next topic.