Shared Memory in BSD4.3 is lacking?

Don Speck mangler at cit-vax.Caltech.Edu
Sun Mar 20 18:50:17 AEST 1988


In article <12136 at brl-adm.ARPA>, rbj at icst-cmr.arpa (Root Boy Jim) writes:
>					    I tend to think of using
> select on tty's or sockets (pipes), but do they work on regular files
> as well?  What if the file pointer is at EOF? And then what if someone
> appends to the file? What about tape drives?

On disk and tape, select() returns success immediately.

What ought to happen instead is that select() on a disk file
should pause until the buffer cache contains the block that
would be needed to satisfy a read at the current file pointer.
This may involve queuing a block I/O request, or just waiting
for a read-ahead to finish.  Making this work properly at EOF
would certainly make "tail -f" more efficient!

In the same vein, select() on a raw disk would initiate a seek,
allowing a certain amount of asynchronous I/O.

Similarly, select() on a tape drive ought to pause until the
tape is positioned for I/O and not moving (and certainly not
rewinding).

Don Speck   speck at vlsi.caltech.edu  {amdahl,ames!elroy}!cit-vax!speck



More information about the Comp.unix.wizards mailing list