Synchronization Checkpoint

Semaphores and deadlock detection.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Start with 0 permits. Run P(11), P(12), V(9), P(13), V(11). Which acquisition order is returned?

Select one answer.

2. A signal wakes a queued waiter and also increments the available count. Which later event exposes the defect?

Select one answer.

3. Graph edges are 0→1, 0→2, 2→1. DFS finishes vertex 1 before following 0→2. What does edge 2→1 establish?

Select one answer.

4. A graph includes a cycle, but one request can be satisfied by either of two resource holders, one of whom is still runnable. Why is the simple deadlock conclusion unjustified?

Select one answer.

5. Initial permits 2; four signals have occurred; five acquisitions have completed. How many permits are available?
6. After all nodes in one component are finished, must a cycle detector also visit a disconnected unvisited component? Answer yes or no.
Join Discord