Aucbvax.4204 fa.unix-wizards utzoo!decvax!ucbvax!network Sat Oct 3 20:53:27 1981 at Berkeley Subject: Re: process interlocking problems in unix Via: Ucb-C70.ArpaNet; 3 Oct 81 17:43-PDT In-real-life: Steven M. Bellovin Location: University of North Carolina at Chapel Hill Phone: (919) 966-3305 If you have the multiplexor (or Bill Joy's new stuff) available, you can implement a locking process which runs the multiplexor channel. Processes wanting to lock on a resource open the lock 'file' and write a line that looks something like LOCK resource and then do a read. When it's free, the mpx driver writes back to them giving permission; others will be held pending a RELEASE line being written (or a close on the channel). There could also be a TEST line and maybe a non-blocking LOCK, which would return error status if it couldn't grant the request.