| |
Subscribe / Log in / New account

Brian Kernighan on the origins of Unix

We're bad at marketing

We can admit it, marketing is not our strong suit. Our strength is writing the kind of articles that developers, administrators, and free-software supporters depend on to know what is going on in the Linux world. Please subscribe today to help us keep doing that, and so we don’t have to get good at marketing.

By Jonathan Corbet
January 17, 2022

LCA
Once again, the COVID pandemic has forced linux.conf.au to go virtual, thus depriving your editor of a couple of 24-hour, economy-class, middle-seat experiences. This naturally leads to a set of mixed feelings. LCA has always put a priority on interesting keynote talks, and that has carried over into the online event; the opening keynote for LCA 2022 was given by Brian Kernighan. Despite being seen as a founder of our community, Kernighan is rarely seen at Linux events; he used his LCA keynote to reminisce for a while on where Unix came from and what its legacy is.

He began by introducing Bell Labs, which was formed by US telecommunications giant AT&T to carry out research on how to improve telephone services. A lot of inventions came out of Bell Labs, including the transistor, the laser, and fiber optics. Such was the concentration of talent there that, at one point, Claude Shannon and Richard Hamming shared an office. Kernighan joined Bell Labs in 1967, when there were about 25 people engaged in computer-science research.

Early on, Bell Labs joined up with MIT and General Electric to work on a time-sharing operating system known as Multics. As one might have predicted, the attempted collaboration between a research lab, a university, and a profit-making company did not work all that well; Multics slipped later and later, and Bell Labs eventually pulled out of the project. That left two researchers who had been working on Multics — Ken Thompson and Dennis Ritchie — without a project to work on.

After searching for a machine to work on, Thompson eventually found an old PDP-7, which was already obsolete at that time, to do some work on filesystem design. The first Unix-like system was, in essence, a test harness to measure filesystem throughput. But he and Ritchie later concluded that it was something close to the sort of timesharing system they had been trying to build before. This system helped them to convince the lab to buy them a PDP-11/20 for further development. [Brian Kernighan] The initial plan was to create a system for document processing, with an initial focus of, inevitably, preparing patent applications. The result was "recognizably Unix" and was used to get real work done.

The first Unix versions were entirely done in assembly, but the Multics project had shown that higher-level languages could be used for operating-system development. Starting with the BCPL language used there, Thompson pared it down to a language called B; Ritchie then added niceties like a type system, creating C. The C language hit a "sweet spot" in language design that has proved hard for anybody else to hit since, Kernighan said.

The advent of C brought the development of a wide range of system tools, perhaps the most important of which was Steve Johnson's portable C compiler, which made the operating system itself portable. Around this time pipes were added as well. That was the genesis of one of the core Unix ideas: write small tools that can be combined to solve complicated problems.

Sixth-edition Unix, released in 1975, was the first widely used version of the operating system. It included a number of other core Unix concepts, including the hierarchical filesystem, devices represented as files, a programmable shell, regular expressions, and more. All of this was implemented in about 9,000 lines of C code. The system was small and comprehensible, which led to a lot of interesting things, including the highly influential Lions' Commentary on Unix.

The 1980s were the golden age of Unix, Kernighan said. Unix was everywhere and widely respected. Thompson and Ritchie were given the Turing Award for their work. The absolute peak, he said, was when Unix appeared in the film Jurassic Park. But then the fight between AT&T and Berkeley began, leading to a pointless lawsuit, and the beginning of the fragmentation of the system.

In 1991, Linus Torvalds announced his work on Linux, and "the rest is history".

Kernighan moved into his conclusion by asking what the technical legacy of Unix is. Some significant pieces of that legacy, including the hierarchical filesystem, use of high-level languages, and the programmable shell, have their origins in Multics. Others, including pipes, the whole tools concept, and regular expressions, are a direct result of the Unix work. And most importantly, he said, was that Unix brought a new philosophy on how to create software.

Almost all of this was in place by 1975 and, he said, it may well be true that there have been no great insights into operating-system design since. Certainly Unix has seen a lot of additions, including networking, multiprocessor support, graphical interfaces, Unicode, and more. But it's all built on the foundation created nearly 50 years ago.

The creation of Unix was the result of an accidental combination of factors, starting with the juxtaposition of two exceptionally creative people "with good taste". Kernighan gave a lot of credit to "benign management" at Bell Labs that allowed this work to go forward, naming Doug McIlroy in particular. It was also spurred by the arrival of cheap hardware (in which category he included the $50,000 PDP-11 used to develop the system early on). But a key part was the Bell Labs working environment, which included stable funding and a long-term view, which is something that is hard to find today.

Could something like Unix happen again? There are plenty of talented people around now, he said, and good management does exist. Hardware has never been cheaper, and most of the software is free. But, he said, good environments for the creation of this kind of work are hard to find. Even so, he concluded, think of all the great things that began with one or two people and a good idea; that can certainly happen again. Ritchie once said that Unix was created to provide a community where interesting things could happen; we should try to create such a community again.

In your editor's opinion, Kernighan missed an opportunity to evaluate the free-software community in these terms. Companies may not have long time horizons, but many free-software projects do. It is, still, a place where people with good ideas can come together and see where those ideas lead. It would have been good to hear his thoughts on whether the free-software community has become that place where interesting things can happen and, if not, what we should seek to change to get there.

[The video of this talk is available on YouTube.]

Index entries for this article
Conferencelinux.conf.au/2022


Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 16:23 UTC (Mon) by NightMonkey (subscriber, #23051) [Link] (1 responses)

"In your editor's opinion, Kernighan missed an opportunity to evaluate the free-software community in these terms. Companies may not have long time horizons, but many free-software projects do. It is, still, a place where people with good ideas can come together and see where those ideas lead. It would have been good to hear his thoughts on whether the free-software community has become that place where interesting things can happen and, if not, what we should seek to change to get there."

I agree. Hmm.... could our coach-class-loving Editor perhaps reach out to Mr. Kernighan for a guest article? :) Or even a video interview of Mr. Kernighan?

Thank you for a very nice summary.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 16:20 UTC (Tue) by ballombe (subscriber, #9523) [Link]

UNIX/POSIX was instrumental to the free software movement. POSIX provided interface definition that allowed independent developers to write operating system code and userspace code that worked together without requiring too much coordination.
The ability to work in parallel was crucial to the growth the free software.

Creating a new operating system paradigm from scratch that is not a UNIX copycat require a different mindset.

Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 18:51 UTC (Mon) by logang (subscriber, #127618) [Link] (1 responses)

> Could something like Unix happen again?

I agree that there's plenty of talent and business incentives to do it again, but I think the unmentioned missing factor is complexity. These days, there are so many open source projects that have tens of millions of lines of code, it's hard to believe that two people could sit down and in a short time come up with something that can compete with any of it. It's hard to even fathom an operating system that is only 9000 lines of code in today's world.

Today's talented engineers and developers all have to make do with incremental improvement projects. Though, that's probably been true for most of history and such improvements often are less known and less appreciated than they deserve to be. Planet Money[1] recently made the point that small incremental improvements to the humble nail eventually radically changed the way construction was done throughout the world.

[1] https://www.npr.org/2022/01/12/1072557499/what-nails-can-...

Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 23:38 UTC (Mon) by mtaht (subscriber, #11087) [Link]

I dream of "stable funding and a long-term view".

Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 19:21 UTC (Mon) by davidbody (subscriber, #123829) [Link] (2 responses)

Kernighan has also published a book "Unix: A History and Memoir" which goes into all of this in more detail and includes lots of interesting photos.

www.kernighan.com

It's an interesting read.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 12:01 UTC (Wed) by cyperpunks (subscriber, #39406) [Link]

Indeed, a very nice read. Thanks to Brian for that gem!

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 15:24 UTC (Fri) by gwolf (subscriber, #14632) [Link]

Indeed, that book was my favorite 2020 read. Much recommended!

Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 20:50 UTC (Mon) by MattBBaker (guest, #28651) [Link] (48 responses)

I feel that the question of "Could Unix happen again?" is a bit misleading. Unix, the solution to having multiple user share a computer, was solved. Today's problem is very different. It feels like today's problems are best described as, "Von Neumann Nightmare". We don't have 'a' control with 'a' core memory and 'a' arithmetic logic unit and IO ports hanging off. NVIDIA already mad a network card with a bootable general purpose Linux OS on it. It looks like hard drives are going the same way if ARM has anything to say about it.
The next 'UNIX' will be multiple users sharing a network of machines. It feels like Plan9 took a stab at this, with the wrong abstraction at the wrong time.

Brian Kernighan on the origins of Unix

Posted Jan 17, 2022 22:00 UTC (Mon) by NYKevin (subscriber, #129325) [Link] (33 responses)

IMHO the problem right now is that containerization is too complicated and difficult, or else it requires too much manual work. So either you spend a lot of time figuring out how to persuade k8s (or a similar tool) to do the exact combination of things that you want, or else you use lower-level abstractions like Docker and cgroups, but have to orchestrate everything by hand or with clumsy shell scripts and the like. I would really like to see a system that hits the containerization sweet spot, where I can just tell it "here's a pile of machines, here's a pile of containers, now schedule the containers onto the machines" and have it behave correctly (or mostly correctly) without having to spend more than a minute or two configuring things or thinking about all of the moving parts of a given system (see e.g. https://kubernetes.io/docs/reference/glossary/?fundamenta...).

Disclaimer: I work for Google, and while they would probably *like* me to tell you that we have already gotten to that point with GCP, I'm not 100% convinced that we're fully there yet.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 0:37 UTC (Tue) by mathstuf (subscriber, #69389) [Link]

I found that the "middle" was missing a few years ago. You either had plain Docker with manual wiring up of things or k8s with its many-headed assumptions that is just too much for my "I have 8 containers I want to use for isolation purposes". docker-compose was an unfortunate in-between that didn't do any DNS or such between containers leaving me to guess how they were intended to communicate with each other (maybe it allowed for `podman pod`-style networks, but it wasn't what I wanted at the time). I then tried systemd-networkd, but it also didn't do automatic DNS stuff, so intercommunication wasn't happening. Eventually I landed on `podman pod` which seems to do the trick where all the containers share a network and just communicate over "localhost" ports and also having decent systemd integration (logs and unit files). `machinectl` integration would be nice too, but having a working deployment is more useful at this point (now that I have a baseline).

Basically, the "one pet that hosts a ranch of cattle" versus some IaaS-based monstrosity that is just not worth my time for what I need.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 5:55 UTC (Tue) by zdzichu (subscriber, #17118) [Link] (29 responses)

Have you seen Hashicorp's Nomad?

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 7:47 UTC (Tue) by NYKevin (subscriber, #129325) [Link] (28 responses)

The problem here is not (necessarily) that the tools don't exist, it is that none of them are as ubiquitous and widely-supported as Unix. I want containerization to be a Solved Problem™, in the same way that multi-user operating systems are a Solved Problem™, and right now it feels like we're still in the "everybody is throwing things at the wall to see what sticks" phase.

(Sure, at the low level, Linux-based systems have mostly standardized on "everything is a frontend to cgroups," but orchestration is an entirely different story. There's no single standard way of describing a bunch of generic containers, or machines, their associated resource requirements and constraints, etc., much less a standard piece of software that will take those constraints and schedule your containers for you. As I mentioned, you *can* do this stuff with k8s, but nobody regards k8s as The One True Container Solution in the same way that Unix is The One True Operating System.)

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 8:52 UTC (Tue) by nim-nim (subscriber, #34454) [Link]

It’s not a technical problem it’s an organisational/funding problem.

All those new tools are proposed by organisations that do not want to contribute to existing distribution networks, but are unable to set up alternatives (because that’s hard and expensive).

When everyone will be fed up with the current mess things will consolidate violently (like they did at the end of the unix wars, with most of the companies that had refused team play on the losing side).

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 15:36 UTC (Tue) by epa (subscriber, #39769) [Link] (7 responses)

Multi-user systems are not a solved problem. If they were, there would hardly be any need for containers. Most container setups work around the inherently single-user setup of typical Linux distributions or Microsoft Windows.

In theory each user can have an independent set of software, sharing only the kernel; in practice it's damned awkward to run your own software stack from your home directory, and there aren't package management tools to make it easy.

In theory each user can have their own share of CPU time and I/O budget; in practice it's far too easy for one user to take more than their fair share, or to bust global limits with fork bombs and the like.

Users and permissions are themselves not per-user; there's a single global set of users and groups and it does not nest. You can have subdirectories in the file system but you can't have sub-accounts under your user account or make your own groups. It all has to go through a single global administrator. A true multi-user system would let you manage your own permissions within your space and delegate to sub-users.

Can you set up a multiuser Linux system where each user gets their own IP address, so they can run their own httpd on port 80 serving that address, and not interfere with other users? I am sure it's possible with enough hackery, but it's far from being straightforward or manageable.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 17:07 UTC (Wed) by dgm (subscriber, #49227) [Link] (6 responses)

The moment you have per-user everything (programs, libraries, permissions, filesystems, network, ...) what you have is, in essence, a per-user kernel. I think that the best solution for running per-user kernels are good 'ol Virtual Machines (in the VirtualBox sense), so it is a solved problem indeed.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 19:55 UTC (Wed) by epa (subscriber, #39769) [Link] (4 responses)

If you don't want the users to communicate with each other (except over network links) then yes. You give each user their own system, whether by physical hardware or a virtual machine. My vision of a multi-user system is that it has the properties I mentioned, but at the same time you can communicate between users in the lightweight way you do on a current Linux system, provided you've granted permission. The multi-user interface provided by a set of virtual machines is pretty basic, because usually the only way for them to communicate is via TCP/IP.

We have approximations such as sandboxes used by web browsers to isolate one tab from another. Again, I see those as a kind of workaround or a hazy approximation to the right answer: creating a new user on the fly for each tab, giving it its own memory and CPU budget, and then communicating via signals, Unix domain sockets, or a shared filesystem. But yeah, talk is cheap. The point I want to make is that if it's considered a solved problem, that may be because we're too used to the limitations of the current systems. Before git, software version control might have been seen as a solved problem by some.

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 11:16 UTC (Thu) by farnz (subscriber, #17727) [Link] (2 responses)

The other thing that would be nice to solve that VMs don't is good resource utilization; a VM's memory allocation is hard to vary dynamically based on overall system load, as is its filesystem size. The only host resource that's demand-shared in a VM setup is CPU.

It would be nice if we didn't have to preallocate resources to processes, but instead could rely on the system sharing all resources fairly and reasonably for the use cases in question. That's a hard problem, but it's one that (e.g.) filesystem quotas and cgroups aim to solve for containerized systems.

Brian Kernighan on the origins of Unix

Posted Jan 28, 2022 6:05 UTC (Fri) by wahern (subscriber, #37304) [Link] (1 responses)

cgroups doesn't solve the memory sharing problem any better, though admittedly VMs do currently compound the problem. virtio-balloon, which is widely supported (including by typical Linux hosts and guests) permits a guest to return memory (e.g. filesystem buffer caches) to the host. The problem (AFAIU) is that currently there's no implementation on either side (host or guest) that communicates memory pressure back-and-forth, opportunistically shifting memory around. See defunct auto-ballooning project at https://www.linux-kvm.org/page/Projects/auto-ballooning. So, just as with cgroups, if the memory accounting budget is overcommitted and the VM manager hits a hard OOM condition, it's already too late to guarantee ideal behavior; that is, it's too late to first recover caches and other any pages across all processes/guests that aren't strictly necessary for correct continuation (if at all possible) of every process/guest.

The alternative in each case--VMs and cgroups--is to preallocate memory so that the sum is no more than available backing space. But the Kubernetes clusters I've worked on, for example, all overcommitted cgroups memory--the sum of all pod cgroup memory limits was greater than physical memory (and machines had no swap space, despite my protests). Use of cgroups couldn't prevent the OOM killer from unnecessarily shooting down processes when under high aggregate load; it only helped blunt edge cases where individual pods allocated much more memory than ever expected (e.g. because of a memory leak). This was especially true if a JVM was running in a pod, as for whatever reasons the Java applications people liked to run on those clusters aggressively used anonymous memory. Whenever some other team complained about their pod being OOM killed despite not going over their cgroup budget, the host invariably had a JVM running in another, unrelated pod. (This was especially problematic for the period, 2019-2020, when Linux kernels had a regression that made it *much* more likely that the OOM killer couldn't flush buffer caches faster than processes would dirty them. Worse, the result was the OOM killer spinning, sleeping, and eventually timing out in its flush routine; and often times multiple processes could end up in that routine--or end up trying to take a lock held by that routine--effectively resulting in a situation where the entire system could lock-up for an indeterminate amount of time. Even if you could get an SSH session, poke the wrong process and your session would lock-up, too.)

Brian Kernighan on the origins of Unix

Posted Jan 28, 2022 14:48 UTC (Fri) by farnz (subscriber, #17727) [Link]

Cgroups have two things that a virtual machine setup does not have:

  1. Limits to determine which containers swap more than others. By setting memory.low to your "fair" share without overcommiting, and memory.high to your limit with overcommit, you bias the kernel's paging to page out memory hogs (both to swap and paging out their executable pages), and to slow down processes that can't reclaim memory to stay in their lane.
  2. An interface for a management process to use to identify cgroups that are using more than their fair share. You can monitor memory.events for changes, and use the notifications to tell containers to reduce their memory use.

Now, if you're dealing with people who overcommit physical RAM but who've not read and understood In defence of swap, you're in trouble anyway - they're working on a faulty model of how the OS allocates memory to processes to begin with, and both models are going to break because they're expecting "magic" to save them. But with competent people, cgroups already does better than VMs; and because cgroups has more visibility into what the workload is doing, it's more likely that cgroups will improve over time.

As an example, EPOC32 had low memory signals it sent to the applications to let them know that the system was low on memory, and that it was out of memory. Applications were expected to handle these signals by discarding caches, performing an early GC etc - and could also (ab)use them for better performance (e.g. don't run GC until the system is low on memory). You can get similar signals in a cgroup-aware application by having the application monitor memory.events, and treating a breach of the "low" threshold as "memory is running low" and a breach of the "high" threshold as "out of memory". Then, your JVM could be aware of this, and whenever it breaches the "low" threshold (container using too much memory), it does a GC run, while when it breaches the "high" threshold, it also discards any cached JITted sections etc.

This interacts in a good way with the kernel's preference to swap stuff that breaches low more than it swaps stuff that breaches high - when you breach low, you try to come back under control, when you breach high, you try to avoid being killed.

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 17:10 UTC (Thu) by ermo (subscriber, #86690) [Link]

I can't help but think that what you're asking for is a micro-kernel-like design from the ground up, where e.g. the user graphical session is its own set of processes (possibly related via a cgroup or namespace-like idiom), each browser tab is its own process and each container is its own proces and where all these processes use the fundamental micro-kernel message-passing paradigm (possibly wrapped) to communicate with each other?

If all processes used the same form of containerisation/namespacing/layering and the same means of IPC (possibly with some faster-than-TCP-but-still-reliable network transport available), this might function as seamlessly as one could ideally expect.

At least, that's the endpoint my imagination extrapolates to from your problem statement. I could be (very) wrong of course.

I don't know how close Plan 9 comes to this hypothetical scenario or whether it's even close. But perhaps Zircon/Fuchsia might very well become the closest modern approximation of what I outline?

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 14:01 UTC (Fri) by smurf (subscriber, #17840) [Link]

… or something like the GNU Hurd.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 0:29 UTC (Wed) by bartoc (guest, #124262) [Link] (5 responses)

I bet many do see k8s as the "one true container solution". I also bet around 100% of those people work for Google.

I've tried to understand k8s multiple times and it's like they refuse to _ever_ document what anything actually does, just some high-level abstract theory of what the results might be. It feels like reading a formal standard but more arbitrary.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 5:36 UTC (Wed) by jkingweb (subscriber, #113039) [Link] (4 responses)

This has been my experience with all Google documentation I've ever seen.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 12:10 UTC (Wed) by cyperpunks (subscriber, #39406) [Link] (3 responses)

Yep, sometimes I puzzled how Google can earn all that money and have all these brilliant minds; the software they produce and release lacks both pooper documentation and sane release policy. If they sold software the Microsoft way they would be out of business many years ago.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 13:56 UTC (Wed) by farnz (subscriber, #17727) [Link]

Technical writing is a very different discipline to software writing, and needs a different set of skills. Unfortunately, too many companies fail to value tech writing, and instead expect that the software authors will write good documentation themselves.

A really good tech writer knows how to take a developer's documentation (written from a place of deep familiarity with the code) and turn it into something useful for people unfamiliar with the code. A software developer just doesn't have that skill.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 17:40 UTC (Wed) by mpr22 (subscriber, #60784) [Link] (1 responses)

The trick is that Google doesn't sell software at all.

It sells advertising space (and possibly trademark licences?), and uses a slice of the revenue to pay the salaries of its technology division.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 17:42 UTC (Wed) by mpr22 (subscriber, #60784) [Link]

(Also it charges rent on business-use access to its services.)

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 22:37 UTC (Thu) by ceplm (subscriber, #41334) [Link] (12 responses)

One thing which is very much not A Solved Problem™ is really working networked system. Something which would be networked but it would allow seamless work offline (or when the network is not that really fast as we would like it to be). We have either local systems (BTRFS, XFS, etc.) or network systems (NFS, Samba, etc.), but nothing in between.

I believe that Plan9 was more on the way towards this ideal, but Plan9 unfortunately died.

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 22:44 UTC (Thu) by sfeam (subscriber, #2841) [Link] (11 responses)

We have either local systems (BTRFS, XFS, etc.) or network systems (NFS, Samba, etc.), but nothing in between.

Well, there were VAXClusters. Start a job on the cluster and it would migrate from machine to machine or node to node as they connected or disconnected themselves from the cluster. So far as I know unix/linux clusters never have reached this level of flexibility. Or maybe you were focusing specifically on filesystems?

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 11:16 UTC (Fri) by ceplm (subscriber, #41334) [Link] (3 responses)

Yes, VMSClusters look like something I was thinking about (as far as I can get from the Wikipedia article on it). I speak mostly out of my frustration with the current state of the affairs.

What I was thinking was that all my data are somewhere in The Cloud and whatever machine I use to access them (workstation, my hobby home laptop, tablet, or phone) I get access to the same data. Perhaps I don’t have all applications for all data (thinking that tablet or phone), then I cannot access those, but for those data which I have application for I can access the exact same data. And of course all that over the Internet, so fully secure, with authorizations and all that crap. And all that cached on the local disc, because otherwise latency will kill any user experience. It should be the normal state of everyday affairs not something like pulling your teeth slowly.

If you try something like that today you have NFS or Samba or stuff like that, which is unuseable for everyday work over even slightly non-local network (not mentioning a potential security disaster, so one switches to something even more obscure like sshfs and that’s even slower; NFSv4 may be more secure). Or you have some ultra-high-level stuff like Coda/OpenAFS etc. which requires really high-end hardware (no chance of running it on my tablet, phone could not be even mentioned) and even there I am not sure how well it works. Or you have series of mutually incompatible ad-hoc synchronization hacks (offline-IMAP, similar for CardDAV/CalDAV/etc., some weird in-browser proprietary caching for Google Docs, scripts using rsync, etc.).

http://ninetimes.cat-v.org/ seems to claim that Plan9 was supposed to be able of something like that, but I have my deepest doubts and I will believe it when I see it.

If you have some system which fulfils my requirements than you are either God or a liar, and I be on the latter.

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 23:54 UTC (Fri) by intgr (subscriber, #39733) [Link] (2 responses)

> What I was thinking was that all my data are somewhere in The Cloud and whatever machine I use to access them (workstation, my hobby home laptop, tablet, or phone) I get access to the same data.

Perkeep (previously Camlistore) is an attempt to solve this problem.

Brian Kernighan on the origins of Unix

Posted Jan 22, 2022 19:28 UTC (Sat) by ceplm (subscriber, #41334) [Link] (1 responses)

OK, an interesting idea I will try to learn more about it. Two problems seem obvious, why I think keeping it on the lower level of a filesystem makes more sense is that nobody wants to use any format they don’t already use (https://xkcd.com/743/), and the second is that I have never heard about, so I don’t expect it to take over the world anytime soon.

Brian Kernighan on the origins of Unix

Posted Jan 22, 2022 21:57 UTC (Sat) by ceplm (subscriber, #41334) [Link]

Hmm, I have to revert myself a bit. I was talking about completely independent system and then I was talking about using “normal” formats, which is mutually exclusive. Damn.

Concerning Perkeep, it looks interesting, but more as a secondary story for backup and archiving (something similar to https://github.com/ThinkUpLLC/ThinkUp ?) not as something where you actually work.

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 12:01 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (6 responses)

People tried that with Linux (famous Beowulf clusters!) but this really doesn't buy you a lot. Why would you migrate jobs between hosts in the first place?

You can do full machine migration easily either via VM checkpoint/restore or via CRIU, and this is useful in virtualization scenarios. You can also do high-availability via Xen where the same code runs on two computers at once, in case one of them goes down.

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 13:58 UTC (Fri) by malmedal (subscriber, #56172) [Link] (5 responses)

I don't think Beowulf clusters had that capability. You could schedule your job in any cluster-member, but not move them. Similarly with VMS, you could maintain the illusion of 100% uptime of a specially written application even while replacing all hardware.(admittedly I've only used VMS on VAX, maybe later versions could actually move jobs).

MOSIX however, could move arbitrary processes between cluster machines.

Another option is Condor, which uses CRIU to move simple processes.

Beowulf

Posted Jan 21, 2022 14:01 UTC (Fri) by corbet (editor, #1) [Link]

Yeah...Beowulf clusters still exist, they are just called "data centers" now...

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 18:14 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (3 responses)

Yes, they did. You could migrate processes between nodes: https://web.archive.org/web/20031002104248/http://www.ope... with some measure of automatic load balancing.

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 18:36 UTC (Fri) by malmedal (subscriber, #56172) [Link] (2 responses)

?

I believe I said Beowulf couldn't but MOSIX could migrate processes, they are different things.

Brian Kernighan on the origins of Unix

Posted Jan 21, 2022 18:38 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

Sorry, I'm a writer, not a reader. 🤦

Yes, of course you're correct. I used a Beowulf cluster with MOSIX back in the day, so that's why I'm confusing two of them.

Brian Kernighan on the origins of Unix

Posted Jan 22, 2022 13:03 UTC (Sat) by malmedal (subscriber, #56172) [Link]

My own memory also rather lacking at this point, but I think the deal-breaker for me was that the migrated process would die if the node it originally ran on rebooted.

Did MOSIX ever fix that issue?

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 17:23 UTC (Tue) by kleptog (subscriber, #1183) [Link]

I personally found that Docker Swarm actually did reasonably well for the middle. The user experience was pretty good and it was really easy to set-up. Together with docker-compose for the configuration you could get fairly complicated set-ups working pretty quickly with sensible defaults.

Its main problem was that the implementation was plagued with bugs that made it really annoying to run in production. When its internal state got corrupted (which was often in the beginning) the only fix was to blow away the entire cluster. Which is really annoying when you've got a hundreds of containers spread over dozens of nodes. Bringing everything up at once was a guaranteed way to get more corrupted state.

It's better now, and it's has been pretty stable for a while, but the mind share has all gone to k8s. Swarm is good for smaller set-ups, but if you want to build another layer of automation on top of it, Swarm is a real pain while k8s does this easily. Silly things like secrets that can't be updated are just nails in the coffin.

I've wondered about how the world would have turned out if the Swarm UI could have been merged with a k8s reliable backend. I see there is something called Kompose, but I've never tried it.

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 5:45 UTC (Wed) by nilsmeyer (guest, #122604) [Link]

> Disclaimer: I work for Google, and while they would probably *like* me to tell you that we have already gotten to that point with GCP, I'm not 100% convinced that we're fully there yet.

I think as a proprietary solution it's a bit of a non-starter anyways.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 0:47 UTC (Tue) by neilbrown (subscriber, #359) [Link] (13 responses)

> The next 'UNIX' will be multiple users sharing a network of machines.

I think this missed the point of the question "Could Unix happen again?"
Though it could be that it just sees a different point to the one that I see - it is a rather vague question.

I think the "Unix" that may or may not happen is again is a "shunkworks" project that appears to come out of nowhere, and takes over the world.
A key factor in the success of Unix was the lack of effective competition. The OS market today has way too much competition for a similar success story.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 3:40 UTC (Tue) by felixfix (subscriber, #242) [Link] (11 responses)

My personal hope is for some kind of mesh networking, hardware and software, that has enough bandwidth to make today's centralized networks unnecessary, and has the distributed intelligence to make it practically as fast and responsive as today's centralized networks. The freedom and flexibility of an internet which nobody, google or government, can control, would be a breath of fresh air.

But this depends on more bandwidth and cleverer algorithms, much more on hardware than software, so it's not a candidate for a 9000 lines of code style revolution. I think those days are long gone, just as no one tinkering in a barn can be the next Henry Ford or Wright Bros. It will be something entirely unexpected, spawning an entirely new field.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 6:16 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

> The freedom and flexibility of an internet which nobody, google or government, can control, would be a breath of fresh air.

Google doesn't control networking. Start a web server and off you go.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 6:42 UTC (Tue) by felixfix (subscriber, #242) [Link]

It's an idiom. It has a wider meaning.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 7:49 UTC (Tue) by PengZheng (subscriber, #108006) [Link] (7 responses)

> The freedom and flexibility of an internet which nobody, google or government, can control, would be a breath of fresh air.

I guess the performance of that network would be terrible. Let's take bitcoin for example.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 8:29 UTC (Tue) by felixfix (subscriber, #242) [Link] (6 responses)

Yes, that's my guess too. But I have seen arguments that a mesh network with lots of well-connected nodes might not be, and I don't know enough to judge that. If every node in a city is in contact with 1000 other nodes, is that enough? No current technology that I know of can handle that many simultaneous connections, but maybe it's just a few years down the road and will catch everybody by surprise. Cellular phones took the world by storm in just a few years. Software defined radios exist. Electronically scanned radars revolutionized radar. Who knows what might surprise the world in just a few years?

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 9:32 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

I don't get it. Why would you even do this? What does it achieve, except tickle the fancy of technocrat bros?

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 11:14 UTC (Tue) by smurf (subscriber, #17840) [Link] (1 responses)

A mesh network requires more power than something centralized. It eats more radio bandwidth, and its latency is by definition higher.

Please tell us why we'd need that, when we already have high-speed low-latency wired and/or wireless options.

(Physical) mesh networks work well for local IoT applications and similar low-bandwidth, noncritical-latency stuff; who cares whether the AC turns off now vs. in two seconds. But try telling a gamer that their network has >50msec to their favorite server without getting laughed off the stage.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 11:56 UTC (Tue) by excors (subscriber, #95769) [Link]

And even if it technically worked, I don't think it would provide decentralised control in any meaningful sense. You need an organisation to design the protocol and to update it over the years (to fix security/performance/legal problems with the original design, and to continually improve security/performance/features/etc to keep up with the proprietary competition), and a small enough number of organisations building the hardware and implementing the software so that there's a reasonable chance of interoperability between them all. I don't see any practical way to design a network where users aren't expected to put trust in and give power to someone else.

(See also "web3", which is marketed as decentralised but appears to be already heavily centralised in a handful of service providers: https://moxie.org/2022/01/07/web3-first-impressions.html)

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 12:18 UTC (Tue) by rbtree (guest, #129790) [Link] (1 responses)

BitTorrent clients handle 1k connections just fine.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 12:59 UTC (Tue) by smurf (subscriber, #17840) [Link]

We're talking about a physical mesh network here. Meshing applications is a completely different kettle of fish.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 14:56 UTC (Tue) by felixfix (subscriber, #242) [Link]

Good grief. It's just an idea I threw out as something which might happen *in the future* and *by surprise*. You may as well argue against warp drives in Star Trek.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 14:06 UTC (Tue) by mtaht (subscriber, #11087) [Link]

I like what I'm seeing in "tailscale" meshy wize.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 15:32 UTC (Tue) by nilsmeyer (guest, #122604) [Link]

> I think this missed the point of the question "Could Unix happen again?"
> Though it could be that it just sees a different point to the one that I see - it is a rather vague question.

Maybe it is happening right now? Without the benefit of hindsight who would have known that Unix or Linux would have such an impact?

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 5:19 UTC (Tue) by alison (subscriber, #63752) [Link] (2 responses)

Anther notable point from the presentation is that the pipe was originally manager Dave McIlroy's idea, although he called it a "garden hose." Also, Thompson banged out the precursor of Unix alone during a 3-week period when his wife was visiting her family, writing an executor, editor, shell and assembler during that time.

Anyone reading the article will enjoy a recent amusing and intriguing piece about Dennis Ritchie's PhD thesis on functional programming: https://computerhistory.org/blog/discovering-dennis-ritch...

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 10:11 UTC (Tue) by larkey (guest, #104463) [Link]

Wow, thanks for the great read! I didn't know he invented LOOP language class and proved its equivalency to primitive recursion.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 13:22 UTC (Tue) by ema (subscriber, #17750) [Link]

If Ken’s wife would have stayed home those 3 weeks, chances are that I’d be a plumber now. Thanks Ken’s wife!

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 15:10 UTC (Tue) by karim (subscriber, #114) [Link] (4 responses)

"In your editor's opinion, Kernighan missed an opportunity to evaluate the free-software community in these terms. Companies may not have long time horizons, but many free-software projects do. It is, still, a place where people with good ideas can come together and see where those ideas lead."

I actually disagree with this. And I hesitate to even write this as a comment because I will likely not want to defend this point of view in response do to anyone -- 1) just not interested in a long-winded debate, 2) this is a very quick post that I haven't taken the time to think through completely, and the rough argument I make likely has many problems. So I'm going to drop this here, and come what may.

For having been involved in OSS since the mid/late-90s it's been my perception that the FOSS community is very good at _commoditizing_ existing technology and very bad at creating new tech. Think of the Linux phones before Android and the "Linux" phones since. Linux now runs on the vast majority of smartphones on the planet, but it's not because of the FOSS community, at least not directly. Here's Andy Rubin's (Android creator) take on OSS (https://techcrunch.com/2011/05/10/andy-rubin-on-androids-...): “Open source is different from a community-driven project. We’re light on community, but everything we do ends up in an open source repository." For him, open source wasn't an enabler, just a by-product.

Similar story with ChromeOS.

Similar story with gcc vs. llvm. In fact the entire GNU project was a commoditization of Unix tools/userspace. And, yet, when evolution came knocking to the compiler world, the GNU project couldn't handle it and llvm has since taken a lot more space.

etc.

Another angle to look at is how many FOSS projects/contributors have struggled with funding. This is something that LWN has covered multiple times. And it's been aptly immortalized by XKCD: https://xkcd.com/2347/ How can you innovate if you can't even pay the bills?

So, apologies, I'm skeptical that FOSS communities are inherently capable of sustaining long-term disruptive innovation. They can however certainly help sustain it by commoditizing the required building blocks that have already been shown to work elsewhere.

Brian Kernighan on the origins of Unix

Posted Jan 18, 2022 18:36 UTC (Tue) by mfuzzey (subscriber, #57966) [Link] (1 responses)

I see what you're getting at and don't really disagree, major open source projects do seem to often be better at improving an existing idea rather than implementing completely new things.

However I think there are other factors at play in your examples.

Android: hardware was a huge factor too. The Android OS would be useless with appropriate hardware and that is still difficult / impossible to fully open source and even harder to develop in a community manner.
Now that suitable hardware exists there are projects building open source, non AOSP based, operating systems for them. They will probably never become mainstream, just as Linux isn't and will probably never be mainstream on the desktop but they do exist.
I also think Android wouldn't have succeeded as well as it has if it hadn't been open source, even though it definitely isn't a community driven project.
Furthermore Android had specific time to market pressures (to have a chance of avoiding Apple dominating the market and Microsoft taking the rest).

ChromeOS: hardware too (though you can run it on a PC so not entirely). But also the chromeOS web centric model relies on huge Google data centres that aren't really reproducible outside of huge companies.

GCC / LLVM: I think this was more a question of the incumbrent being less nimble. GCC, as the dominant OSS compiler saw less need to innovate and, because they had a large existing code base doing so was harder. This happens in the proprietary world too where innovation is often more likely to occur from a new entrant than a large existing player.

But I think where the open source community has really suceeded is in the development model rather than particular technologies.
Back in the 90's many people thought the future of computing would be building systems from sets of commercial , closed source, components. That was the model Microsoft technologies like ActiveX, OLE, COM/DCOM etc were supposed to enable.
That failed to materialize and most new languages / frameworks today are non starters unless they are open source.
For many if you can't get it with "git clone" and no jumping through hoops it doesn't exist.

Sure source availibility isn't everything, and isn't the same thing as community (the point Andy Rubin makes) but, when the source is available with no community it is still possible for a community to form later (by forking if needed). To some extent this happened, albeit temporarilly, with Android with early "community" Android forks like Cyanogen actually bringing significant new features that ended up becoming available in official Android only later (stuff like tethering and permissions modifications come to mind).

Brian Kernighan on the origins of Unix

Posted Jan 19, 2022 0:37 UTC (Wed) by bartoc (guest, #124262) [Link]

> Sure source availibility isn't everything, and isn't the same thing as community (the point Andy Rubin makes) but, when the source is available with no community it is still possible for a community to form later (by forking if needed). To some extent this happened, albeit temporarilly, with Android with early "community" Android forks like Cyanogen actually bringing significant new features that ended up becoming available in official Android only later (stuff like tethering and permissions modifications come to mind).

Interestingly this happened with iPhones too! Despite most of their software not being open source. All those quick control popouts and a lot of the additional interaction options for stuff like notifications were added by third party mods for "jailbroken" iphones long before apple implemented them. I'm not sure if this is Android/Apple taking ideas from the "community" or just obviously good ideas being implemented by the community first, because a hobbyist doesn't need to polish things up that much before shipping (or go through endless UI redesigns, UX research, etc, etc).

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 9:37 UTC (Thu) by gasche (subscriber, #74946) [Link] (1 responses)

Interesting discussion! I can think of several open source projects that were disruptive to the rest of the ecosystem (even if they are often built on pre-existing ideas that hadn't seen wide diffusion yet). They are limited to my own expertise and I'm sure there are many more examples:

- Git made distributed version-control widely available and changed our development practices in a radical way.
- Haskell is a radical programming language that gave a lot of ideas now adopted by other languages
- Nix and Guix are proposing a fresh take on software package management and generally the OS
- QubesOS is also a fairly radical take on OS (although it is a layer on top of existing systems for usability reasons)
- the Coq proof assistant ( https://en.wikipedia.org/wiki/Coq ), and in general Interactive Theorem Provers, are radical projects and all the active ones are open source, with most run as free software projects (with a strong academic bias among contributors).
- I believe that some peer-to-peer projects also had a radical impact (Bitorrent these days), but I don't know enough about their history to tell if the open source / free software community participated actively. (I think there was a fair amount of Windows-based freeware at the time.)
- I would guess that Bitcoin was also operated by a crew of enthusiast hackers from the open source community at the start -- but again I'm not sure.

Many of those projects were born in academia (a natural place to look for radical ideas), but they were also open source projects from the start, and in many cases the free software community contributed greatly to the fact that they became successful enough to spread their ideas to the rest of the software world.

For Git one could argue that this is a commoditization of the proprietary system BitKeeper; but there were also open source ancestors (GNU Arch) and competitors (darcs, Mercurial) that were also influential.
(I think it would be worth articulating whether we are discussing inventions that were born in the open source community and became successful-enough within it, or inventions that were born anywhere but remained fairly confidential, and became successful thanks to the open source community. I rather have the later in mind, and I think it is different from "commoditization".)

One important area of innovation that is missed here is machine learning, that saw relatively little involving from well-identified open source communities, possibly as the requirements for entering the space (having a *lot* of training data at hand) made distributed development difficult. There are now striving open source projects within the machine learning software ecosystem, but I wouldn't say that the field would be substantially different without the open source community (by which I mean: without large-scale cooperation of hobbyists / benevolent contributors).

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 16:55 UTC (Thu) by karim (subscriber, #114) [Link]

Thanks for this, interesting point of view.

I somewhat feel git might actually a good example of commoditization. I followed this very much in "real-time" as the BitKeeper drama unfolded and was at OLS in 2005 when Matt Mackall first presented Mercurial -- I loved mercurial btw, and I was sad to see git prevail, but I digress. It was my understanding that BitKeeper was tailor-built by Larry McVoy for Linux development based on direct conversations between Linus and Larry. I don't have a reference for this, so I could be misremembering, but that was my understanding. As such, when the history section of git on Wikipedia (https://en.wikipedia.org/wiki/Git#History) states: "Support a distributed, BitKeeper-like workflow." as one of the goals set out by Linus for git, one can probably easily overlook the work that Larry presumably did to actually and actively listen to Linus and come up with something that fit "the customer's needs". [side bar: I've butted heads with Larry several times in the early 2000s on unrelated topics, but credit should go where it's deserved.]

And maybe this is what it boils down to. "Listening to the customer's needs" and "creating a product the customer will actually use" have nothing to do with the ability of replicating in an open source manor the end result of what those customer-facing steps entail. In fact, I'd venture to say that the open source community generally has had a bad history of being able to listen to customer needs. It's been, on other hand, very effective at replicating what those that have have produced, albeit sometimes in a more sustainable fashion ... because direct monetization wasn't the end goal or even possibly a need.

Again: 1) very rough ideas/arguments off the top of my head, 2) I care not of being right nor making a point. i.e. destroy/demolish at will.

Brian Kernighan on the origins of Unix

Posted Jan 20, 2022 2:49 UTC (Thu) by ikitayama (subscriber, #51589) [Link]

I very much enjoyed this specific piece, thank you Jon!

Brian Kernighan on the origins of Unix

Posted Jan 29, 2022 15:12 UTC (Sat) by scientes (guest, #83068) [Link]

> The C language hit a "sweet spot" in language design that has proved hard for anybody else to hit since, Kernighan said.

Absolutely. I got really excited about Zig-lang's goals to replace C, while still being Turing complete, but it has IMHO since abandoned that goal.

The features of Zig that could feasibly be ported to C (with a great deal of work) would be--

1. Remove the need of C pre-processor, which is a language of its own (the original Go compiler written in C avoided the C pre-processor, but Zig does it better).

2. Better memory allocation. malloc and free are a commonly slow in C applications, leading to Firefix and Chromium using custom allocators (jmalloc and tcmalloc) but these, and also the quite novel Mesh-allocator are not as good as the Zig abstractions. Also, C programs that use malloc and free are generally at the mercy of the OOM killer, and these type of bugs have plagued systemd due to the incredible bug-hunter Evvrx.

3. Make integer overflow part of the language, instead of obscure "undefined behavior" rules which are often over-ruled by an excessive number of non-standard-behavior compiler switches which are even used by Linux.

Brian Kernighan on the origins of Unix

Posted Feb 1, 2022 13:17 UTC (Tue) by jdisnard (subscriber, #90248) [Link]

It's always nice to to see Brian's deep perspective into Unix. One thing I'd like to see more from folks like Brian is how Plan9 fit into the Unix big picture, and how that relates to Linux? I'd also like to understand how one might go about recreating something as magical like Bell Labs in the modern era?


Copyright © 2022, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds

close