116 points · by ingve · 4y ago · 126 comments
* ITS (of PDP-10 hacker fame) - processes could debug and introspect their child processes. The debugger was always available, basically. The operating system provided support for breakpoints, single-stepping, examining process memory, etc. Whatever part of the system manages processes, is the natural place for the debugger, really. Some of this has been brought to Unix systems recently, but you still can't trivially freeze a process, tweak a few values in its memory, and resume it as an integrated part of the operating system. Why not? It seems very basic to an operating system, now that I think about it.
* KeyKOS (developed by Tymshare for their commercial computing services in the 1970s) - A capability operating system. If everything in UNIX was a file, then everything in KeyKOS was a memory page, and capabilities (keys) to access those pages. The kernel has no state that isn't calculated from values in the virtual memory storage. The system snapshots the virtual memory state regularly. There are subtle consequences from this. Executing processes are effectively memory-mapped files that constantly rewrite themselves, with only the snapshots being written out. Snapshotting the virtual memory state of the system snapshots everything -- including the state of running processes. There's no need for a file system, just a means to map names to sets of pages, which is done by an ordinary process. After a crash, processes and their state are internally consistent, and continue running from their last snapshot. For those who are intrigued, there's a good introduction, written in 1979, by the system's designers available here: http://cap-lore.com/CapTheory/upenn/Gnosis/Gnosis.html (It was GNOSIS before being renamed KeyKOS.) And a later document written in the 90s aimed at UNIX users making the case: http://cap-lore.com/CapTheory/upenn/NanoKernel/NanoKernel.ht... Some work on capability systems continues, but it seems the lessons learned have largely been forgotten.
the sockets api was modeled after berkeley and the libc itself is posix compliant to this day, i believe.
Then IBM and MS fell out and Microsoft put all their resources into Win32.
"Eric Bier Demonstrates Cedar"
https://www.youtube.com/watch?v=z_dt7NG38V4
One for Oberon,
https://www.youtube.com/watch?v=OJGnpmnXR5w
IBM Redbooks are a source of information for IBM i and z
And Burroughs is still sold as ClearPath MCP.
https://public.support.unisys.com/search2/DocumentationSearc...
Because ITS had the debugger (DDT) as its shell. ITS wasn't the only OS for which this was true – the same was effectively true of CTSS, since in CTSS debugging was just a bunch of shell commands, not launching a separate "debugger". The same is true of IBM VM/CMS, for assembler-level debugging. (Source-level debugging is launching a separate program though.)
One interesting feature of ITS – it had an API (called "valret" or "valretting") which an application could call to run a command in the OS shell/debugger. So basically, an application could actually control the debugger debugging it. I've never seen any other system with that feature, although it is possible to implement with GDB – allocate a buffer, put a "run this debugger command" request in it, pass it to a dummy function which just returns. Have a "processed" flag in the buffer – without a debugger, calling the dummy function will not set that flag, so the app knows no debugger is listening for commands. Now write a GDB Python script which sets a breakpoint on that function, when the breakpoint is hit, it reads the command out of the buffer, runs it, optionally writes any reply back in to it, sets the processed flag, then continues execution. The app can see the processed flag is set, so it knows the command was run, and can read any reply from the buffer too.
MS-DOS COMMAND.COM did have a somewhat related feature – INT 0x2E. You could use that to tell COMMAND.COM to run a command. The difference from e.g. the C system() function, is it didn't spawn a child process COMMAND.COM to run the command, it told the parent COMMAND.COM to run it for you.
(What many people today don't understand about MS-DOS, is it was actually a pseudo-multitasking operating system – it supported having multiple processes in memory at once, unlike many earlier operating systems such as CP/M which only supported having a single process in memory at a time – but unlike an actual multi-tasking OS, only the single foreground process could actually be running, all other processes would suspended – so you could have a child process, but you'd be suspended while it ran. An ancestor process could export an API to its descendant processes by installing an interrupt handler, which is exactly what COMMAND.COM did by installing a handler for INT 0x2E.)
I’m not sure if it is the same, but back in my Amiga-days we had Arexx which I thought was an amazing tool to do tool-automation.
To this day I haven’t seen anything quite like it. The closest is P to ably Windows and COM, but nobody likes that ;)
Can't you do this with gdb? Running `gdb -p <some pid>` pauses that process, you can inspect it, set breakpoints, change values in memory, etc, and then resume execution.
https://erlang.org/download/armstrong_thesis_2003.pdf
Chapter 5 is especially relevant:
excerpt:
What is a fault-tolerant system and how can we program it? This question is central to this thesis and to our understanding of how to build fault-tolerant systems. In this chapter we define what we mean by “fault-tolerance” and present a specific method for programing fault-tolerant systems. We start with a couple of quotations:
We say a system is fault-tolerant if its programs can be properly executed despite the occurrence of logic faults. — [16]
...
To design and build a fault-tolerant system, you must under- stand how the system should work, how it might fail, and what kinds of errors can occur. Error detection is an essential com- ponent of fault tolerance. That is, if you know an error has occurred, you might be able to tolerate it by replacing the ocending component, using an alternative means of compu- tation, or raising an exception. However, you want to avoid adding unnecessary complexity to enable fault tolerance be- cause that complexity could result in a less reliable system. — Dugan quoted in Voas [67].
The presentation here follows Dugan’s advice, I explain exactly what happens when an abnormal condition is detected and how we can make a sodware structure which detects and corrects errors.
The remainder of this chapter describes:
• A strategy for programming fault-tolerance — the strategy is to fail immediately if you cannot correct an error and then try to do some- thing that is simpler to achieve.
• Supervision hierarchies — these are hierarchical organisations of tasks.
• Well-behaved functions — are functions which are supposed to work correctly. The generation of an exception in a well-behaved function is interpreted as a failure.
* A History of Erlang
* The Development of Erlang
It's interesting to read a manpage on a slick, modern-seeming system like macOS and notice a date at the bottom which is literally last century.
I guess the key thing is the birth of self-sustaining "software ecosystems": even if the ecosystem is flawed, the benefit of being part of the ecosystem is really high, and choosing to be part of the ecosystem means adding to it, which makes the benefit of being part of it even greater. Unix is self-sustaining despite any flaws in the same way qwerty and the English language are self-sustaining despite any flaws. Unix is like a protocol for software projects to coordinate with each other and with human beings.
Ironically, if it wasn't for rapid development of hardware and broad penetration of computers throughout society, we might still be in a phase of rapid systems evolution, since the "ecosystems" wouldn't be as well-developed. Popularity increase -> lock-in.
I think the subject is right: systems software "research" is irrelevant. Because academia could no longer keep up.
IBM and Bell Labs, maybe.
A bunch of systems admins who were puzzling over how to create a standard way to administer Unix systems. The premise was "in the old IBM mainframe days, every shop ran the exact same way, so it was easy to train a new hire. Now, with Unix, there are a million different customs, so how do we standardize it?"
You probably never even thought this was a problem. My big problem was staying awake. I guess now that it's all Linux, it's easier. Back then, there was HP-UX, IBM AIX, Sequent's whatever-it-was-called, Pyramid, SCO & all the other PC variants...
The group was called Moses, which makes it almost unsearchable since there are so many other uses of that word.
I agree. In fact, since there's fewer actively used unix variants, the same job would seem simpler in many ways. I think the fragmentation of tech above the OS would be much more intimidating. So many more languages, build+deploy systems, frameworks, things like api gateways, caching platforms, load balancers, and so on. In the 1990's an admin could maintain a decent amount of personal knowledge about what a developer might be doing on the platform.
Apple's Unix variant seems fine without it though ... Of course macOS uses launchd [0] which I guess is somewhat similar. And if I am not mistaken it's released under a permissive license.
Perhaps Linux could benefit from using launchd instead of systemd?
---
It's not entirely clear whether that proposition's actually true.
I think in particular when you look at things like the ability of that operating system abstraction to handle stuff like GPU accelerated computation (CUDA and the like) it's possible that the insistence that the only abstractions we need are processes, pipes, sockets and inodes starts feeling a little limiting.
UNIX/POSIX never went beyond the basic of CLI applications and server daemons.
Indeed, I would say that it's true. I have a reference book about Unix & GNU/Linux wrote on mid/late 90's, and roughly 80% of it keeps applying to modern Linux. ps keeps being ps. Same thing with bg, chmod, etc. What really got outdated on these book, was X11 configuration (thanks!), referring to an editor called "joe", and a few bits of how install a Red Hat Linux 5.1
A complete superset of NTFS's ACLs, thus providing good cross-platform compatibility, and already implemented in illumos, Mac OS X, and FreeBSD, Linux is the only holdout on them.
As someone who has had to deal with NFSv4-styles ACLs (on an Isilon server handling Linux HPC clients): they can get really messy, really quickly (especially the inheritance aspect of them).
I'm not saying your use case is invalid; I'm actually expressing sincere curiosity: what do NFSv4 ACLs bring to the table and what problems does it solve?
NFSv4 ACLs are far more powerful, modeled after NTFS ACLs (a proper superset, with an added two permission types). In network environments (where you'd use them anyway), they can assign access control entries (ACE) with Security IDs (SIDs), generally more stable and consistent across a network than ad-hoc Unix user IDs/group IDs. Managing with UIDs/GIDs is still possible, too. They add both allow and deny permissions to ACLs; if you want to deny "fred" from reading a file, you can make a deny entry for "fred" specifically.
The fine-grained permissions you can get from NFSv4 ACLs: READ_DATA, LIST_DIRECTORY, WRITE_DATA, ADD_FILE, APPEND_DATA, ADD_SUBDIRECTORY, READ_NAMED_ATTRS, WRITE_NAMED_ATTRS, EXECUTE, DELETE_CHILD, READ_ATTRIBUTES, WRITE_ATTRIBUTES, DELETE, READ_ACL, WRITE_ACL, WRITE_OWNER, SYNCHRONIZE.
READ_DATA, WRITE_DATA, EXECUTE are equivalent to the read/write/execute Unix mode bits. The two expanded features I find I use most frequently are blocking the deletion of files and making them append-only.
Everyone who uses systemd. Try it yourself: do a getfacl on the files inside /var/log/journal on a system with persistent logging enabled (if it's disabled, these files will be at /run/log/journal instead).
This is largely true for any server you’re likely to ssh into. But the most common Linux distributions are Android which make extensive use of SELinux features.
While such systems still exist, they are a much smaller percentage of all installed systems than they used to be. Most contemporary Unix(-like) systems fall into one of two categories:
(a) single-user machines (such as a laptop)
(b) application servers, database servers, etc, which serve many users, but those users are defined at the application layer, the OS and filesystem don't know anything about them
Maybe part of the reason why filesystem ACL adoption is weaker than people expected, is that (a) and (b) don't have the same need for filesystem ACLs as the classic multi-user timesharing environments do.
> But the most common Linux distributions are Android which make extensive use of SELinux features
SELinux context and filesystem ACLs are two separate things. I see many machines with heaps of the former and little of the later (such as most Red Hat boxes).
Even with single-user machines, there is still some value in inter-process security – application sandboxing, corporate-managed devices, etc – but there are many technologies available now to meet those requirements, and filesystem ACLs are often not the most useful among them.
... added to https://github.com/globalcitizen/taoup
But if we could include these things, I'd say also:
* Epoll and kqueue. The recognition that select(2) and later poll(2) do not scale.
* Interactivity. One thing I remember about 90s Unix is how terrible the usability was on those old terminal emulators or termcaps. You'd type a backspace and see ^H. Arrow keys that didn't do the right thing. You'd log into a Linux box and by contrast you'd get good tab completion, colors, etc.
* Secure defaults. First noticed this in OpenBSD. But the internet forced everybody to reconsider the set of daemons you get on a default install.
* Deprecation of unsafe libc functions
One other improvement worth calling out is that /dev/random (or substitute your RNG method of choice) is a thousandfold better now than it was in the 90s, though Linux has a big wart with entropy pool exhaustion. BSD leading the way there from what I understand, having an RNG that Just Works. This isn't just an invisible implementation detail, it means application developers can request and use random data without a bunch of "just-in-case" bit shuffling like discarding lower bits.
Sometimes something is so painful everyone unconsciously decides choice is bad and we're all going to use $X.
That is probably true as many of those old tools kept compatibility, but at the same time we got a whole bunch of new tools, more powerful than `ps` for gaining more insights. For an example look at all the changes in service management, eBPF and such. Not to mention that the shell prompt itself (see zsh etc.) is more powerful than back then, which could give a very different experience.
So yeah, old tools keep mostly working, but improvement goes on.
Well they might freak out about what you did with telnet and how you logged in without a password.
levenez.com has been posted multiple times before in this context. There is a /unix and a /lang page under it.