in 32-bit os system,virtual address is 32bits, page size is 4k, so from 0-11 bit is offset of page, from 12-31 bits is virtual page number, use virtual page number to look up the page table to get physical page number which has exact length to virtual page number (normally). If the valid bit in page table is 1 means the physical address is in the memory, otherwise, the physical page is on the disk, get the page from the disk which is swapped by the recently least used page on the main memory, and write the new physical page in the page table.
In the page table virtual address should be contiguous, physical address is not contiguous.
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/virtual.html
Jan 16, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment