From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28740 invoked from network); 4 Aug 2021 22:51:31 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 4 Aug 2021 22:51:31 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 1173B9CADD; Thu, 5 Aug 2021 08:51:29 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id C75639CAA5; Thu, 5 Aug 2021 08:51:10 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id BA9639CAA5; Thu, 5 Aug 2021 08:51:08 +1000 (AEST) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) by minnie.tuhs.org (Postfix) with ESMTPS id DF6629CAA4 for ; Thu, 5 Aug 2021 08:51:07 +1000 (AEST) Received: by mcvoy.com (Postfix, from userid 3546) id 9C41435E104; Wed, 4 Aug 2021 15:51:07 -0700 (PDT) Date: Wed, 4 Aug 2021 15:51:07 -0700 From: Larry McVoy To: John Cowan Message-ID: <20210804225107.GL9074@mcvoy.com> References: <20210804220208.GK9074@mcvoy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [TUHS] Threads vs... not X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Wed, Aug 04, 2021 at 06:41:08PM -0400, John Cowan wrote: > On Wed, Aug 4, 2021 at 6:02 PM Larry McVoy 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