2022-04-24
- Address space
- Virtual memory
- Program is "alive": OS allocates resource for a program
- Stack vs. Heap
- Process vs. Thread
- Reason for thread: speed up (context switching)
- Reason for process: split memory
- Balancing: process for "big" code and thread for "small" code
- Which to use: depends on the problem, not computer
- Co-design: design coupled but fast system
- Never enforce instruction order that does not actually exists (necessary)
- Client/Server with threads
- Threads within clients: RMI as an example
- Multi-threaded server architectures
- Worker pool: fixed pool of worker threads; inflexible
- thread per request/connection/client
- Thread-per-Request: Max throughput, high overhead over creation & destruction
- Thread-per-Connection: lower overhead, unbalanced load
- Thread-per-Object
- Server threads and throughput