in reply to Re: Ways to sequence calls from multiple processes in thread Ways to sequence calls from multiple processes
To address your question, file locking is preferred because flock() semantics have been more portable than SysV IPC, historically, among unix-like systems. Also the system semaphore count, in some OS flavors, was set with a kernel configuration parameter, and required admin management. Filehandles were relatively cheap, in terms of allocatable resources, and can be got without bothering the SA.
However, when dealing with reasonably up to date and homogeneous systems, your answer is of course prefereable.
|