DeadlockMar29 - Deadlock Management Topics Introduction to...

Info icon This preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Deadlock Management
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Mohamed F. Mokbel Topics Introduction to Deadlocks Deadlock Management Approaches Deadlock Acceptance (Ostrich Algorithm) Deadlock Prevention Deadlock Detection and Recovery Deadlock Avoidance (Banker Algorithm) Other issues
Image of page 2
3 Mohamed F. Mokbel Introduction to Deadlocks Deadlock definition: Contributing factors to deadlocks: Concurrent processing Needed for high performance and utilization Competition over limited resources Examples of applications that have deadlock: Operating systems, Database systems, Distributed Systems, … Deadlock is a situation where a group of processes are permanently blocked waiting for the resources held by each other in the group.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Mohamed F. Mokbel System Model Concurrent processes P 1 , P 2 , …,P n Resource types R 1 , R 2 , . . ., R m CPU cycles, memory space, I/O devices, printers Each resource type R i has W i instances Each process utilizes a resource as follows: Request Use Release Represent the relationships between processes and resources as a graph
Image of page 4
5 Mohamed F. Mokbel Resource-Allocation Graph V is partitioned into two types: Processes = { P 1 , P 2 , …, P n } Resource types = { R 1 , R 2 , …, R m } E is partitioned into two types: Request edge – directed edge P i R j Assignment edge – directed edge R j P i A set of vertices V and a set of edges E .
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Mohamed F. Mokbel Resource-Allocation Graph (Cont’d) Process Resource Type with 4 instances P i requests instance of R j P i is holding an instance of R j P i P i P i R j R j R j
Image of page 6
7 Mohamed F. Mokbel Graph Construction A B C
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Mohamed F. Mokbel Deadlock Characterization 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: Every process P i is waiting for a resource that is held by P (i+1 mod n) , 1≤ i < n Four necessarily and sufficient conditions P 1 P 2 P 3 P n-1
Image of page 8
9 Mohamed F. Mokbel Examples Deadlock Cycle Cycle, No Deadlock Cycles do NOT necessarily imply deadlock unless … there is ONLY one instance of each resource type
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10 Mohamed F. Mokbel Topics Introduction to Deadlocks Deadlock Management Approaches Deadlock Acceptance (Ostrich Algorithm) Deadlock Prevention Deadlock Detection and Recovery Deadlock Avoidance (Banker Algorithm) Other issues
Image of page 10
11 Mohamed F. Mokbel Deadlock Management Approaches 1. Ignore the problem altogether (Ostrich Algorithm) 1. Prevent deadlocks from happening Negate one of the necessary conditions 1.
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern