Results of Locking Poll

Dick Dunn rcd at opus.UUCP
Fri Oct 19 16:06:22 AEST 1984


(Original only appeared in net.unix.)
> Early in June I sent out a poll on the net to ask people what they wanted
> in the way of file and/or record locking for Unix.
>...
> John Bass tells me that shared reads are hard to do under the currently
> proposed lockf mechanism (1 process per "area" in the file.  This "area"
> can extend to EOF.).  I don't yet see how this is difficult, but John
> hasn't told me what the problem is.  Note that this mechanism provides
> only all-or-nothing locks, as opposed to shared/exclusive access,

The one-process-per-area restriction seems almost by definition to preclude
shared reading.  Without shared read, it's not clear how useful the locking
could be for databases--which are the most likely major candidate.

As to the all-or-nothing aspect, I don't quite see how that can work out.
It would seem that there would be a restriction on permissions before you
can lock a file.  But with an all/nothing lock, you either
	- require write permission and deny processes which only have/need
	  read permission the right to read-lock a file to prevent
	  modification while they're reading it.
	- require only read permission and allow processes to gain
	  exclusive access to files which they don't "own" (in a colloquial
	  sense).

Doesn't sound very good.  Clarification, please?
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
   ...Lately it occurs to me what a long, strange trip it's been.



More information about the Comp.unix mailing list