Assume \(N\) segments in memory and a page size of \(P\) bytes. The wastage on…

2009

Assume \(N\) segments in memory and a page size of \(P\) bytes. The wastage on account of internal fragmentation is :

  1. A.

    \(NP/2\) bytes

  2. B.

    \(P/2\) bytes

  3. C.

    \(N/2\) bytes

  4. D.

    \(NP\) bytes

Attempted by 3 students.

Show answer & explanation

Correct answer: A

In a segmentation-with-paging (hybrid) memory-management scheme, each segment is divided into fixed-size pages of P bytes. Internal fragmentation occurs only in the last page of each segment, because a segment's length is rarely an exact multiple of the page size — the unused tail of that last page cannot be allocated to any other process.

  1. Let a segment's length modulo the page size P be the amount of content sitting in its last page — this remainder can be anywhere from 0 to P − 1 bytes.

  2. Assuming these remainders are uniformly distributed over [0, P − 1], the average unused space in one segment's last page works out to (0 + (P − 1)) / 2, which is approximately P/2 bytes.

  3. There are N segments in memory, and each one independently contributes this same average last-page loss.

  4. Total expected internal-fragmentation wastage = N segments × P/2 bytes per segment = NP/2 bytes.

Unit check: N is a plain segment count and P is a byte quantity, so N × (P/2) comes out in bytes, matching how all four options are expressed. Boundary check: setting N = 1 reduces the formula to P/2 bytes — the standard one-segment result for the expected waste in a single last page — confirming the scaling to N segments is simply a multiplication by N.

So the wastage on account of internal fragmentation across N segments is NP/2 bytes.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…