Deadlocks


Answer & solution
Answer: Yes: S1, S2, Q1, Q2, then P1 waits at S3 and P2 waits at Q3 (no official key was published)
Initially both flags are free. Let P1 pass S1 and execute S2, so R1 becomes busy. Let P2 pass Q1 and execute Q2, so R2 becomes busy. P1 now spins in S3 waiting for R2; P2 spins in Q3 waiting for R1. Neither can reach its use or release operations. The wait-for graph is P1→P2→P1: each holds its first resource while waiting for the other.
P2 then spins at Q3 on R1, the flag it set itself. P1 spins at S1 on R1. No process can reach a release. This is a self-wait plus a blocked competitor, rather than the intended two-resource circular wait.