4 ms·
It is only half the story. In reality it is isolated resources: memory, CPU usage, files, sockets, ... The key benefit is that a single process has a harder ti
by jlouis 10y ago
It is only half the story. In reality it is isolated resources: memory, CPU usage, files, sockets, ...
The key benefit is that a single process has a harder time monopolizing the system and taking over the system as a whole. This allows you to write code where the code is known to be suboptimal because it cannot take over the machine. In contrast, many other systems relies on a proactive model where each line of code has to be scrutinized for utmost correctness, or your system as a whole will fall.
As for the faults, there is a subtle but important difference compared to exceptions: you handle any error, not just the ones you figured could happen. And because resources are bound to processes, when the process goes away, so does its resource. Usually you would have to handle this in other languages.
The final point is that a fault is made transient: the system recovers and reestablishes the last known good state/invariant of the system. This allows you to try again which often handles the fault. And if it keeps failing, the fault is escalated to gradually larger and larger parts of the program.
There is nothing magical about the model. It is just that other languages have next to no convenient support for it.