deadlock

deadlock - Deadlock Deadlock...

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

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

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

View Full DocumentRight Arrow Icon
Fred Kuhns ( )   2 Deadlock Permanent blocking of a set of processes that either  compete for system resources or communicate with each  other No Efficient solution Involve conflicting needs for resources by two or more  processes
Background image of page 2
Fred Kuhns ( )   3 Reusable Resources Description : Used by one process at a time and not depleted by that  use Processes obtain resources that they later release for reuse  by other processes Example : Processor time, I/O channels, main and secondary  memory, files, databases, and semaphores Deadlock occurs if each process holds one resource  and requests the other
Background image of page 3

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

View Full DocumentRight Arrow Icon
Fred Kuhns ( )   4 Bridge Crossing Example Traffic only in one direction. Each section of a bridge can be viewed as a resource. If a deadlock occurs, it can be resolved if one car backs up  (preempt resources and rollback). Several cars may have to be backed up if a deadlock occurs. Starvation is possible.
Background image of page 4
Fred Kuhns ( )   5 Consumable Resources Description: Created (produced) and destroyed (consumed) by a process Examples: Interrupts, signals, messages, and information in I/O buffers Deadlock: May occur if a Receive message is blocking May take a rare combination of events to cause 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
Fred Kuhns ( )   6 Consumable Resource Example Deadlock occurs if receive is blocking P1 . . . . . . Receive(P2); Send(P2); P2 . . . . . . Receive(P1); Send(P1);
Background image of page 6
Fred Kuhns ( )   7 System Model - Reusable Resources • Resource types R 1 , R 2 , . . ., R m CPU cycles, memory space, I/O devices • Each resource type R i  has W i  instances. Each process utilizes a resource as follows: request   use   release
Background image of page 7

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

View Full DocumentRight Arrow Icon
Fred Kuhns ( )   8 Necessary Conditions for Deadlock 1) Mutual exclusion: One process hold a resource in a non-sharable mode.  Other  processes requesting resource must wait for resource to be  released. 2) Hold-and-wait : a process must hold at least one allocated resource while  awaiting other resources (one or more) held by other  processes.
Background image of page 8
Fred Kuhns ( )   9 Necessary Conditions for Deadlock 3) No preemption : no resource can be forcibly removed from a process holding  it.  That is, resources are voluntarily released by the process  holding it. 4) Circular wait a closed chain of processes exists, such that each process  holds at least one resource needed by the next process in the  chain
Background image of page 9

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

View Full DocumentRight Arrow Icon
Fred Kuhns ( )   10 Resource-Allocation Graph A set of Vertices  V  and a set of Edges  E V  is partitioned into two types: – P = {P 1 , P 2 , …, P n }, the set consisting of all the processes in 
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 58

deadlock - Deadlock Deadlock...

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

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