Monday, May 2, 2011

Physical & virtual addresses

Physical addresses refer to the hardware addresses of physical memory.
Virtual addresses refer to the virtual store viewed by the process.

Virtual to physical address mapping is done by Memory Management Unit(MMU)

Virtual space is limited by the size of virtual addresses.

Virtual memory space and physical memory space are different.

Paging is the most common method of memory management:
Virtual space of process is divided into fixed-size pages
Virtual address is composed of page number and page offset.
Physical memory is divided into fixed-size frames
Page in virtual space fits into frame in physical memory.

Mapping of VA to PA is done with a page table.
Each process has an associated page table.

Physical address = Frame number * Page size + Page offset
-----------------------------

Modern systems keep more than one program in memory at a time.
All these programs together require more memory than what is visible.
Use a part of disk and make it look like memory - This is called virtual memory.

No comments: