Consider a virtual memory system with the following properties: 40-bit virtual b
ID: 656398 • Letter: C
Question
Consider a virtual memory system with the following properties:
40-bit virtual byte address
16 KB pages
33 bit physical byte address
a) What is the size of main memory for this system if all addressable frames are used?
b) What is the total size of the page table for each process on this processor, assuming that the valid, protection, dirty, and use bits take a total of 4 bits and that all the virtual pages are in use? (Assume that disk addresses are not stored in the page table). Please explain how you determined your answer.
Explanation / Answer
Given the size of virtual byte address is 40 bit.
Number of pages in virtual memory is 16KB.
Size of the physical byte address is 33 bits.
a)
The size of main memory is the power of the number of physical address bits to the base 2.
As, the physical memory bit size is 33 the size of the main memory is 2^33=8 GB.
b)
Size of the page table=total no. of page table entriessize of page table entry
Total no. of page table entries=virtual address space/page size
= 2^40 / 2^16
=2^24 entries
To determine size of page table entry the number of frames in physical memory should be identified.
Number of frames in physical memory = (8102410241024)/(161024)
= 1024512
= =
Thus, 19 bits are needed along with 4 additional bits they are valid, protection, dirty and use.
The total number of bits are 19+4=23 bits.And this is equal to 2.875 bytes.
Size of page table=(2^24)2.875=48234496bytes=(2^4+2^20)2.875=46MB