Auburn University http://www.eng.auburn.edu/~xqin COMP 3500 Introduction to Operating Systems Resource Allocation Graphs Handling Deadlocks Dr. Xiao.

Slides:



Advertisements
Similar presentations
Chapter 7: Deadlocks Adapted by Donghui Zhang from the original version by Silberschatz et al.
Advertisements

Deadlock Prevention, Avoidance, and Detection
Deadlock Prevention, Avoidance, and Detection.  The Deadlock problem The Deadlock problem  Conditions for deadlocks Conditions for deadlocks  Graph-theoretic.
DEADLOCK. Contents  Principles of deadlock  Deadlock prevention  Deadlock detection.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 27 CPU Simulator III.
02/27/2004CSCI 315 Operating Systems Design1 Process Synchronization Deadlock Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 7: Deadlocks.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Deadlocks  (How to Detect Them and Avoid Them) A:
Chapter 7 Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 14, 2005 Chapter 7: Deadlocks 7.1 System Model.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks.
1 Wednesday, June 28, 2006 Command, n.: Statement presented by a human and accepted by a computer in such a manner as to make the human feel that he is.
Modified from Silberschatz, Galvin and Gagne Lecture 13 Chapter 7: Deadlocks.
02/18/2008CSCI 315 Operating Systems Design1 Deadlock Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
02/19/2008CSCI 315 Operating Systems Design1 Deadlock Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 14, 2005 Chapter 7: Deadlocks The Deadlock.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 7: Deadlocks.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Bridge Crossing Example Traffic only in one direction. Each section.
Silberschatz, Galvin and Gagne  Operating System Concepts Deadlock and Starvation Deadlock – two or more processes are waiting indefinitely for.
Deadlock Characterization
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Deadlocks.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks Modified.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Chapter 7 Deadlocks. 7.2 Modified By Dr. Khaled Wassif Operating System Concepts – 7 th Edition Silberschatz, Galvin and Gagne ©2005 Chapter 7: Deadlocks.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 AE4B33OSS Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 28 Handling Deadlock.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock.
This Time - Deadlock Definition Conditions for deadlocks
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
13/03/07Week 21 CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Deadlocks. Deadlock handling Deadlock prevention Deadlock avoidance Deadlock detection Deadlock recovery.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 14, 2005 Chapter 7: Deadlocks The Deadlock.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 7: Deadlocks System Model Deadlock Characterization Methods.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 7: Deadlocks.
7.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 6 Deadlocks Slide 1 Chapter 6 Deadlocks.
Deadlock. Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 6: Deadlocks.
7.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 7: Deadlocks.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 7: Deadlocks.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 14, 2005 Chapter 7: Deadlocks The Deadlock.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
CSS430 Deadlocks Textbook Ch7
Chapter 7: Deadlocks.
Synchronization Deadlocks and prevention
Chapter 7: Deadlocks Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
Chapter 7 Deadlocks.
Chapter 7: Deadlocks.
Deadlocks Definition A set of processes is in a Deadlock state when every process in the set is waiting for an event that can only be caused by another.
Deadlock B.Ramamurthy CSE421 1/11/2019 B.Ramamurthy.
G.Anuradha Ref:- Galvin
DPNM Lab. Dept. of CSE, POSTECH
Deadlocks Peng Lu In a multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources; if the.
Deadlock B.Ramamurthy CSE421 2/23/2019 B.Ramamurthy.
Deadlocks Session - 13.
DEADLOCK.
Lecture 26 Syed Mansoor Sarwar
Deadlock B.Ramamurthy CSE421 4/23/2019 B.Ramamurthy.
Deadlock A deadlock situation on a resource can arise if and only if all of the following conditions hold simultaneously in a system: Mutual exclusion.
CSS430 Deadlocks Textbook Ch8
Deadlock B.Ramamurthy CSE421 5/1/2019 B.Ramamurthy.
CSCI 315 Operating Systems Design
CENG334 Introduction to Operating Systems
Chapter 8: Deadlocks Deadlock Characterization
Deadlock B.Ramamurthy CSE421 8/28/2019 B.Ramamurthy.
Deadlock B.Ramamurthy CSE421 9/3/2019 B.Ramamurthy.
Presentation transcript:

Auburn University http://www.eng.auburn.edu/~xqin COMP 3500 Introduction to Operating Systems Resource Allocation Graphs Handling Deadlocks Dr. Xiao Qin Auburn University http://www.eng.auburn.edu/~xqin xqin@auburn.edu 20 Min: google engineers gave a talk. 30 Min: Slides 1-8 Slides are adopted from Drs. Silberschatz, Galvin, and Gagne

Recap: Deadlock Characterization Deadlock can arise if four conditions hold simultaneously. Mutual exclusion: only one process at a time can use a resource Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task Circular wait: there exists a set {P0, P1, …, Pn} of waiting processes such that … …

Recap: Resource-Allocation Graph Process Resource Type with 4 instances Pi requests instance of Rj Pi is holding an instance of Rj Pi Rj Pi Rj

Q1: Can you explain this resource allocation graph?

Q2: Is there any problem with this resource allocation graph? Answer: deadlock

Q3: Is there any problem with this resource allocation graph? Answer: deadlock

Q4: The graph below has a cycle. Is this a deadlock? Why? No.

Q5: Can you draw the following conclusions? If graph contains no cycles  no deadlock If graph contains a cycle  if only one instance per resource type, then deadlock if several instances per resource type, then possibility of deadlock Deadlock or no deadlock? Why no cycle then no deadlock? No circular wait (one of the four conditions)

Summary Resource-Allocation Graph Deadlock Detection using Resource-Allocation Graphs