"A meek endeavor to the triumph" by Sampath Jayarathna

Thursday, May 29, 2008

Deadlock - Not from Software Engineering or DBMS

This is a nice example for a Deadlock. The definition is not from the computer world, but worth to read and have a good laugh.


A Perfect Dead Lock Example...

Boss said to secretary: For a week we will go abroad, so make arrangement.Secretary make call to Husband: For a week my boss and I will be going abroad, you look after yourself.Husband make call to secret lover: My wife is going abroad for a week, so lets spend the week together.Secret lover make call to small boy whom she is giving private tuition: I have work for a week, so you need not come for class.Small boy make call to his grandfather: Grandpa, for a week I don't have class 'coz my teacher is busy. Let's spend the week together.Grandpa(the 1st boss ;) ) make call to his secretary: This week I am spending my time with my grandson. We cannot attend that meeting.Secretary make call to her husband: This week my boss has some work, we canceled our trip.Husband make call to secret lover: We cannot spend this week together, my wife has canceled her trip.Secret lover make call to small boy whom she is giving private tuition: This week we will have class as usual.Small boy make call to his grandfather: Grandpa, my teacher said this week I have to attend class. Sorry I can't give you company.Grandpa make call to his secretary: Don't worry this week we will attend that meeting, so make arrangement .
This is called a DEADLOCK

2 comments:

Pramith said...

This is not a deadlock. It's an infinite loop. Thought it's a very interesting story :)

sampath said...

Oky........

Deadlock
A deadlock is a situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does.

Infinie Loop
An infinite loop is a sequence of instructions in a computer program which loops endlessly.