Memory

Basic idea

Each process sees a private virtual address space. A page table maps virtual pages to physical frames (or to disk) and enforces per-page access control. Sharing real memory across virtual address spaces enables shared libraries, kernel mapping, and IPC.

Key formulas

Address Space

Most operating systems allocate a virtual address space for each process. The virtual addresss space is byte addressable and on a 32 bit computer has 2^32 byte addresses.

The virtual address space can be divided into regions that are contigous and do not have overlap.

A paged virtual memory scheme divides the address space into fixed sized blocks that are either located in physical memory (RAM) or located in swap space on the hard disk drive.

A page table is used by the processor and operating system to map virtual addresses to real addresses. The page table also contains access control bits for each page that determine, among other things the access privelages of the process on a per page basis.

Shared memory

Two seperate address spaces can share the same real memory. This can be useful in a number of ways:

Siblings