9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@caldo.demon.co.uk forsyth@caldo.demon.co.uk
Subject: [9fans] plan9 extensions
Date: Fri, 15 Aug 1997 17:22:30 +0100	[thread overview]
Message-ID: <19970815162230.94ufN6EiS-U42yGwbc9rDHPtg7S62WVCFYP2YAk3JbI@z> (raw)

>>Has Brazil (or any future development) at Lucent given any thought to this
>>matter?  Your insights and suggestions are most welcome.

BSD style readv/writev are arguably just optimisations (although they
usually boil down to a copy inside the kernel), and thus cause no
serious reasoning problems.  asynchronous i/o, like signals/notes and
those unbelievable `call back' functions, reintroduce the Interrupt,
which is bad for reasoning and certainly for the morale of subsequent
maintainers of an application.  i'd put my effort into improving the
efficiency of what is there, rather than going back to un-reasonable hacks.

it might be of interest that in Limbo/Inferno one can do something like:

input(c: chan of array of byte)
{
	for(;;){
		a := array [N] of byte;
		n := sys->read(fd, a, len a);
		if(n <= 0){
			c <-= nil;
			break;
		}
		c <-= a[0:n];	# slice to n bytes
	}
}

and some other process can do

	c := chan of array of byte;
	spawn input(c);
	while((a := <-c) != nil)
		dosomethingwith(a);

or pass a along another channel to another process, and so on,
the point being that transmission is by reference (you can get
your garbage collector to help you with this one).

Sys->file2chan is even cooler: it eliminates copying between the system
and the file server, though not between system and file client, because
that isn't safe.




             reply	other threads:[~1997-08-15 16:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-15 16:22 forsyth [this message]
1997-08-15 17:48 Dan
1997-08-15 18:39 forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19970815162230.94ufN6EiS-U42yGwbc9rDHPtg7S62WVCFYP2YAk3JbI@z \
    --to=forsyth@caldo.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).