A brief history of threads and threading
eclecticlight.co
eclecticlight.co
As far as I know, the first operating system to have threads was UNIVAC 1108 EXEC 8, first released in 1966.[1] They were called "activities". A program launched with one activity, and could start others with a FORK call. There were locks, with hardware support for an atomic Test and Set instruction. Activities had priorities, and there was a good scheduler. Threads exited with an EXIT call, and when the last thread exited, so did the program. No main thread. There were timed waits, explicit waits for an event, and even async I/O with callbacks. Multiprocessors were supported. In 1966.
It's still in use, as OS/2200. [2]
[1] https://ia803206.us.archive.org/11/items/bitsavers_univac110...
[2] https://www.unisys.com/siteassets/collateral/pi-sheet/pi-060...
Here's Dijkstra's P and V, implemented for EXEC 8 by John Walker, who later wrote AutoCAD. These are user space primitives built on top of the OS primitives ACT$ and DACT$. This is part of an application called FANG, an overdesigned utility for doing various copies with as much parallelism as possible.
I once modified a Pascal compiler for that system to support multi-threading. I could get about a hundred activities going.
The main difference from threads today is that there's no concept of a stack. There can be a heap allocator, and you can save state, but the whole concept of a stack is absent.
edit: Just to be clear, "thread" is itself also just one of many names for the general concept. Task, Activity, Actor, etc. may be used, but they might also refer to something completely different. It is really a question of checking that the properties of the named thing match the properties of the standard definition of a "thread".
Now That I am second guessing myself I am not even sure about openbsd, My assumption is mainly based on the manual for pthread "This 1-to-1 implementation of the pthreads API initially appeared in OpenBSD 3.9 under the name “librthread” as an alternative to the pure-userspace (N-to-1) implementation. In OpenBSD 5.2 it became the default implementation and was renamed to libpthread." and some half remembered discussion on the lists about adding shared memory flags to the kernel process structure.
By the time UNIX/Linux got threads, nobody knew that it had been done twenty years previous, and we had to go through a large number of design mistakes, mostly involving signals.
> and we had to go through a large number of design mistakes, mostly involving signals.
Eh, Unix signals themselves were a bit of a design mistake, especially SIGPIPE (which was a byproduct of the lack of error checking in Unix programs). The reality is that Unix was too simple an OS, but the reality too is that that simplicity was the key to its success.
Exactly: How Precision Engineers Created the Modern World
https://www.amazon.co.uk/Exactly-Precision-Engineers-Created...
Does anyone remember?
AFAIK the first multiprocessor Power Mac was the 9500/180MP, with two 604e.