GATE / CS ARCHIVE

GATE CSE 2015 SET 2 / QUESTION 43

GATE CSE 2015 Set 2 Q43

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2015 Set 2 paper

GATE 2015 Set 2, Q43 2 marks · NAT
Report issue

Virtual Memory & Paging

Question 43, GATE 2015: Physical addresses 32 bits, pages 8 KB. PTE has valid bit, dirty bit, 3 permission bits, and frame translation. Maximum page table 24 MB. Under packed entries, find virtual address width.
Tap to enlarge
Answer & solution

Official answer: 36

An8 KiB page uses 13 offset bits. A physical frame number needs 32−13=19 bits, and the five status/permission bits make a 24-bit (3-byte) packed PTE. A24 MiB table then holds 223 entries, giving 23+13=36 virtual address bits. This assumes the entries are packed into 3 bytes rather than padded and the maximum table maps the full virtual page space.

An8KiB page needs 13 offset bits. From 32 physical bits, 19 remain for the physical frame number. Add 1 valid+1 dirty+3 permission bits to obtain 24 bits=3 bytes per packed entry. A24MiB table holds 24×220/3=8×220=223 entries, one per virtual page. Therefore the virtual address has 23 page-number bits plus 13 offset bits=36. Alignment that padded entries to 4 bytes would define a different organization, so packing is an explicit assumption.

Original paper, page 40 · Answer key