Concurrency
Concurrency is the ability of a program to have parts of it be executed out-of-order in parallel.
Granularities of Concurrency
Process:
- Scheduling done by OS
- Own virtual address space
- Can communicate with other processes using IPC methods
- Each process can have multiple states of code executions, i.e. threads
Thread:
- Has its own instruction pointer
- Has a state of the registers in the processor
Fiber:
- A "manual version" of a thread, i.e. without hardware backing
- A software method of overlapping work