Hi everyone and hope you’re having a good weekend. First of all, I added a short post yesterday: “60-Bit Computing - When I’m Not 64”. In keeping with my promise to keep to two emails per week this wasn't sent out as an email.
The post was in response to a question I was asked a while ago. Why did some mainframes use a 60-bit word length rather than 64-bit?
A link to the post is below.
Now on to today’s post which is also partly about mainframes. It’s also about modern smartphones and other devices with a System-On-Chip.
It’s become a bit of a cliche to compare the computing power of a modern smartphone with that of a 1970s or 1980s mainframe. We have cute Raspberry PI cases in the shape of a Cray 1, where the PI inside outperforms the Cray by at least an order of magnitude.
In other respects a smartphone and a mainframe couldn't be more different. The mainframe shown at the top of this post consists of several very large (usually blue) boxes, needs a very large room, has the same power consumption as a small village and needs a small army of engineers to maintain it.
Your phone has none of these traits. Its software also has very little to do with the mainframe. If you’re on Android then you’re using the Linux kernel. If you’re using an iPhone then its iOS. In each case their heritage can be traced back to Ken Thompson and Dennis Ritchie’s original Unix written on a DEC PDP-7. As you’d expect Unix was strongly influenced by the nature of the PDP-7, with a single processor that did most of the important work.
(I don’t have a photo of them using a PDP-7 so it has to be a PDP-11 instead).
Cue a fascinating talk by Timothy Roscoe from ETH Zurich for the 2021 Usenix conference.
It’s a great talk though and well worth watching in full if you have the time. I’ll try to summarise the talk in few lines. Apologies to Timothy in advance for the extreme compression of the arguments.
There isn’t much new published research on operating systems and what there is is focused on Linux. This is because Linux has become utterly dominant in some fields. This is a problem because many modern systems look nothing like the PDP-7 that Unix was originally written for.
Here is one quote from the talk:
Too many people don’t know what modern hardware looks like and think it’s just a fancy VAX.
To expand on this let’s return to the smartphone. Here are a couple of slides from Apple’s September 2022 event where they introduced iPhone 14 and the A16 System on Chip (SoC) that powers it.
The slides show a stylised view of the die for the A16 highlighting the two high performance processor cores and then the four high efficiency processor cores.
Now real world die layouts look nothing like this. Angstronomics has some early captures of what the A16 does look like in reality and it’s a lot more messy than Apple would have us believe. But one thing is obviously accurate in these stylised Apple slides. Most of the die area is devoted to things other than the CPUs.
And a lot of that non-CPU die area is doing processing.
Let’s go back to the Usenix talk. We can look at the structure of a version of one of the SoC’s that Timothy Roscoe references - the Tegra Parker from Nvidia.
There are no less than six distinct locations where code is running on these SoCs.
But Linux runs in only two of these locations, on the CPUs at the top left. What happens on the other four is vitally important but it isn’t really Linux code. Rather there are a distinct set of code bases, which Linux interacts with but doesn’t really ‘operate’ in a meaningful way.
As the talk highlights, this leads to all sorts of issues. Security vulnerabilities. Proprietary code that can’t be inspected or modified. And so on.
So how do mainframes come into this? Well maybe your phone has more in common with the mainframe than we think.
Here is the layout of one model of the IBM 3090 mainframe from the 1980s.
CP is Central Processor here. It’s not as complex as a modern SoC but it shares some of the characteristics. In particular it has code running in a number of places, not just in the Central Processors.
When you bought a mainframe you didn't just buy blue cabinet with the Central Processors. You bought lots of ancillary blue cabinets too. For the IBM 3090, for example, there would be cabinets with the power supply, storage, for input and output (the ‘channel subsystem’) and for something called the ‘Processor Controller’. The Processor Controller handled startup of the system, loading code from permanent storage and then in turn starting the Central Processors.
For anyone with a Raspberry PI, this will sound very familiar. On the PI, code is first run on Broadcom’s Graphics Processing Unit, which then starts the Arm processors running the ‘main’ operating system.
And it’s not only smartphones and other SoC’s that have diverged from the PDP-7/VAX model. Here is James Hamilton of Amazon Web Services explaining how AWS have added their ‘Nitro’ SoCs to their servers and where he compares Nitro with the ‘channel subsystem’ input and output processors in the mainframes that he used in the 1990s.
So maybe Amazon’s cloud servers also look more like mainframes than PDP-7’s too.
Now there obviously are limits to how far we can seriously compare any of these modern systems SoC’s / servers with mainframes. If you buy into Timothy Roscoe’s thesis though, then it’s a useful reminder that often it’s useful to shift our perspective and that sometimes that perspective takes us back to older systems.
Thanks for reading The Chip Letter! Subscribe for free to receive new posts and support my work.
Ken Thompson and Dennis Ritchie with a PDP-11
CC BY-SA 2.0 <https://creativecommons.org/licenses/by-sa/2.0>
via Wikimedia Commons
The VAX of course being DEC’s successor to the PDP-11 series of minicomputers.
I think there might have only been about one year of Unics (later UNIX) development on the PDP-7. The PDP-7 Unics "version 0" is from 1969 and UNIX was on PDP-11/20 in 1970. In 1973, Version 4 Unix was rewritten in C, a language that maps to the PDP-11 which suggests that the PDP-11 was a stronger influence on UNIX than the PDP-7.
You wrote "the PDP-7/VAX model" but the lineages go "PDP-1, PDP-7, PDP-9, PDP-15" (all 18-bit) vs. "PDP-11, VAX-11, VAX (without the -11 as backward-compatibility with the PDP-11 was deprecated in later models)".
In support of some of your comments.... there was a time when older model IBM mainframes were returned and they re-appeared as disk controllers. The IBM mainframe is generally based on separate functional units closely coupled.