> It is because UNIX is written in the C language that there are even multiple flat address spaces instead of segments or a single address space systemwide.
That is flat out wrong. C supports multi-programming in a system that has one address space (that includes the kernel too). Programs just have to be compiled relocatable.
You know, like what happens with shared libraries: which are written in C, and get loaded at different addresses in the same space, yet access their own functions and variables just fine.
Multics used segments and Lisp Machines had a single address space. UNIX breaks down quickly without multiple fake single address spaces for each program.
> Programs just have to be compiled relocatable.
Yes, and with unrestricted memory access, one program can crash the entire system.
> You know, like what happens with shared libraries: which are written in C, and get loaded at different addresses in the same space, yet access their own functions and variables just fine.
That is except when one piece manipulates global state in a way with which another piece can't cope, and at best the whole thing crashes. Dynamic linking in UNIX is so bad some believe it can't work, and instead use static linking exclusively.
> UNIX breaks down quickly without multiple fake single address spaces for each program.
So do MS-DOS, Mac OS < 9, and others: any non-MMU OS.
> Yes, and with unrestricted memory access, one program can crash the entire system.
That's true in any system with no MMU that runs machine-language native executables written in assembly language or using unsafe compiled languages.
Historically, there existed partition-based memory management whereby even in a single physical address space, programs are isolated from stomping over each other.
> when one piece manipulates global state in a way with which another piece can't cope
This problem is the same with both static and dynamic linking.
And lisp too!
> UNIX breaks down quickly without multiple fake single address spaces for each program.
Citation needed. I don't think my programs very commonly try to go completely outside their address space. The closest thing I see is null pointer crashes, which are still not very common, and those would work the same way in a shared address space.
Edit: Yes, fork doesn't work the same. That's a very narrow use case on the vast majority of machines.
But this isn't about address spaces. They're moving connections between hardware hosts. It sounds like you're got your drum to beat but this isn't about that.
That is flat out wrong. C supports multi-programming in a system that has one address space (that includes the kernel too). Programs just have to be compiled relocatable.
You know, like what happens with shared libraries: which are written in C, and get loaded at different addresses in the same space, yet access their own functions and variables just fine.