95 points · by emschwartz · 1y ago · 28 comments
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".
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.