VMS vs. UNIX file system

Peter da Silva peter at ficc.uu.net
Thu Sep 22 06:48:02 AEST 1988


In article <10105 at eddie.MIT.EDU>, jbs at fenchurch.MIT.EDU (Jeff Siegal) writes:
> I think a more fundamental advantage of the VMS I/O system is that
> QIO's can be queued to execute asynchronously (similarly for RMS
> operations).  An AST (software trap) is delivered to your process when
> the I/O completes.  The AST tells you which I/O operation completed,
> and the error status.

I really really wish UNIX supported this. At home I use AmigaDOS, and
it lets you do the moral equivalent:

	Issue a write by sending a message to the file's handler task.
	Do something else.
	Either:
		get a software interrupt when the I/O completes,
	or:
		wait on a signal bit (event flag, for DEC types).

Since every outstanding I/O has a signal bit, you can always wait for
whatever combination of events you want.

There's nothing in the UNIX file model that should prevent this, and
in fact the signal bit for a FD could be the FD.

	printf("Hit any key to abort.\n");
	if(aread(0, &ch, 1) && aread(fd, addr, nbytes)) {
		bitmap_t bits = (1<<fd)|(1<<0);
		bits=await(bits);
		if( (bits & (1<fd)) == 0) {
			printf("Aborted");
			akill(fd);
		}
		if( (bits & (1<0)) != 0)
			akill(0);
	}

Oh well, something else to put on the list of "what I'd do if I was
in charge of UNIX", along with things like mapping arbitrary files
into memory and cleaning up the ioctl/fcntl mess...
-- 
Peter da Silva  `-_-'  Ferranti International Controls Corporation.
"Have you hugged  U  your wolf today?"            peter at ficc.uu.net



More information about the Comp.unix.wizards mailing list