{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info iconThis preview shows pages 1–9. 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 Document Right Arrow Icon
M. Kargahi (School of ECE) What is a Deadlock square6 Processes use resources in the following sequence: square6 Request barb2right Use barb2right Release square6 A number of processes may participate in a deadlock square6 Example square6 Three processes on three CD/RW drives: cyclic wait square6 Two processes requesting printer and DVD drive
Background image of page 2
M. Kargahi (School of ECE) Necessary Condition for Deadlock square6 Mutual exclusion square6 Hold and wait square6 No preemption square6 Circular wait
Background image of page 3

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

View Full Document Right Arrow Icon
M. Kargahi (School of ECE) Resource-Allocation Graph square6 P = { P 1 , …, P n } square6 R = { R 1 , …, R m } square6 Request edge: P i barb2right R j square6 Assignment edge: R j barb2right 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 Document Right Arrow Icon
M. Kargahi (School of ECE) Resource-Allocation Graph with a Cycle but no Deadlock square6 Deadlock barb4right Cycle square6 Cycle barb4right Deadlock is probable
Background image of page 6
M. Kargahi (School of ECE) Deadlock Handling square6 Deadlock prevention or deadlock avoidance square6 Prevention : To ensure deadlock will never occur square6 Avoidance : Knowing the resource requirements, deadlock will by avoided on each allocation square6 Deadlock detection and recovery square6 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 Document Right Arrow Icon
M. Kargahi (School of ECE) Deadlock Prevention square6 At least one of the necessary conditions for deadlock should not be held 1.
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}