Article View: comp.lang.c++
Article #466Re: Threads and processes (Re: “The end of software secrecy is almost upon)
From: Lawrence D’Oliveiro
Date: Tue, 27 Oct 2026 06:08
Date: Tue, 27 Oct 2026 06:08
45 lines
3520 bytes
3520 bytes
On Mon, 26 Oct 2026 19:14:57 -0700, Lars Poulsen wrote: > Processes are almost self-contained virtual machines. Unix has one > of the cleanest implementations around, and the fork() system call > combined with copy-on-write is very elegant. None of the other > operating system I have worked with have anything remotely like it. > VMS was also quite elegant, but so different that I think it would > be impossible to simulate one on the other (in either direction). Remember that copy-on-write was a later addition. Early Unix systems had much more primitive memory management than VMS. But they did catch up. VMS had this odd distinction between “subprocesses” and “detached processes”. You didn’t need special privilege to create the former (though it was limited by a process quota), but you did for the latter. And there were the idiosyncrasies of the “UIC” business, which were a hangover from RSX-11. Why were login processes initially created under a UIC of [10,40]? (In octal, no less.) The one clever thing about VMS that I miss most on Linux systems was the terminal driver. The functionality of that was a wonder to behold. > Threads are much simpler. Multiple strands of execution in a shared > address space. All the language needs to do is provide one shared > vocabulary to allow code portability. There are some gotchas. Threads can be a notorious source of hard-to-find bugs. Note how the POSIX spec defines “cancellation points”, which are a detailed list of system service/userland API calls where the thread could potentially get force-terminated on request from another process thread, as opposed to having it happen at any time. > To me it is obvious that threads can and should be standardized, while > processes are generally not portable. What about a system like Linux, where the two are really just points on a spectrum of possibilities? <https://manpages.debian.org/clone(2)> is the underlying common kernel call that is used to implement both fork(2) and pthread_create(3) on Linux.
Technical Details
Message-ID:
<11bpf5q$183t8$3@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11amvre$15far$1@dont-email.me> <11baun8$29v7a$1@dont-email.me> <11bb04l$68pg$1@dont-email.me> <11bb1da$qfn9$1@dont-email.me> <11bb26i$1qs$1@reader2.panix.com> <11bd7rg$2cvfs$1@dont-email.me> <11bp1f3$15adn$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Lawrence D’Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.fortran,comp.lang.c++,alt.folklore.computers Subject: Re: Threads and processes (Re: “The end of software secrecy is almost upon) Date: Tue, 27 Oct 2026 06:08:59 -0000 (UTC) Organization: A noiseless patient Spider Lines: 45 Message-ID: <11bpf5q$183t8$3@dont-email.me> References: <11amvre$15far$1@dont-email.me> <11baun8$29v7a$1@dont-email.me> <11bb04l$68pg$1@dont-email.me> <11bb1da$qfn9$1@dont-email.me> <11bb26i$1qs$1@reader2.panix.com> <11bd7rg$2cvfs$1@dont-email.me> <11bp1f3$15adn$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 27 Oct 2026 06:09:00 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1314728"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+psrDaVh8f2AiWHk1qs5KQ"; posting-host="49efa5338189dbe78cf40e7b66bd0c1b" User-Agent: Pan/0.165 (Kostiantynivka) Cancel-Lock: sha1:Dm8hqcBPhnfpx/li7aGt0kbTUNY= sha256:u6RpxerIvqV/ImvrC8voDHVfSiTdKjzWmbzG9xM7E2I= sha1:9BWWzXa4bwTEdbX+5GVFQY42jUw= sha256:2SnfTU10wradS+v/MtR+XpGAYLw9ieh/126ed2OIZFs=