GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 19(c)

Allocate page-entry aging bits

Operating Systems · Virtual Memory & Paging · Full GATE CSE 1999 paper

GATE 1999, Q19(c) 2 marks · Descriptive
Report issue

Virtual Memory & Paging

Question 19(c), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, each entry has 1 valid bit, 3 protection bits and 1 dirty bit. How many bits remain for aging information?
Question 19(c), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, each entry has 1 valid bit, 3 protection bits and 1 dirty bit. How many bits remain for aging information?
Tap to enlarge
Answer & solution

Answer: 4 aging bits (no official key was published)

There are 216/29=27 physical page frames, so a page-table entry needs 7 bits for the physical frame number. The offset is supplied by the original virtual address and is not stored in the entry. Each entry is 2 bytes=16 bits. The stated non-address metadata occupies 1+3+1=5 bits. Thus the aging budget is 16−7−5=4 bits. A valid field allocation is [frame number:7 | valid:1 | protection:3 | dirty:1 | aging:4], totaling 16. Subtracting a full 16-bit physical byte address would be wrong because a page frame is aligned and its low 9 offset bits need not be recorded. This answer assumes no additional unspecified fields consume the remaining capacity.

Original paper, page 8