Without any context it is indeed impossible to point out a winner. There are more things to consider than just the technical, performance related questions. Like
Location (can the tasks run on the same machine?)
Are the tasks depending on each other in terms of execution order or data needs?
The responsibilities for the tasks at hand (who is to do or ...
It is possible, but this is not always fully desirable. POSIX (Portable Operating System Interface) defines the behavior expected from a filesystem and it's API to be OS-portable.
The problem is that when designing a file system you usually have a set of workloads you want to optimize, and sometimes the POSIX semantics makes this optimization challenging.
It may help to highlight the basics here. Note that memory protection is usually something built-in on the hardware level of modern processors. For the Intel family this started with the 80286 processor. Memory management features were further enhanced with the 80386 architecture which lived on for a long time. The point is, to implement these features in ...
Basic hardware architecture
First thing first. If you are emulating a Von Newman architecture (instead of a Harvard architecture). You have the code in the same array as the data. I am assuming Von Newman. Then your big array is both for data and code.
What the operating system does
Ideally an operating system should create the illusion that the process ...
As wikipedia says, you allocate a process to an address space, and don't let the address spaces overlap.
The question is somewhat disconnected from reality but it highlights some interesting engineering topics.
First things first: define the requirements
“Better” must be better defined: is it better robustness or better performance ?
Better robustness ?
The answer should be 100 processes: if any of the process would fail, the others would continue to work.
In my opinion the 100 threads solution is (in general) worse because:
threads shares the same memory, which means one misbehaving thread can corrupt another thread's memory
there is no well-defined inter process communication, threads simply write into each other's memory.
creating a new thread is as cheap as creating a new process in well-designed systems (...