死锁产生条件
- Mutual Exclusion: Only one process can access a resource at a given time. Or, more accurately, there is limited access to a resource. A deadlock could also occur if a resource has limited quantity.
- Hold and wait: Processes already holding a resource can request additional resources, without relinquishing their current resources
- No preemption: One process cannot forcibly remove another process' resource
- Circular wait: Two or more processes form a circular chain where each process is waiting on another resource in the chain
Questions:
Thread vs. Process
Difference between thread and process
Context Switch
How would you measure the time spent in a context switch?