Virtual Memory
If the valid bit is zero in the page table entry for the logical
address, this means that the page is not in memory and
must be fetched from disk.
– This is a page fault.
– If necessary, a page is evicted from memory and is
replaced by the page retrieved from disk, and the valid
bit is set to 1.
If the valid bit is 1, the virtual page number is replaced by
the physical frame number.
The data is then accessed by adding the offset to the
physical frame number.
As an example, suppose a system has a virtual address
space of 8K and a physical address space of 4K, and the
system uses byte addressing.
– We have 213/210 = 23 virtual pages – each page is 1K
A virtual address has 13 bits (8K = 213) with 3 bits for the
page field and 10 for the offset, because the page size is
1024.
A physical memory address requires 12 bits, the first two
bits for the page frame and the trailing 10 bits the offset.
Senin, 15 Juni 2009
Langganan:
Posting Komentar (Atom)

Tidak ada komentar:
Posting Komentar