| Asynchronous processor interrupts have analogues to basically all these issues that signals do. Signals are certainly a pain to implement and get right, but people seem to think they're something that they aren't, or expect them to be used for something they can't do. Clearly signals aren't a message passing scheme, they're a notification system. And obviously taking an asynchronous interrupt needs to use reentrant code. As for the fork paper, seems like a typical academic type of critique. "Fork today is a convenient API for a single-
threaded process with a small memory footprint and simple
memory layout that requires fine-grained control over the
execution environment of its children but does not need
to be strongly isolated from them." I.e., exactly what it is good for and used for. And it goes on "Fork is incompatible with a single address space.
Many modern contexts restrict execution to a single address
space, including picoprocesses [42], unikernels [ 53], and en-
claves [ 14]." And talking about heterogeneous address spaces, and all other things academics love but nobody really uses. They also make pretty outlandish claims "Fork infects an entire system." based on the Windows implementation where the Win32 API and kernel explicitly do not implement fork. And it's provocative language "infects" -- the Linux kernel fork implementation is maybe a thousand lines of C code. And that does not constrain it or prevent it offering several of the suggested alternatives. K42 was also a failure of a research operating system, and another microkernel (surprise). Turns out (as usual) that designing a system around some latest craze or fad in technology no matter how good (RCU and other lock free algorithms) rather than designing it to deal with workloads that people actually use, is still the recipe for disaster and one of the main causes of second system syndrome. |
I know. That doesn't really excuse the suckiness of asynchronous signals. It's quite simply stupid to have operating system facilities that are as limited as actual hardware interfaces. With signals, you're supposed to write code like your computer is a Super Nintendo or something.
> Clearly signals aren't a message passing scheme, they're a notification system.
Signals suck as a notification system too, simply because there is no queue. You're supposed to be notified by a signal when a child process exits but the system can actually lose that information forever in certain conditions which means it is literally impossible to build truly correct software, best you get is good enough. You also get a signal when you write to a pipe with no readers or when the terminal is resized, making it that much more of a pain to deal with that stuff.
People build literal user interfaces using signals. SIGINT and SIGTERM, everybody knows about that. SIGHUP to make some running process reload configuration or something. Even dd prints a progress report if you send SIGUSR1, how insane is that? I really don't want to think about signal insanity when doing important I/O operations.
> And talking about heterogeneous address spaces, and all other things academics love but nobody really uses.
The paper mentions several concrete examples in wide use right now even in consumer machines. Systems on a chip with accelerators, GPUs...