DeadlockMar29

DeadlockMar29 - Deadlock Management Topics Introduction to...

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

View Full Document Right Arrow Icon
Deadlock Management
Background image of page 1

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

View Full DocumentRight 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
Background 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.
Background image of page 3

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

View Full DocumentRight 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
Background 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 .
Background image of page 5

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

View Full DocumentRight 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
Background image of page 6
7 Mohamed F. Mokbel Graph Construction A B C
Background image of page 7

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

View Full DocumentRight 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
Background 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
Background image of page 9

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

View Full DocumentRight 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
Background 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.
Background image of page 11

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

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

This document was uploaded on 10/15/2010.

Page1 / 38

DeadlockMar29 - Deadlock Management Topics Introduction to...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online