7.Deadlock - Deadlocks Mehdi Kargahi School of ECE...

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

View Full Document Right Arrow Icon
Deadlocks Mehdi Kargahi School of ECE University of Tehran Spring 2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) What is a Deadlock s Processes use resources in the following sequence: s Request b Use b Release s A number of processes may participate in a deadlock s Example s Three processes on three CD/RW drives: cyclic wait s Two processes requesting printer and DVD drive
Background image of page 2
M. Kargahi (School of ECE) Necessary Condition for Deadlock s Mutual exclusion s Hold and wait s No preemption s Circular wait
Background image of page 3

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Resource-Allocation Graph s P = { P 1 , …, P n } s R = { R 1 , …, R m } s Request edge: P i b R j s Assignment edge: R j b P i
Background image of page 4
M. Kargahi (School of ECE) Resource-Allocation Graph with a Deadlock
Background image of page 5

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Resource-Allocation Graph with a Cycle but no Deadlock s Deadlock b Cycle s Cycle b Deadlock is probable
Background image of page 6
M. Kargahi (School of ECE) Deadlock Handling s Deadlock prevention or deadlock avoidance s Prevention : To ensure deadlock will never occur s Avoidance : Knowing the resource requirements, deadlock will by avoided on each allocation s Deadlock detection and recovery s Ignoring deadlock (assuming it never occurs)
Background image of page 7

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Deadlock Prevention s At least one of the necessary conditions for deadlock should not be held 1. Mutual exclusion s This condition cannot be denied, unless for sharable resources, e.g., a real-only file
Background image of page 8
M. Kargahi (School of ECE)
Background image of page 9

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

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

Page1 / 24

7.Deadlock - Deadlocks Mehdi Kargahi School of ECE...

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

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