Operating systemsLesson 4 of 4 in the course Processes and scheduling

Deadlock Conditions, Handling Strategies, and Distributed Variants

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Deadlock is a central challenge in concurrent computing: processes that need shared resources can become stuck waiting for one another. This lesson introduces deadlock and the four conditions that must coincide for it to arise.

A deadlock occurs when a group of processes or other entities cannot make progress because each is waiting for an action from another member of the group. In operating systems, a process may wait for a resource held by another process, which is itself waiting for a resource held by another process. If the chain eventually loops back to the first process, none can proceed.

All flashcards

What is no preemption?
A condition in which a resource cannot be forcibly taken from its holder and must be released voluntarily.
What is deadlock avoidance?
Evaluating each resource request to keep the system in a state where deadlock can still be avoided.
What is resource preemption as a recovery method?
Taking resources from some processes and reallocating them to break a deadlock, potentially requiring rollback.
What is distributed deadlock?
A deadlock involving processes or transactions waiting for resources across multiple computers.
What is circular wait?
A cycle of processes, each waiting for a resource held by the next process.

Quiz questions

  1. How does deadlock prevention differ from deadlock avoidance?Answer: Prevention blocks a necessary condition; avoidance evaluates requests to keep deadlock avoidable.
  2. What information does deadlock avoidance generally require in advance?Answer: The resources processes may need during their lifetimes.
  3. What distinguishes livelock from deadlock?Answer: Processes keep changing state but make no useful progress.
  4. What is a phantom deadlock in a distributed system?Answer: A false deadlock report caused by incomplete or outdated system information.
  5. Which recovery method may require rolling back work after resources are taken from processes?Answer: Resource preemption.

Based on the Wikipedia article Deadlock (computer science), licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Operating systems lessons