This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on deadlocks

 
Torsten M´┐Żller
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've a maybe stupid question on deadlocks.
At the moment I realized the locking-mechanism like this:
while: is record lock? -> wait
when unlocking: -> nofify all
normally this should work without deadlock, BUT: what about any client has been just turned off?
In this case the lock remains(?) and the thread won't become awake during the notifyall.
Do I have to handle such situations? There are several situations which can happen, beginning from computershutdown going to memory-failures.
I think I don't have to, what do you think?

Greetings

Torsten
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi torsten,

if you use the search-functionality, you'll find dozens of threads about this topic. opinions are pretty controversial...

i passed without taking care of dead - even worse: "dying" - clients.

to be more precise and honest: i had a watchdog implemented, but ran into too much trouble with it
- sun's restrictions about configuration-files
- complicated situations if locks can be taken out at any time (sloooow clients might just be in the middle of processing locks, when the watchdog comes into the game...)

hope this helps you out,

und viele gruesse aus Berlin,
jan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic