Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Ring Inc hires you to design the virtual memory system for a new cell phone with

ID: 3906955 • Letter: R

Question

Ring Inc hires you to design the virtual memory system for a new cell phone with 32-bit virtual and physical addresses, in which memory is allocated in 1 KB pages. Suppose that you decide to use a single-level page table, in which you also store three metadata bits for each page: Writable, Executable and Valid. [5 marks] ) Answer the following questions, briefly explaining your solution (i) How long, in bits, is a virtual page number? (ii) How long, in bits, is a physical page number? (iii) How long, in bits, is an offset within a page? (iv) How much memory is needed to store the page table of each process?

Explanation / Answer

Solution :

Number of bits used for virtual address and physical address = 32 bits.
size of 1 page = 1KB = 2^10 Bytes.
so 10 bits are used as offset bits.


1) bits used for virtual page number = Number of bits used for virtual address - offset bits
= 32 - 10
= 22 bits

2) bits used for Physcial page number = number of bits used for physical address - offset bits
= 32-10
= 22 bits

3) Number of offset bits = 10 bits

4)
Memory needed to store page table = number of pages in virtual memory * (bits used for page number + 3)
= 2^22 * (22+3)
= (25 * 2^22)/2^3 bytes
= 12.5 MB

hence 12.5 MB memory is used to store page table of one process.

if you have any doubts then you can ask in comment section if you find the solution helpful then upvote the answer. Thank you.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote