For each of the four processes P1, P2, P3 and P4, the total size in KB and the…
2006
For each of the four processes P1, P2, P3 and P4, the total size in KB and the number of segments are given below.

Given:
Page size = 1 KB.
Page-table entry size = 4 bytes.
Segment-table entry size = 8 bytes.
Maximum segment size = 256 KB.
Let P be the storage overhead for two-level paging, S for segmentation, and T for segmentation with paging. What is the correct relation among P, S and T?
- A.
P < S < T
- B.
S < P < T
- C.
S < T < P
- D.
T < S < P
Attempted by 60 students.
Show answer & explanation
Correct answer: C
Correct answer: S < T < P
Segmentation only (S): Total segments = 4 + 5 + 3 + 8 = 20. Each segment-table entry is 8 bytes, so S = 20 x 8 = 160 bytes.
Segmentation with paging (T): With 1 KB pages, the total number of pages equals total process size: 195 + 254 + 45 + 364 = 858 pages. Page-table storage = 858 x 4 = 3432 bytes. Add the segment-table overhead: T = 3432 + 160 = 3592 bytes.
Two-level paging (P): One page table page can hold 1 KB / 4 B = 256 entries. Each process also needs one top-level page.
P1: 195 pages -> 1 second-level page + 1 top-level page = 2 KB.
P2: 254 pages -> 1 second-level page + 1 top-level page = 2 KB.
P3: 45 pages -> 1 second-level page + 1 top-level page = 2 KB.
P4: 364 pages -> 2 second-level pages + 1 top-level page = 3 KB.
So P = 9 KB = 9216 bytes. Since 160 < 3592 < 9216, the relation is S < T < P.