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, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27966 invoked from network); 15 Dec 2023 01:15:58 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 15 Dec 2023 01:15:58 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 48DF043E86; Fri, 15 Dec 2023 11:15:57 +1000 (AEST) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by minnie.tuhs.org (Postfix) with ESMTPS id B5A3743DF6 for ; Fri, 15 Dec 2023 11:15:52 +1000 (AEST) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6ce26a03d9eso69308b3a.0 for ; Thu, 14 Dec 2023 17:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20230601.gappssmtp.com; s=20230601; t=1702602952; x=1703207752; darn=tuhs.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jfuW/5Ud2IrCPbzSO/TI7FzogYttwu1oFw288w2J+gM=; b=kLLpUrA1BDM+dR549HaVICZLWcX5aZsI0n4g0ni9oiluKchJL2ABBN5wpmNjjTCEO4 kmPDUbLEEajyAHv8f8nEh5HROkTV0K4OnI/m/YBwYorre+XSty6r/jzxB3hkrkl4caEd 9ykpu569ghnmN8DHyx7EkpSoOJZzTg1G5AGF2e0TmBzDf/Kw4FLv89zcaYLqsIJXFI9s rgITxfMkpEVTJpuDuoQJ9SLCCkuF3CJfR8M2OMSWlaF1kDhYSF63s3rH/GGLGz+gBUuu vUG+A3iem5Nh/dzalu1J5GX9gl8CK87wGLfqJLdNLsZylIdMQZ4d27Vsl0enOSHODni8 BBjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702602952; x=1703207752; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jfuW/5Ud2IrCPbzSO/TI7FzogYttwu1oFw288w2J+gM=; b=AUNV34PhcTK2oRBGL3t983pLSTSWLmNLjwfAjLw4rdMDPrs9Bg1PbmfMLGzexMcHp+ rd1K9LJFnBwAb5RPFex4FAdSuFs7K5xMGZIEUEPxwREB5VkYlnSRvBCXtlWybIRiBfLS dU/h0PB0uHP8T1zJKpyg+9LGi3z6ItKDydQMyx8kAwzvbiSQfSM9hR4pc2ktAUQbngCS lbvn3/UNw6IMGG77/nz5sqhHVaGAB2Z05zIB/Pe7cG7IzsuvFZPhT2BB8UYuwk7gqflC R+Zb0+plai1/95hcEt1fmyYjCD2K2xqlhRD3J3+to28FKKnTB8ubRaolTWgnAX+EbEXm ntuQ== X-Gm-Message-State: AOJu0YyrWPL4b4koq2C2DjeQIo+huNe6WDVWIMALzX1CQHpwg6YK/PuJ /ctlXeRdV1fuVk2TPEPTTJZFj858Bt0fx7ZpI00= X-Google-Smtp-Source: AGHT+IGa34hoxaaw4oL+G/CoAvyOefzW75T5DEuvPsEcS0CTX86EJHnVluYRuQgPDLh5/Gkq8N8CHQ== X-Received: by 2002:a05:6a20:258d:b0:190:d1d2:56ff with SMTP id k13-20020a056a20258d00b00190d1d256ffmr5712282pzd.88.1702602951727; Thu, 14 Dec 2023 17:15:51 -0800 (PST) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id j4-20020a170902c08400b001d348571ccesm4301072pld.240.2023.12.14.17.15.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2023 17:15:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) From: Bakul Shah In-Reply-To: <20231214232935.802BB18C08F@mercury.lcs.mit.edu> Date: Thu, 14 Dec 2023 17:15:39 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <4416CB1B-CDE2-42DA-92F2-33284DB6093F@iitbombay.org> References: <20231214232935.802BB18C08F@mercury.lcs.mit.edu> To: Noel Chiappa X-Mailer: Apple Mail (2.3774.300.61.1.2) Message-ID-Hash: 6CVNNF5BR763MVYD4JWOMNNQAKHOTQUN X-Message-ID-Hash: 6CVNNF5BR763MVYD4JWOMNNQAKHOTQUN X-MailFrom: bakul@iitbombay.org 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: 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: On Dec 14, 2023, at 3:29=E2=80=AFPM, Noel Chiappa = wrote: >=20 >> From: Bakul Shah >=20 >> Now I'd probably call them kernel threads as they don't have a = separate >> address space. >=20 > Makes sense. One query about stacks, and blocking, there. Do kernel = threads, > in general, have per-thread stacks; so that they can block (and later = resume > exactly where they were when they blocked)? Exactly! If blocking was not required, you can do the work in an interrupt handler. If blocking is required, you can't just use the stack of a random process (while in supervisor mode) unless you are doing some work specifically on its behalf. > Interestingly, other early systems don't seem to have thought of this > structuring technique. I suspect IBM operating systems probably did use them. At least TSO must have. Once you start *accounting* (and charging) for cpu time, this idea must fall out naturally. You don't want to charge a process for kernel time used for an unrelated work! *Accounting* is an interesting thing to think about. In a microkernel where most of the work is done by user mode services, how to you keep track of time and resources used by a process (or user)? This can matter for things like latency, which may be part of your service level agreement (SLA). This should also have a bearing on modern network based services. > It makes sense to have a kernel process do this; having the page fault = code > do it just makes that code more complicated. (The code in V6 to swap > processes in and out is beautifully simple.) But it's apparently only = obvious > in retrospect (like many brilliant ideas :-). There was a race condition in V7 swapping code. Once a colleague and I spent two weeks of 16 hour debugging days! We were encrypting before swapping out and decrypting before swapping in. This changed timing = enough that the bug manifested itself (in the end about 2-3 times a day when = the system was running 5 or 6 kernel builds in parallel!). This is when I really understood "You are not expected to understand this." :-)