Deadlock Revisited
Image by Anja🤗#helpinghands #solidarity#stays healthy🙏 from Pixabay
So... the OS is managing many processes that are competing for resources... how does it prevent deadlock? Or does it?
Learning Objectives
We're going to analyze the options for the operating system to handle deadlock in the system---and we're going to have a different conclusion than when we prevent deadlock in our processes.
Upon completion of this module, you will be able to:
- List the four conditions of deadlock and explain how they differ from the ones within a process.
- Describe the differences between deadlock prevention, avoidance, and detection and recovery.
- Explain and defend when each is appropriate and each is not.
- Explain the premise behind the Banker's Algorithm and apply it to a system.
- Explain the value of a resource allocation graph and the meaning of cycles in the graph.
- Describe and defend the ostrich algorithm.
Learning
- Video: Introduction (3 minutes)
- Video: Causing Deadlock (4 minutes)
- Video: Managing Deadlock (4 minutes)
- Video: Deadlock Avoidance (5 minutes)
- Video: Banker's Algorithm: Example (14 minutes)
- Video: Deadlock Detection (11 minutes)
- Video: Real-Life Deadlock Handling (4 minutes)
-
Slides that were presented in the videos
Note that these videos have embedded formative assessments---you'll want to watch the videos and complete those before class, so that you can earn participation credit.
Recommended Readings
Deadlock Notes from Dr. John T. Bell at University of Illinois, Chicago
From Class
Any in-class resources will be posted here after class.
Evaluating Your Understanding
We are providing these rubrics for each module so that you can better understand what is expected and evaluate your understanding against those expectations. The hope is that, if you find yourself earning a 3 or below, you will continue to enhance your understanding until you find yourself earning a 4 or a 5.
| Standards for Deadlock in the OS Sub-Competency | 5 | 4 | 3 | 2 |
|---|---|---|---|---|
| Deadlock in the OS | Student accurately lists the four conditions of deadlock, accurately explains how each contributes to deadlock, and accurately explains how they differ from the conditions within a process; student accurately describes the differences between deadlock management techniques, accurately compares and contrasts between them, and accurately defends when each is appropriate and when each is not; student accurately explains the premise behind the Banker's Algorithm and accurately applies it; student accurately explains the use and creation of the resource allocation graph and the meaning of cycles in the graphs; student accurately explains and defends the ostrich algorithm. | Student accurately lists the four conditions of deadlock, accurately explains how each contributes to deadlock, and accurately explains how they differ from the conditions within a process; student accurately describes the differences between deadlock management techniques, satisfactorily compares and contrasts between them, and satisfactorily defends when each is appropriate and when each is not; student accurately explains the premise behind the Banker's Algorithm and satisfactorily applies it; student accurately explains the use and creation of the resource allocation graph and the meaning of cycles in the graphs; student accurately explains and defends the ostrich algorithm. | Student satisfactorily lists the four conditions of deadlock, satisfactorily explains how each contributes to deadlock, and satisfactorily explains how they differ from the conditions within a process; student satisfactorily describes the differences between deadlock management techniques, unsatisfactorily compares and contrasts between them, and unsatisfactorily defends when each is appropriate and when each is not; student satisfactorily explains the premise behind the Banker's Algorithm and unsatisfactorily applies it; student satisfactorily explains the use and creation of the resource allocation graph and the meaning of cycles in the graphs; student satisfactorily explains and defends the ostrich algorithm. | Student does not submit the work OR student unsatisfactorily lists the four conditions of deadlock, unsatisfactorily explains how each contributes to deadlock, and unsatisfactorily explains how they differ from the conditions within a process; student unsatisfactorily describes the differences between deadlock management techniques, unsatisfactorily compares and contrasts between them, and unsatisfactorily defends when each is appropriate and when each is not; student unsatisfactorily explains the premise behind the Banker's Algorithm and unsatisfactorily applies it; student unsatisfactorily explains the use and creation of the resource allocation graph and the meaning of cycles in the graphs; student unsatisfactorily explains and defends the ostrich algorithm. |
| Short Answer Questions: Deadlock in the OS Specific | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |
| Short Answer Questions: Deadlock in the OS as part of larger systems | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |