From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] vfork and paging From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011002140038.18B9D1998A@mail.cse.psu.edu> Date: Tue, 2 Oct 2001 15:12:49 +0100 Topicbox-Message-UUID: fa2a77c8-eac9-11e9-9e20-41e7f4b1d025 > I always thought this made sense too. I always wondered though why Alef > had threads. And who's using the thread library? that's a good point. even when OS processes are cheap, they're still not as cheap as longjmp()... hence the thread library, presumably. it's interesting to see that despite the distinction between threads and procs in the thread library, the API is the same - the same communication and synchronisation primitives work between all of them. internally, Inferno also has the same distinction between threads and processes ("progs and kprocs"), although the distinction isn't visible at the API level. simple threads are used until a call is encountered that may block on an external event, in which case a kproc is summoned for the operation. a channel communication doesn't count as an external event, so one can write quite sophisticated multi-process programs quite cheaply. (it's a bit more awkward & error prone in C than in Limbo though as it doesn't have the language support) rog.