411 views
3 3 votes

A system uses a Buddy System memory allocator to manage a $\mathbf{1 0 2 4}$ KB physical memory space. The system currently has three active processes allocated as follows:

  • Process A: $110$ KB
     
  • Process B: $240$ KB
     
  • Process C: $60$ KB
     

Assume the memory was initially one contiguous block and processes were allocated in the order A, then B, then C. No memory compaction is performed.

What is the SMALLEST allocation request (in KB) that could be DENIED due to external fragmentation, even though the total sum of all free memory holes is larger than the request?
 

  1. $129$ KB
     
  2. $257$ KB
     
  3. $513$ KB
     
  4. $65$ KB

2 Answers

2 2 votes

We start with a single $\textbf{1024 KB}$ block.
 

1. Process A $\textbf{(110 KB)}$:

  • $110$ KB requires a $2^7=128 \mathrm{~KB}$ block.
     
  • The system splits $1024 \rightarrow 512,512$.
     
  • Then splits $512 \rightarrow 256,256$.
     
  • Then splits $256 \rightarrow 128,128$.
     
  • Result: A takes the first $128$ KB . Holes remaining: $128 \mathrm{~KB}, 256 \mathrm{~KB}, 512 \mathrm{~KB}$.
     

2. Process B ( $\mathbf{240 ~KB}$ ):

  • $240$ KB requires a $2^8=256 \mathrm{~KB}$ block.
     
  • A $256$ KB hole is already available.
     
  • Result: B takes the $256$ KB block. Holes remaining: $128 \mathrm{~KB}, 512 \mathrm{~KB}$.
     

3. Process C $\textbf{(60 KB)}$:

  • $60$ KB requires a $2^6=64 \mathrm{~KB}$ block.
     
  • No $64$ KB hole exists, so the system splits the $128$ KB hole $\rightarrow 64,64$.
     
  • Result: C takes the first $64$ KB block. Holes remaining: $64$ KB and $512$ KB .
 
We need to find the SMALLEST request that is denied even though total free memory is enough.
 
  • Total Free Memory: $64 \mathrm{~KB}+512 \mathrm{~KB}=\mathbf{5 7 6} \mathrm{KB}$.
     
  • Request $\mathbf{5 1 3}$ KB: This request is less than the total free space $(513<576)$.
     
  • However, in a Buddy System, a $513$ KB request requires a $2^{10}=\mathbf{1 0 2 4 ~ K B}$ block $($because it is larger than the next smallest power of $2$ , which is $512)$.
     
  • Since the largest available block is only $512$ KB, a $1024$ KB block cannot be formed, and the request is denied.
Answer:
Position:
Show:

Related questions

1 1 vote
2 2 answers
503
503 views
GO Classes asked Dec 29, 2025
503 views
A system uses a modified Counting Semaphore $S$ to manage access to a pool of 3 identical resources. The semaphore is initialized to $S=3$. The $\verb|Wait (S)|$ and $\ve...
2 2 votes
1 1 answer
271
271 views
GO Classes asked Dec 29, 2025
271 views
A storage server uses a Single-Level Indexed Allocation scheme. The disk parameters and file requirements are as follows:Disk Capacity $: \mathbf{128 ~ GB}$. Block Size $...
1 1 vote
1 1 answer
293
293 views
GO Classes asked Dec 29, 2025
293 views
A system manages resources that can be held in two modes: EXCLUSIVE (only one process) or SHARED (multiple processes, but they can only read, not write).When a process $P...
1 1 vote
2 2 answers
353
353 views
GO Classes asked Dec 29, 2025
353 views
A new OS uses a hybrid prevention scheme to manage a single non-preemptable resource. Each process $P_i$ has a Fixed Priority $\operatorname{Pri}\left(P_i\right)$ and a U...