CS FundamentalsHardGATE CS (PYQ pattern)

Segment table (base, limit in bytes): seg 0 = (1000, 400), seg 1 = (2400, 100), seg 2 = (3000, 250), seg 4 = (500, 60); segment 3 is not defined. Accesses (segment, offset): (0,350), (1,100), (2,249), (3,10), (4,60), (0,400), (2,0). An access is valid only if the segment exists and offset < limit. What is the sum of the physical addresses of the accesses that succeed?

  1. A. 10099
  2. B. 8159
  3. C. 10609
  4. D. 7599

Correct answer: D. 7599

Valid accesses: [(0, 350), (2, 249), (2, 0)]. Offsets equal to the limit (1,100), (4,60), (0,400) fail, and segment 3 does not exist. The physical addresses are [1350, 3249, 3000] and they sum to 7599.

More Operating Systems questions

Exams that ask this topic