CS FundamentalsHardGATE CS

A system uses 4 KB pages. A process's code segment is 10,000 bytes, data 7,000 bytes and stack 3,000 bytes, each segment starting on a page boundary. How much memory is lost to internal fragmentation?

  1. A. 4,576 bytes
  2. B. 480 bytes
  3. C. 2,288 bytes
  4. D. 0 bytes

Correct answer: A. 4,576 bytes

Pages needed: code 3 (12,288 B, waste 2,288), data 2 (8,192 B, waste 1,192), stack 1 (4,096 B, waste 1,096). Total waste = 4,576 B. Packing all 20,000 B together would need 5 pages and waste only 480 B.

More Operating Systems questions

Exams that ask this topic