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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10349 invoked from network); 14 Dec 2023 22:12:39 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 14 Dec 2023 22:12:39 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id CD39243E85; Fri, 15 Dec 2023 08:12:37 +1000 (AEST) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by minnie.tuhs.org (Postfix) with ESMTPS id 3D02D43E84 for ; Fri, 15 Dec 2023 08:12:29 +1000 (AEST) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-55114c073b8so23006a12.1 for ; Thu, 14 Dec 2023 14:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702591947; x=1703196747; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IcHor2BczFFx5+PpGBQ/SAILFV84SCrNH50AUN+rHdc=; b=MtdUd7cFoZy9eMLlDyqM/sCVnyPWfondKe4rpWZZRr5SUwLoUSeP8nuZMSBPyr+ccR mVdgbEh99xzEGeRFnVykKDr3FUJQpXKJCg8kIlmi6DWwpF8D5yHSGwYhNPbx6ir3qryJ ZKY/KAa/euk47gZeGs9Td9fqN9iEz3cXb8pfL3ZsCdQaNmwls13+Stkmdj646MQXbk/J vE6k6d/pMkMNVvXZEnnevf6ChtUQEsWvHq4czHO/nyLupV/kM5PtBkFRFw7gSpiWwwLu plZ1mwBCwvVGS2F1ddZeqBWd2n8Dqe3PteFvBSaM1Iwq+p3IIaZ8MTVY7WMLOum+7NtA SzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702591947; x=1703196747; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IcHor2BczFFx5+PpGBQ/SAILFV84SCrNH50AUN+rHdc=; b=QzeyeaginnbXO77nUQvxo1H1a2zno1Cjpt5P1PONl6zdcNs4BjWKwXs8uaFXGwPLYp mlJDbV4ifdp/i4+24veY4Wd6S9BNYg/0evS1YHaniEKUxRH4xna/3gYdWXGRv90x8Qtg BIsmOSH92ve97xpLOUOv4JrF5iULW1MZyyOn2LiJYhebdBMZiWszWmg1hG/C6gCiczxX vEnps6R2QVELj3DjboDWMRT3Asw9h5bAz5E/auL8pJEJlljZJwxmX4PUJGjrcRNdGMLL YVSkqLDLUz1/VVSWhFhDzDmNI4k2RNm6QV9WXnshKJhSTNneZR+pIQwIwphQPqwCO6B9 C2KQ== X-Gm-Message-State: AOJu0YygEzsffdJY3for2pk7r8CBRgHqvPPzPQz4w8XFzwDYA3BeAhMC mH/Zf5vf7LI3X48/cJR6imQ5GmVfbpy3Zl0FXNUDRg== X-Google-Smtp-Source: AGHT+IFNVs28rj5RFJe/D6Hc9eiZgA8sPAuuK3T34ft3amdC1Qz/auIM0SkzvpsxQ4wi2C+l3JAXNECnE8t65r/l8fE= X-Received: by 2002:a17:906:4e:b0:a23:45c:5c4 with SMTP id 14-20020a170906004e00b00a23045c05c4mr1094258ejg.151.1702591946866; Thu, 14 Dec 2023 14:12:26 -0800 (PST) MIME-Version: 1.0 References: <20231214214805.81B2618C08F@mercury.lcs.mit.edu> In-Reply-To: From: Warner Losh Date: Thu, 14 Dec 2023 15:12:15 -0700 Message-ID: To: Bakul Shah Content-Type: multipart/alternative; boundary="00000000000030d2f2060c7f942f" Message-ID-Hash: ORXB3HZYNO6XBOSVHEEZYI2D5E7UI5YS X-Message-ID-Hash: ORXB3HZYNO6XBOSVHEEZYI2D5E7UI5YS X-MailFrom: wlosh@bsdimp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: jnc@mercury.lcs.mit.edu, coff@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Terminology query - 'system process'? List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --00000000000030d2f2060c7f942f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When shutting down, FreeBSD refers to them as: kern/kern_shutdown.c: printf("Waiting (max %d seconds) for system process `%s' to stop... ", kern/kern_shutdown.c: printf("Waiting (max %d seconds) for system thread `%s' to stop... ", However, a number of places, including the swap daemon, still refer to things as this daemon or that daemon (page demon being top of the list, but there's the buf daemon, the vmdaemon that handles swapping (as opposed to paging), the update daemon, etc. Warner On Thu, Dec 14, 2023 at 3:06=E2=80=AFPM Bakul Shah wr= ote: > I remember calling them kernel processes as they had no code running in > user mode. Not sure now of the year but sometime in =E2=80=9880s. Now I= =E2=80=99d probably > call them kernel threads as they don=E2=80=99t have a separate address sp= ace. > > > On Dec 14, 2023, at 1:48 PM, jnc@mercury.lcs.mit.edu wrote: > > > > =EF=BB=BFSo Lars Brinkhoff and I were chatting about daemons: > > > > https://gunkies.org/wiki/Talk:Daemon > > > > and I pointed out that in addition to 'standard' daemons (e.g. the > printer > > spooler daemon, email daemon, etc, etc) there are some other things tha= t > are > > daemon-like, but are fundamentally different in major ways (explained > later > > below). I dubbed them 'system processes', but I'm wondering if ayone > knows if > > there is a standard term for them? (Or, failing that, if they have a > > suggestion for a better name?) > > > > > > Early UNIX is one of the first systems to have one (process 0, the > "scheduling (swapping) > > process"), but the CACM "The UNIX Time-Sharing System" paper: > > > > https://people.eecs.berkeley.edu/~brewer/cs262/unix.pdf > > > > doesn't even mention it, so no guidance there. Berkeley UNIX also has > one, > > mentioned in "Design and Implementation of the Berkeley Virtual Memory > > Extensions to the UNIX Operating System": > > > > http://roguelife.org/~fujita/COOKIES/HISTORY/3BSD/design.pdf > > > > where it is called the "pageout daemon".("During system initialization, > just > > before the init process is created, the bootstrapping code creates > process 2 > > which is known as the pageout daemon. It is this process that .. writ[e= s] > > back modified pages. The process leaves its normal dormant state upon > being > > waken up due to the memory free list size dropping below an upper > > threshold.") However, I think there are good reasons to dis-favour the > term > > 'daemon' for them. > > > > > > For one thing, typical daemons look (to the kernel) just like 'normal' > > processes: their object code is kept in a file, and is loaded into the > > daemon's process when it starts, using the same mechanism that 'normal' > > processes use for loading their code; daemons are often started long > after > > the kernel itself is started, and there is usually not a special > mechanism in > > the kernel to start daemons (on early UNIXes, /etc/rc is run by the > 'init' > > process, not the kernel); daemons interact with the kernel through syst= em > > calls, just like 'ordinary' processes; the daemon's process runs in > 'user' > > CPU mode (using the same standard memory mapping mechanisms, just like > > blah-blah). > > > > 'System processes' do none of these things: their object code is linked > into > > the monolithic kernel, and is thus loaded by the bootstrap; the kernel > > contains special provision for starting the system process, which start > as > > the kernel is starting; they don't do system calls, just call kernel > routines > > directly; they run in kernel mode, using the same memory mapping as the > > kernel itself; etc, etc. > > > > Another important point is that system processes are highly intertwined > with > > the operation of the kernel; without the system process(es) operating > > correctly, the operation of the system will quickly grind to a halt. Th= e > loss > > of ordinary' daemons is usually not fatal; if the email daemon dies, th= e > > system will keep running indefinitely. Not so, for the swapping process= , > or > > the pageout daemon > > > > > > Anyway, is there a standard term for these things? If not, a better nam= e > than > > 'system process'? > > > > Noel > --00000000000030d2f2060c7f942f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When shutting down, FreeBSD refers=C2=A0to them as:
ke= rn/kern_shutdown.c: printf("Waiting (max %d seconds) for system proces= s `%s' to stop... ",
kern/kern_shutdown.c: printf("Waiting= (max %d seconds) for system thread `%s' to stop... ",

However, a number of places, including the swap daemon, s= till refer to things as this daemon
or that daemon (page demon be= ing top of the list, but there's the buf daemon, the vmdaemon
that handles swapping (as opposed to paging), the update daemon, etc.

Warner

On Thu, Dec 14, 2023 at 3:06=E2=80=AFPM Ba= kul Shah <bakul@iitbombay.org= > wrote:
I re= member calling them kernel processes as they had no code running in user mo= de. Not sure now of the year but sometime in =E2=80=9880s. Now I=E2=80=99d = probably call them kernel threads as they don=E2=80=99t have a separate add= ress space.

> On Dec 14, 2023, at 1:48 PM, jnc@mercury.lcs.mit.edu wrote:
>
> =EF=BB=BFSo Lars Brinkhoff and I were chatting about daemons:
>
>=C2=A0 https://gunkies.org/wiki/Talk:Daemon
>
> and I pointed out that in addition to 'standard' daemons (e.g.= the printer
> spooler daemon, email daemon, etc, etc) there are some other things th= at are
> daemon-like, but are fundamentally different in major ways (explained = later
> below). I dubbed them 'system processes', but I'm wonderin= g if ayone knows if
> there is a standard term for them? (Or, failing that, if they have a > suggestion for a better name?)
>
>
> Early UNIX is one of the first systems to have one (process 0, the &qu= ot;scheduling (swapping)
> process"), but the CACM "The UNIX Time-Sharing System" = paper:
>
>=C2=A0 https://people.eecs.berkeley.edu/~= brewer/cs262/unix.pdf
>
> doesn't even mention it, so no guidance there. Berkeley UNIX also = has one,
> mentioned in "Design and Implementation of the Berkeley Virtual M= emory
> Extensions to the UNIX Operating System":
>
>=C2=A0 http://roguelife.org/~fujita/= COOKIES/HISTORY/3BSD/design.pdf
>
> where it is called the "pageout daemon".("During system= initialization, just
> before the init process is created, the bootstrapping code creates pro= cess 2
> which is known as the pageout daemon. It is this process that .. writ[= es]
> back modified pages. The process leaves its normal dormant state upon = being
> waken up due to the memory free list size dropping below an upper
> threshold.") However, I think there are good reasons to dis-favou= r the term
> 'daemon' for them.
>
>
> For one thing, typical daemons look (to the kernel) just like 'nor= mal'
> processes: their object code is kept in a file, and is loaded into the=
> daemon's process when it starts, using the same mechanism that = 9;normal'
> processes use for loading their code; daemons are often started long a= fter
> the kernel itself is started, and there is usually not a special mecha= nism in
> the kernel to start daemons (on early UNIXes, /etc/rc is run by the &#= 39;init'
> process, not the kernel); daemons interact with the kernel through sys= tem
> calls, just like 'ordinary' processes; the daemon's proces= s runs in 'user'
> CPU mode (using the same standard memory mapping mechanisms, just like=
> blah-blah).
>
> 'System processes' do none of these things: their object code = is linked into
> the monolithic kernel, and is thus loaded by the bootstrap; the kernel=
> contains special provision for starting the system process, which star= t as
> the kernel is starting; they don't do system calls, just call kern= el routines
> directly; they run in kernel mode, using the same memory mapping as th= e
> kernel itself; etc, etc.
>
> Another important point is that system processes are highly intertwine= d with
> the operation of the kernel; without the system process(es) operating<= br> > correctly, the operation of the system will quickly grind to a halt. T= he loss
> of ordinary' daemons is usually not fatal; if the email daemon die= s, the
> system will keep running indefinitely. Not so, for the swapping proces= s, or
> the pageout daemon
>
>
> Anyway, is there a standard term for these things? If not, a better na= me than
> 'system process'?
>
>=C2=A0 =C2=A0 Noel
--00000000000030d2f2060c7f942f--