[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dotlock vs Kernel lock



>What is the difference between these two lock methods, and which one would be
>considered to be most "stable"? I do also have the option to use both, but why
>would I want that?

Kernel locking relies on a flag to the open() command which tells the
krnel to reserve the file.  dot-locking relises on certain files and
special prgorams that eliminate some race conditions.

Both are stable in the sense that they work perectly fine so long as your
program works.  All that is important is that EVERY prorgam that locks a
certain file must lock it the same way,or else one program may not realize
another program has locked it. 

Unfortunately, I can think of about 5 different ways of locking a file.
Thus it is sometimes difficult to get diverse applications to interact 
correctly. Apparently, your mailer can compensate for this by locking
a file with more than one method.  This is probably a Good Idea
unles you are certain that your programs all work together.

Carl


Reply to: