next up previous contents
Next: Banker's Algorithm Up: Deadlock Previous: Deadlock   Contents

Resource-Allocation Graph [111]







\begin{picture}(296,219)(65,580)
\thicklines\put(100,680){\circle{42}}
\put(340,...
...}}}
\put(330,675){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{P3}}}
\end{picture}






Deadlock: Multiple Instance Resources [112]

DEADLOCK:


\begin{picture}(296,219)(65,580)
\thicklines\put(100,680){\circle{42}}
\put(340,...
...}}}
\put(330,675){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{P3}}}
\end{picture}

NO DEADLOCK:


\begin{picture}(296,219)(65,580)
\thicklines\put(100,680){\circle{42}}
\put(340,...
...}}}
\put(330,675){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{P3}}}
\end{picture}



Methods for Handling Deadlock [113]



Deadlock: Prevention [114]



Deadlock: Prevention [115]



Deadlock: Avoidance [116]





\begin{picture}(240,155)(80,655)
\thicklines\put( 95,745){\framebox (105,35){}}
...
...}
\put(200,680){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{safe}}}
\end{picture}



Deadlock: Example of Avoidance [117]




  maximum needs current needs
P0 10 5
P1 4 2
P2 9 2
TOTAL 23 9






  maximum needs current needs
P0 10 5
P1 4 2
P2 9 3
TOTAL 23 10





Avoidance with Single Instances [118]

SAFE:


\begin{picture}(282,219)(59,620)
\thicklines\put( 80,720){\circle{42}}
\put(320,...
...( 60,770){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{assignment}}}
\end{picture}

UNSAFE (P2 requests R2): cycle


\begin{picture}(282,219)(59,620)
\thicklines\put( 80,720){\circle{42}}
\put(320,...
...( 60,770){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{assignment}}}
\end{picture}



Deadlock: Detection [119]



Deadlock: Recovery [120]



Deadlock: Combined Approach [121]


next up previous contents
Next: Banker's Algorithm Up: Deadlock Previous: Deadlock   Contents
Ted Billard 2001-11-17