630 views
1 votes
1 votes

1 Answer

Best answer
4 votes
4 votes

Given n processes with memory requirement of each = m

So now say one process is in main memory occupying m memory units.

The remaining "n-1" processes are in the secondary memory as of now..

Hence if we allow of swap space of "n-1" processes only (swap space = (n-1)m) , in that case the process does not have free space in secondary memory as all the space is already taken by the "n-1" processes and one of these processes have to go to the main memory in order for the swapping out of the process which is currently in the main memory.

But we have no extra space available for swapping in and out successfully..Thus hold and wait condition occurs and eventually deadlock occurs.

Hence to avoid deadlock , we should have extra swap space of at least one process such that the swapping can be done.Just like we meet the maximum need of at least one process to ensure deadlock free condition.

Hence total swap space required = (n-1)*m  + m [ m for extra space for swapping purpose]

                                                =  n*m 

Hence A option should be correct..

selected by

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
4