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?
- A. 4,576 bytes
- B. 480 bytes
- C. 2,288 bytes
- 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
- Compaction is used to remove external fragmentation. Which condition is required for compaction to be possible?
- The 50-percent rule for first-fit allocation states that, statistically, given N allocated blocks, about 0.5N blocks are lost to…
- Which allocation strategy tends to leave the LARGEST leftover holes, and which tends to produce the most tiny unusable fragments?
- A slab allocator is used inside many kernels. Which statement explains its main advantage?
- Buddy allocation of a 33 KB request from a 1 MB pool gives a block of what size, and how much is internal fragmentation?
- Which file-allocation method supports BOTH efficient direct access and no external fragmentation?