Tasks, ports, threads, messages development on Mach

Interesting to read some of the background research on Mach which eventually, in part, got incorporated into the MacOS.

The critical abstraction in UNIX was the pipe. What was needed was a pipe-like concept that worked at a much more general level, allowing a broad variety of information be passed between programs. Such a system did exist using inter-process communication (IPC): A pipe-like system that would move any information between two programs, as opposed to file-like information. While many systems, including most Unices, had added various IPC implementations over the years, these were special-purpose libraries only really useful for one-off tasks.

Mach started largely as an effort to produce a cleanly-defined, UNIX-based, highly portable Accent. The result was a short list of generic concepts:

  • a “task” is a set of resources that enable “threads” to run
  • a “thread” is a single unit of code running on a processor
  • a “port” defines a secure pipe for IPC between tasks
  • “messages” are passed between tasks on ports

Leave a Reply