The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Larry McVoy <lm@mcvoy.com>
To: John Cowan <cowan@ccil.org>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Threads vs... not
Date: Wed, 4 Aug 2021 15:51:07 -0700	[thread overview]
Message-ID: <20210804225107.GL9074@mcvoy.com> (raw)
In-Reply-To: <CAD2gp_SAJv5N5CDEo-0Co0bqx0AU+4iJOa_ct80+ypTA7V59WQ@mail.gmail.com>

On Wed, Aug 04, 2021 at 06:41:08PM -0400, John Cowan wrote:
> On Wed, Aug 4, 2021 at 6:02 PM Larry McVoy <lm@mcvoy.com> wrote:
> 
> 
> >      A computer is a state machine. Threads are for people who can't
> > program
> >      state machines.
> >
> >      Alan Cox
> 
> 
> Orly?  Try embedding an LL(1) parser in an event loop that gives you a new
> event every time a block is read off the disk.
> 
> Event loops are just manual CPS transformations of coroutines -- but why do
> the transformation manually instead of having your compiler do it for you?

The counter to this is Solaris tried to allocate a thread for each 8K page
on it's way to disk.  The thread stack was 16K.  This model, while seen as
ever so elegant, means that 2/3rds of main memory were thread stacks.

Sometimes threads make sense, there they did not.
-- 
---
Larry McVoy            	     lm at mcvoy.com             http://www.mcvoy.com/lm 

  reply	other threads:[~2021-08-04 22:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 21:48 Lawrence Stewart
2021-08-04 22:02 ` Larry McVoy
2021-08-04 22:41   ` John Cowan
2021-08-04 22:51     ` Larry McVoy [this message]
2021-08-05 20:32       ` Clem Cole
2021-08-06  0:55       ` Dan Cross
2021-08-04 22:13 ` Anthony Martin
2021-08-05 23:02 ` Bakul Shah
2021-08-06 14:19   ` Steffen Nurpmeso
2021-08-06 14:43     ` John Cowan
2021-08-06 15:12       ` Steffen Nurpmeso

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=20210804225107.GL9074@mcvoy.com \
    --to=lm@mcvoy.com \
    --cc=cowan@ccil.org \
    --cc=tuhs@minnie.tuhs.org \
    /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).