? ??????????????Take My Breath Away? ????? ?? ???Rating: 4.4 (13 Ratings)??71 Grabs Today. 12572 Total Gra
bs. ??????Preview?? | ??Get the Code?? ?? ?????Our Hearts on Thin Ice? ????? ?? ???Rating: 5.0 (1 Rating)??52 Grabs Today. 4978 Total Grabs. ??????Preview?? | ??Get the Code?? ?? ??? BLOGGER TEMPLATES AND TWITTER BACKGROUNDS ?

Thursday, August 20, 2009

DEADLOCK

Deadlock prevention
• Attack mutual exclusion– we always want to minimize the number ofnon-sharable resources, but it is notusually possible to eliminate all of them.
• Attack the no preemption condition– cannot usually take a resource away froma process.
• Attack hold and wait
– require each process to request and beallocated all resources before it beginsexecuting
– before requesting a new resource releaseall locks on other resources and reacquire
– Problems: low resource utilization,starvation
• Attack circular wait.
– This is where most of the effort ofdeadlock prevention is focused.
– Design a hierarchy of lock acquisition suchthat there are no cycles.
– A great idea in theory, but difficult toimplement in practice because theunderlying code does not usually follow anacyclic hierarchy.

0 comments: