|
|
|
|
|
by kazinator
1339 days ago
|
|
> 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. |
|
> 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.