edited by
412 views
0 votes
0 votes
Suppose there is a (non-virtual memory) system that has only 200 Mb of main memory and there are two processes that make the following sequence of requests:

 

P1             P2

...     ...

Request 80Mb;    Request 70Mb;

...     ...

Request 60Mb;     Request 80Mb;

Consider the following statements:

Statement 1: P1 requests 80 Mb and then P2 requests 70 Mb. This is a deadlock.

Statement 2: There is no possibility of a deadlock.

Which of the above statements are correct?
edited by

1 Answer

1 votes
1 votes

Statement 1- It is correct because we have limited memory of 200Mb. As per options, we can figure out that both process are running concurrently and first p1 take 80Mb from 200, so 200-80=120MB remaining. After that, P2 demands 70Mb, so 120-70=50Mb reaming. And 50 Mb is not sufficient for either of the processes to complete. P1 will wait for P2 to complete and release captured memory, and p2 will wait for p1 to get complete and release captured memory. Here both process will get stuck and this is deadlock.

Statement 2-  Because of statement 1 is true, statement 2 is false.

Related questions

0 votes
0 votes
1 answer
1
lalitver10 asked Jan 22, 2022
642 views
Question→ Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will ...
1 votes
1 votes
1 answer
3
LRU asked Nov 5, 2021
423 views
Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will guarantee a ...