Unix and Multics (2019)
multicians.org
multicians.org
PL/S, PL/M, PL.8, PL/Something...
One of them, PL.8 is famously associated with being one of the first LLVM like compiler frameworks, used by IBM on their RISC research, before they pivot and created AIX for their RISC CPUs.
System languages like PL/I, BLISS, Modula-2, would have had a different adoption if UNIX wasn't basically free beer with a recipe on how to make it.
You always say that. And I always call BS on it. I don't expect to persuade you, replying for the Nth time, but I have a couple of things I want you to think about.
"Not free" sometimes beats "free". People buy cars even in cities that have public transit. People paid for cable TV when over-the-air TV was free.
For this to happen, though, the not-free option has to deliver more value than the free version. With a car, I can go when I want; with public transit I have to wait. For many people, there's value in that. With cable I can watch 500 channels. There's value in that, at least for some people.
PL/I, Modula-2, and Pascal did not deliver more value than C - or at least not enough value to be worth the price of their compilers. Multics did not deliver more value than Unix - or at least, not enough more.
In fact, Multics had to reach a very high bar, because not only was Unix free, it ran on less-expensive hardware. The issue (probably) wasn't that Multics cost more than Unix; the issue was that Multics ran on hardware that cost a lot more than a PDP-11. Unix could have cost as much as Multics and still won, because the cost of the OS was not the dominant cost in the equation.
You often mention network effects - that Unix and C took over universities because they were free, and so everyone was using them, and so everyone knew how to use them, and so when they went somewhere else, they used what they knew. Go back to cable TV. Over-the-air TV had network effects - everyone was talking about the show they watched last night, and if you didn't watch it, you were left out. It was free advertising plus social pressure to be part of the "in" crowd. And yet cable still made money, and eventually grew into internet distribution, and still took away large amounts of market share from broadcast. Network effects can be overcome, if the product is actually closer to what people want.
So I think your explanation is too simplistic. It may have been a factor, but in the ahistorical world where Unix and C weren't free, I think they would have won anyway - still because of cost, but because of hardware cost.
[1] https://en.wikipedia.org/wiki/Edinburgh_Multiple_Access_Syst...
Its warts are only bearable, because of being free beer.
> Multics didn't fail: it accomplished almost all of its stated goals. Unix succeeded too, solving a different problem.
Multics wouldn't have become what Unix became even if Unix wasn't there. It was pursuing different goals. And it turned out that Unix's goals had a lot bigger market than Multics's goals.
So, Unix had warts. But those warts were bearable because it met the needs of the market it addressed, and the other OSes didn't do so, or at least didn't do so as well.
Or something else, definitely not UNIX, there was plenty of other alternatives when free would not have been an option, and UNIX haters book is still quite up to date in some of the original warts.
I could make a start, referring to the default editor, EDIT. In the early nineties (no idea, what version that actually was) it was possible (and there was no warning) to edit the same file in multiple sessions (using multiple terminals by not-so-well communicating team members). Only the last file saved remained on disk.
In the 70s and 80s, a lot of universities used VM/CMS for research and teaching. But then they ended up all migrating to some combination of UNIX and PCs running DOS/Windows.
In the 1980s, IBM was seriously pursuing the idea of a VM/CMS-based workstation – they ended up actually releasing the IBM 7437 VM/SP Technical Workstation in 1988, and it was adopted by some customers, primarily those who used the mainframe-based CAD systems CADAM and CATIA. But it just couldn't compete with UNIX workstations in the market. In an alternative timeline where UNIX was much less successful, it might have stood more of a chance.
Bliss isn’t like Fortran and is quite a different beast from C. It had a practical way to define structures. It defined code structures as expressions rather than statements. I feel it was a a little higher level than C. But not higher level like PL/I. There were different languages for 36 bit machines (PDP-10) 32 bit machines and I think even 16 bit machines.
PU LIST('Hello, world!
and it would generate a raft of error messages, followed by running the program and displaying Hello, world!
PL/C's heroic error correction dates from when student programs got 2 or 3 runs per day.
IBM z/OS is mainly written in PL/X, which is a systems programming dialect of PL/I (removing features which are irrelevant to systems programming and adding stuff like inline assembly). So are various other IBM mainframe products like DB2 for z/OS. PL/X was previously known as PL/S, PL/S II, PL/AS. There was also a "PL/X-86" which was a port of PL/X to x86, targeting OS/2, it was used for mainframe service processor code.
Large parts of IBM i are written in a couple of related PL/I dialects, PL/MI and PL/MP. PL/MI is used for code that runs above the virtual machine, PL/MP for code which runs below it. When they switched from CISC to RISC, a lot of the PL/MP code was rewritten in C++, although apparently some of it survives. (Parts of IBM i are also written in Modula 2)
PL.8 is yet another systems programming PL/I dialect. It was developed as part of the compiler for the IBM 801 RISC project. It was the language many of IBM's compilers were written in (not sure if that is still true?). In the earliest versions the AIX kernel was written in a mixture of PL.8 and C, although newer versions all the PL.8 code is gone. It was also used to write firmware for mainframes (and possibly AS/400 aka IBM i too). IBM even built a PL.8 frontend for GCC, but they never officially released it outside of IBM – https://dl.acm.org/doi/10.1147/rd.483.0543
Yet another IBM PL/I dialect is PL/DS which was used for the IBM 8100 and DPPX/370, although that stuff is long dead.
Then there was also Intel / Digital Research PL/M, which was used to write CP/M. (In CP/M 2.x and later, the core of the OS was moved from PL/M to assembly to improve performance, but PL/M was still used for utilities.) I've also heard claims that PL/M was used to write some of the firmware on CISC AS/400 (more specifically, the Service Processor), although not sure how true that is.
And then the defunct Honeywell CP-6 mainframe OS had its own PL/I dialect, PL/6.
PL/I is also apparently what Stratus VOS is written in
The Space Shuttle flight software was written in HAL/S. But the HAL/S compiler, which ran under MVS (later z/OS), was written in a PL/I dialect XPL – https://github.com/virtualagc/virtualagc/tree/master/yaShutt...
Prime Computer's PRIMOS was unusually written in FORTRAN, but in later versions they started using their own PL/I dialect (PL/P) as well
Several airlines used to use a PL/I dialect called SabreTalk (aka PL/TPF), but (apparently) they've since converted all that code to C – http://teampli.net/Sabretalk_Reference_Guide.pdf
REXX is not PL/I, but very easy to for a PL/I programmer to pick up.
PL/I on the mainframe can be a highly effective application language, but there's a number of features that are ferociously computationally expensive that were acceptable for low volume or one off stuff that had to be avoided by production applications.
COBOL is tedious compared to PL/I. While I had occasion to fix COBOL bugs and performance issues and even taught SQL to COBOL programmers I refused to write COBOL programs.
Then there's Multics PL/I. I did a pilot project to evaluate porting from IBM VM to Multics on Honeywell and discovered a flaky environment. I saved my employer a pile of money by killing that idea. Unfortunately the HW GCOS had to be replaced by a Multics machine which gave no end of problems. Happily that was not my problem.
> Was it worth it?
> The marketplace seems to have answered this question: not at current prices. See [Lipner15].
Note that, unlike our discussion below, this is about the cost of implementing B2 security in an OS, not about the sale price of the OS (though the two are related).
Or perhaps I should say, the sale price of the OS is forced so high by the cost of B2 that the market isn't interested in the OS, but this would be true whether Unix was free or not.
Back in the 1950s and 60s, there was the "software crisis", which was that we could not produce all the software that we felt we needed. Now we have governments, not "stepping in" exactly, but at least making recommendations. We wrote all this software, but it was imperfect in ways that cause real problems. But producing B2 software took too long and cost too much - we'd have much less software if we did it that way. (You could argue that the world would be better off; I'm assuming that it would not be.)
So I have a question (an honest question, not a "gotcha"): In your view, where should the balance be? You think C is too insecure. Fine; I won't say there's no evidence for that view. How far should we go? Java? (No buffer overflows.) Formal correctness? B2? A1?
Software that is more correct and secure is good. More software (or at least more efficiency in creating software) is also good. Where do you put the balance?
When Ken cited "Unknown Air Force Document", you can be sure it would have been a direct citation if he had the paper at hand. But let's be generous and assume he called an Air Force reference librarian and described the paper he was looking for, and said librarian wasn't able to find it on the basis of that description. What's the next step? There isn't one.
Hm.. what problems Multics had been solving then ?
If Multics had been treated as a research project rather than being a plan to invent a ton of new stuff and build a system that would be deployed in volume, everybody would be singing its praises today.
I wonder if Multics had to be pitched to funders as "a plan to invent a ton of new stuff and build a system that would be deployed in volume" to obtain the level of funding needed for it to prove out its precepts. As a research project, it might not have had the impact that it did upon modern OS theory, design and implementation.
Even today, there is an incredibly strong averse reaction by funding agents to the software notion of "build one to throw away".
ARPA (later DARPA) funded a lot of things that were built under contract, not just pure research.
Most of project MAC was pure research and a lot of it is still fundamental and influential today.
The New Jersey Style.
The main purpose of any code would be to deal with all possible errors and define them upfront. If, by miracle, your program execution does survive the minefield, you can throw a Success exception.
And it can be worse. IBM, I think it was, back in the 1970s or 80s, said that 80% of the lines of production-ready code dealt with errors - only 20% was doing the actual program functionality.
You have to help other developers understand how and when to use asserts, and then you have to test the developed device very well, so that it won't assert in the field.
Yet if it does assert in the field, it's highly likely that it will get a lot of management attention.
That’s a key point: you don’t want debug-only asserts to be used where you need production error handling.
We didn't have debug-only asserts. Asserts were enable in the software we verified and shipped.
It took a while for developers to be able to determine when a situation called for an assert, and when it called for what might be called traditional error handling.
The strategy of shipping with asserts enabled kind of worried some folks. They were concerned that it might assert in front of a customer. I understand the concern, but in our domain, if you're doing an OB exam with the ultrasound system and you have a choice of asserting or showing a femur length measurement of -1039cm, which is better?
We didn't have many asserts in the field. We had a lab where we had about 25 - 30 ultrasound machines running embedded tests constantly. Each machine was connected to a JTAG debug board, so we could flash new code into the system and so we could set a breakpoint on the assert routine itself and save a "core dump" for subsequent debugging without having to try to reproduce the system state that led to the assert.
The whole lash-up evolved over a period of years. It worked well, so far as I know.
One mitigating factor was that our systems were class B devices. They were always supposed to be used by a medically trained professional that had the ability to take over if the system asserted, or power failed, etc.
Happy to try to answer any questions about this.
Erlang supports supervision patterns more, though I have little experience there.
"Let it crash" at cell boundaries is also a basic pattern in complex life. I'll bet there's plenty more for programmers to learn about robustness from biology. Doctors and medical researchers too, actually -- they seem too prone to think like "oh here's a kind of damage, guess we have the inside track on this disease now" without understanding it at a level like "here's how the body's self-repair gets overwhelmed".
A design principle in the OS is that if you pass anything invalid to a syscall, you don't get an error back, you get your process forcibly killed. The thing linked at the start of the paragraph above is about an extension to this principle: if you have a client/server pair running on the OS, and the server gets a request it thinks is invalid, it can forcibly kill the client.
All of which sounds kinda insane, but (as per cjk2's comment in this thread) apparently what actually happens is that in development things blow up all the time and get fixed, and once you get through that phase all those bugs are fixed and everything is very robust.
(But Hubris's use case is quite specific and so far as I know no one is claiming that it would be better if, say, Linux or Windows worked that way.)
It was in Latin. "HODIE NATUS EST RADICI FRATER".
C's arrays-decay-to-pointers sin is the original sin here, but it's not for nothing that it's taken so long to get systems programming languages that have manual memory management and are memory-safe: that's a hard problem!
"It came from New Jersey" was a pejorative at Sun for "it's [crap code] from SVR4". I bet it's still a pejorative at Oracle for whoever still works on Solaris.