by TZubiri · 1y ago · 0 comments
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".
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.