9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] select()
@ 2000-11-16  2:10 Stephen M Wynne
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen M Wynne @ 2000-11-16  2:10 UTC (permalink / raw)
  To: 9fans

In http://plan9.bell-labs.com/sys/doc/9.html, there's a hint that Plan 9's
design avoids some of the nastiness with select() here:

    Compare this to the UNIX select system call: select applies only
    to a restricted set of devices, legislates a style of
    multiprogramming in the kernel, does not extend across networks,
    is difficult to implement, and is hard to use.

Would someone be so kind as to elaborate? It looks like select() is
implemented very much like BSD select() in the APE.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] select()
@ 2000-11-16 22:43 Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2000-11-16 22:43 UTC (permalink / raw)
  To: 9fans

	In http://plan9.bell-labs.com/sys/doc/9.html, there's a hint that Plan 9's
	design avoids some of the nastiness with select() here:

	    Compare this to the UNIX select system call: select applies only
	    to a restricted set of devices, legislates a style of
	    multiprogramming in the kernel, does not extend across networks,
	    is difficult to implement, and is hard to use.

	Would someone be so kind as to elaborate? It looks like select() is
	implemented very much like BSD select() in the APE.

Select in the APE is implemented entirely at user level,
with no help from the kernel.  It continually calls sleep(100)
and then checks for input.  Select on most Unix systems
is a system call, which requires the kernel to do all that 
and usually more.  Further, since select requires that at most
one of the reads succeeds, it is very hard to implement once
you have file systems coming from somewhere other than
local resources (e.g., any network file system).  It also often
makes for awkward program structure.

The passage you quote is, I believe, arguing that Alef's
style of multiprogramming is a better solution than select,
not that Plan 9 makes select easier to implement.  Select is
inherently hard to implement because of its specification.
Rob argues the benefits of a precursor to the Plan 9 style
of multiprogramming more extensively in
http://plan9.bell-labs.com/cm/cs/doc/89/1-a.ps.gz.

Russ



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-16 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-16  2:10 [9fans] select() Stephen M Wynne
2000-11-16 22:43 Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).