GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A process has three segments of 102,400 B (code), 61,440 B (data) and 20,780 B (stack). Each segment is allocated separately in whole pages, so the last page of a segment may be partly unused. Every allocated page needs one 8-byte page-table entry. Among the page sizes 512, 1024, 2048, 4096 and 8192 B, which minimises (page-table bytes + unused bytes in allocated pages), and what is that minimum?
- A. 2048 B; 2,476 B
- B. 512 B; 3,100 B
- C. 4096 B; 4,164 B
- D. 1024 B; 2,172 B
Correct answer: D. 1024 B; 2,172 B
For each size count pages per segment (rounding up), then add 8 B per page and the unused tail bytes. 1024 B: 100 + 60 + 21 = 181 pages → 1448 + 724 = 2172 B. 2048 B: 50 + 30 + 11 = 91 pages → 728 + 1748 = 2476 B; 512 B: 3100 B. The averaged rule p = √(2·s·e) ≈ 1720 suggests 2048, but the code and data segments are exact multiples of 1 KB, so they waste nothing at 1024 B.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 16 KB direct-mapped write-back cache has 32-byte blocks; every line stores its data, its tag, one valid bit and one dirty bit, and…
- In a 32-bit ripple-carry adder every full adder produces its carry-out 2 gate delays after its carry-in (inputs a and b are available at t…
- A classic 5-stage pipeline (IF, ID, EX, MEM, WB) runs: I1: ADD R1, R2, R3; I2: LW R4, 8(R1); I3: AND R5, R4, R1; I4: OR R6, R5, R4; I5: LW…
- A virtually indexed, physically tagged L1 cache has 64-byte blocks, 4 KB pages and must avoid synonym (aliasing) problems with no OS help…
- A disk spins at 6000 rpm with 500 sectors of 512 B per track and 4 recording surfaces. A long file fills whole cylinders in order…
- A direct-mapped cache has 2 lines of 4 words each. The word-address trace is ['W0', 'W1', 'W2', 'W3', 'R0', 'R1', 'W8', 'W9', 'R8', 'R0']…