• edited by
205 views
2 2 votes

A system is composed of four processes, $\{\mathrm{P} 1, \mathrm{P} 2, \mathrm{P} 3, \mathrm{P} 4\}$, and two types of consumable resources, $\{\mathrm{R} 1, \mathrm{R} 2\}$. There are 2 units of each type of resource.

  • $\mathrm{P1}$ acquired 1 unit of R2 and requested 1 unit of R1.
  • $\mathrm{P2}$ acquired 1 unit of R1.
  • $\mathrm{P3}$ acquired 1 unit of R1 and requested 1 unit of R2.
  • $\mathrm{P4}$ acquired 1 unit of R2.

Which of the following processes are NOT in deadlock?

  1. $\mathrm{P1}$
  2. $\mathrm{P2}$
  3. $\mathrm{P3}$
  4. $\mathrm{P4}$

2 Answers

1 1 vote
P2 and P4 will complete and release their resources and then P1 and P3 will complete hence no deadlock

 
Answer:
Position:
Show:

Related questions

2 2 votes
1 1 answer
479
479 views
GO Classes asked Sep 15, 2025
479 views
Void main() { int a = 0; for (int i = 0; i < 4; i++) { if (fork() == 0) { a++; return ; } else { a++; ...
3 3 votes
1 1 answer
186
186 views
GO Classes asked Sep 15, 2025
186 views
Which of the following statements are FALSE about threading?Threads share an address space with other threads in the same process.Threads share register state and stack i...
2 2 votes
1 1 answer
270
270 views
GO Classes asked Sep 15, 2025
270 views
Which of the following problems are associated with spin locks?DeadlockStarvation due to lack of fairnessPriority inversion cannot occurContext-switch overhead is elimina...
0 0 votes
1 1 answer
205
205 views
GO Classes asked Sep 15, 2025
205 views
A computer system has N bytes of physical memory and M bytes of virtual address space. The page table(single-level) of a process contains Q entries, and each page-table e...