TGPSC HMWSSB Manager 2015 Paper 2 CSE · Question 20
Question 20 of the TSPSC Manager (Engineering), HMWSSB, 2015: Paper 2 (Computer Science & Information Technology) (1 November 2015). Try it first, then open the answer. The explanation is in the practice app with the All-in-One Pass.
Let S and Q be two semaphores initialized to 1, where P₀ and P₁ are the processes defined as follows:
Process P₁ Process P₂ wait (S); wait(Q); wait(Q); wait(S); ---; ----; signal(S); signal(Q); signal(Q); signal(S);Which one of the following statements is correct with respect to the above construct?
- Causes starvation
- Causes livelock
- Causes a deadlock
- Does not ensure mutual exclusion
Show answer
Answer: (3) Causes a deadlock
Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.