Recall & Review
beginner
What is a thread pool?
A thread pool is a group of pre-created threads that are ready to perform tasks. Instead of creating a new thread for each task, the system reuses threads from the pool to save time and resources.
Click to reveal answer
beginner
Why are thread pools used in operating systems?
Thread pools improve performance by reducing the overhead of creating and destroying threads repeatedly. They also help manage system resources better by limiting the number of active threads.
Click to reveal answer
intermediate
How does a thread pool manage tasks?
Tasks are placed in a queue. Threads from the pool take tasks from the queue one by one and execute them. When a thread finishes a task, it returns to the pool to wait for the next task.
Click to reveal answer
intermediate
What happens if all threads in a thread pool are busy and a new task arrives?
The new task waits in the queue until a thread becomes free. This prevents creating too many threads and keeps the system stable.
Click to reveal answer
intermediate
Name one advantage and one disadvantage of using thread pools.
Advantage: Faster task execution due to thread reuse.<br>Disadvantage: If the pool size is too small, tasks may wait too long; if too large, it may waste resources.
Click to reveal answer
What is the main purpose of a thread pool?
✗ Incorrect
Thread pools reuse existing threads to handle multiple tasks efficiently.
What happens to tasks when all threads in the pool are busy?
✗ Incorrect
Tasks wait in a queue until a thread becomes available.
Which of the following is a benefit of using thread pools?
✗ Incorrect
Thread pools help manage system resources by limiting active threads.
How does a thread pool improve performance?
✗ Incorrect
Reusing threads saves time and reduces overhead.
What is a potential downside of having a very small thread pool?
✗ Incorrect
A small pool means fewer threads, so tasks may wait longer.
Explain how a thread pool works and why it is useful in managing tasks.
Think about how tasks wait and how threads are reused.
You got /5 concepts.
Describe one advantage and one disadvantage of using thread pools in an operating system.
Consider what happens if the pool is too small or too large.
You got /4 concepts.