From owner-freebsd-hackers Fri Mar 5 15: 4:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 6622814CC4 for ; Fri, 5 Mar 1999 15:04:29 -0800 (PST) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id QAA25177; Fri, 5 Mar 1999 16:04:11 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp01.primenet.com, id smtpd025104; Fri Mar 5 16:04:05 1999 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id QAA05576; Fri, 5 Mar 1999 16:03:49 -0700 (MST) From: Terry Lambert Message-Id: <199903052303.QAA05576@usr06.primenet.com> Subject: Re: lockf and kernel threads To: hasty@rah.star-gate.com (Amancio Hasty) Date: Fri, 5 Mar 1999 23:03:48 +0000 (GMT) Cc: tlambert@primenet.com, dyson@iquest.net, dick@tar.com, jplevyak@inktomi.com, hackers@FreeBSD.ORG In-Reply-To: <199903051829.KAA82072@rah.star-gate.com> from "Amancio Hasty" at Mar 5, 99 10:29:54 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I think that completion functions are less useful than select type > > functions. For VMS, this would be SYS$WAITEFLOR, which waits for > > an event flag to be set by an AST callback into event-flag-setting > > code. > > > > You have to use a "wait for completion" interface of some kind if > > you intend to implement threads, since, the wait is the top of the > > call conversion scheduler pyramid. > > You have a good point however wouldn't prioritized ASTs be able to accomplish > same thing? Actually, yes. Practically, though, even though select(2) can be used to implement I/O stream multiplexing, when use in combination with a finite state automaton, most programmers have a hard time getting their heads around non-procedural problem decomposition. Just like threads allow programmers to program linearly, making them popular even when they aren't strictly necessary (e.g. all non-SMP OS's, and many SMP OS's with poor architectures), I think that most programmers would find the non-linearity of AST priority juggling difficult to wrap their heads around. It's not that it's not possible, it's just that there are so few people who could program effectively in that model. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message