Friday, September 30, 2005

Perfect Example 4 DEADLOCKS!

Guys, don’t take this as serious offence. Just an observation ok!
This is what I’ve been thinking when I studied OS. Ppl who DID study already know what a deadlock is. For those who didn’t:

“In a multiprogramming environment, when several processors compete for a finite amount of resources, a set of processors are set to be in a deadlock when every process in the set is waiting for an event that can be caused by only another process in the set”

4 conditions that needs to be present for a deadlock situation:

Mutual exclusion – at least one resource must be held in a non sharable mode
Hold and wait – one process must hold at least one resource and waiting to acquire resources held by other processors
No preemption – a resource can only be released voluntarily
Circular wait – processors wait in a circular manner to acquire resources


Analysis:

Processors: GUYS
Resources: GIRLS!

Now read it again.. Makes a lot of sense!!!!!!!!!!!!

3 comments:

pax said...

5th way to resolve a deadlock - kill the process ;)

LOG said...

Cool! :)

LG said...

6th way to resolve a deadlock (Albeit not the best) is to increase the amount of resources =D