Chapter 4 - Threads Flashcards
What is a thread?
A fundamental unit of CPU utilization that forms the basis of multi-threaded computer systems
How does process creation compare to thread creation?
Process creation is heavy-weight while thread creation is light-weight
What are the specific advantages of thread creation vs process creation?
It can simplify code and increase efficiency
Are kernels generally single-threaded or multi-threaded?
Multi-threaded
What are the three multi-threading models?
1) Many-to-One
2) One-to-One
3) Many-to-Many
What is the Many-to-One multi-threading model?
Many user-level threads mapped to a single kernel thread
What is the One-to-One multi-threading model?
Each user-level thread maps to a kernel thread
What does the thread library provide?
Provided programmer with API for creating and managing threads
What are the four issues faced when using threads?
1) Thread cancellation
2) Signal Handling
3) Thread-Specific Data Handling
4) Scheduler Activations
What are the types thread cancellation?
Asynchronous and deferred cancellation
What is asynchronous thread cancellation?
Terminating the target thread immediately
What is deferred thread cancellation?
Allowing the target thread to periodically check if it should be cancelled
What is the signal handler?
Processes signals generated by a particular event, delivers to a process, where it is handled