Is Unix stdio slow?

Brandon S. Allbery allbery at ncoast.UUCP
Tue Oct 18 07:34:05 AEST 1988


As quoted from <104 at minya.UUCP> by jc at minya.UUCP (John Chambers):
+---------------
| > I will go as far as to say that standard output to pipes should be
| > line buffered, since we no longer put pipes in files.
| 
| BTW, on every Unix system I've ever used, a pipe is a file.  What could
| the stuff after the comma in the above quote possibly mean?  Is there a
| new implementation of pipes that doesn't use file descriptors?  I sure
| hope not; that sure would be a giant step backwards.
+---------------

He means that on V7-based systems (including SVR3), pipes are essentially
implemented in the kernel in a way that's almost identical to:

	p[1] = creat(some_temp_file, 0);
	p[1] = open(some_temp_file, 0);
	unlink(some_temp_file);

whereas under BSD pipes are linked socketpairs and under SVR4 they're
supposed to be a variant of the "clone" device (essentially, the STREAMS
version of sockets) and are implemented quite differently.

++Brandon
-- 
Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X
uunet!hal.cwru.edu!ncoast!allbery  <PREFERRED!>	    ncoast!allbery at hal.cwru.edu
allbery at skybridge.sdi.cwru.edu	      <ALSO>		   allbery at uunet.uu.net
comp.sources.misc is moving off ncoast -- please do NOT send submissions direct
  (But the aliases are NOT on UUNET yet, use the aliases at backbone sites!)



More information about the Comp.unix.wizards mailing list