Re: multi-process locking
- From: Rainer Weikusat <rweikusat@xxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 00:55:30 +0200
Chris Friesen <cbf123@xxxxxxxxxxxxx> writes:
Ivan Novick wrote:
locking a shared resource between multiple processes? I have seenFrom people's experience, what do you think is the best technique for
people use the file system and even some people use a oracle DB.
This is a tricky issue to handle really well.
fcntl() (aka record locks) are automatically freed if the holding
process exits. This is both good and bad--it's good because someone
else can take the lock, it's bad because the resource could be in a
non-consistent state.
It is 'bad' when a processes crashes, leaving 'some shared ressource
in a non-consistent state'. And this badness doesn't get less bad by
forcing someone who hopefully knows about the traditional UNIX(*)
adversary to even barely robust locking schemes to intervent manually
before even detecting that the 'shared ressource is in an inconsistent
state' is possible.
.
- References:
- multi-process locking
- From: Ivan Novick
- Re: multi-process locking
- From: Chris Friesen
- multi-process locking
- Prev by Date: Re: pipes
- Next by Date: Re: pipes
- Previous by thread: Re: multi-process locking
- Index(es):