Address Space
Uniprogramming: one process at a time
Multiprogramming: multiple processes, when one waits, switch to another
AS: all memory a process can address
there’s a 1-1 mapping between process and address space
- OS isolates address spaces
- One process can’t access another’s address space
- Same pointer address in different processes point to different memory
Cooperating Processes
2 Models: Message Passing and Shared Memory
- Message passing
- Pros: All sharing is explicit, there’s less chance for error
- Cons: Overhead, data copying, cross protection domains
- Shared Memory
- Pros: Performance. Only need to set up shared memory once, then access without crossing protection domains
- Cons: things can change behind your back → error prone