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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23896 invoked from network); 15 Dec 2022 14:02:47 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 15 Dec 2022 14:02:47 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id A7AD842380; Fri, 16 Dec 2022 00:02:38 +1000 (AEST) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) by minnie.tuhs.org (Postfix) with ESMTPS id 44C8E41C7C for ; Fri, 16 Dec 2022 00:02:26 +1000 (AEST) Received: by mcvoy.com (Postfix, from userid 3546) id 0626D35E13B; Thu, 15 Dec 2022 06:02:25 -0800 (PST) Date: Thu, 15 Dec 2022 06:02:25 -0800 From: Larry McVoy To: Bakul Shah Message-ID: <20221215140225.GB21275@mcvoy.com> References: <20221211200327.GC8801@mcvoy.com> <8F5B431B-3789-42C7-8E34-0B6A417B41CF@iitbombay.org> <4A770CCE-2BC9-4DA7-B3D7-71AF9A23F79E@iitbombay.org> <20221215025453.GY20511@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) Message-ID-Hash: EQXSPC4XGBFBPIPQ5YICS456QDMZA2NO X-Message-ID-Hash: EQXSPC4XGBFBPIPQ5YICS456QDMZA2NO X-MailFrom: lm@mcvoy.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Clever code (was Re: Re: Stdin Redirect in Cu History/Alternatives? List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I wasn't clear. There was someone who said that the copy to another address space included a context switch to the receiving process (I think that was it) that resulted in better performance. Perhaps the person who said that can elaborate. On Wed, Dec 14, 2022 at 09:36:12PM -0800, Bakul Shah wrote: > Don't see how unless they put multiple related services in the same > address space, which reduces context switching but tends toward a > monokernel (& increased coupling). Unless I am misunderstanding you. > > > On Dec 14, 2022, at 6:54 PM, Larry McVoy wrote: > > > > Wasn't there some statement that QNX dropped some of these? Copy plus > > context switch? > > > > On Wed, Dec 14, 2022 at 04:29:45PM -0800, Bakul Shah wrote: > >> On Dec 11, 2022, at 7:09 PM, Andrew Warkentin wrote: > >>> > >>> It's not necessarily true that microkernels are significantly slower. > >> > >> uKernels are usually quite fast as they do so little. What can be slow > >> is emulating a Unix like OS on top due to context switches. For instance, > >> a user process doing read() will have the following context switches: > >> > >> userProc->uK->FileSystem->uK->diskDriver->uk->FileSysem->uK->userProc > >> > >> or worse (I didn't account for a few things). Because of this even some > >> uKernels run a few critical services + drivers in the supervisor mode. > >> But overall slowdown of such a unix emulation will very much depend on the > >> workload and also what kind of performance improvements you are willing to > >> try in a complex kernel vs same services running in user mode. > >> > >> At present the linux kernel has about 31+ Million lines (accounting for > >> all architectures, filesystems, device drivers etc.). The FreeBSD 13.x > >> kernel is about 8.7M LoC (of which 44-45% are in device drivers). I only > >> counted .c and .h files. In contract FreeBSD 2.2.2 kernel has ~554K LoC. > >> This LoC growth is entirely understandable but I wonder how things may > >> have turned out in an alternate universe of uKernel based designs.... > > > > -- > > --- > > Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat -- --- Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat