0
0
Operating Systemsknowledge~5 mins

Thread pools in Operating Systems - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ATo delete threads after each task
BTo create a new thread for every task
CTo run tasks sequentially without threads
DTo reuse threads for multiple tasks
What happens to tasks when all threads in the pool are busy?
AThey wait in a queue
BThey are ignored
CThey run without threads
DThey cause the system to crash
Which of the following is a benefit of using thread pools?
ASlower task execution
BIncreased overhead from creating threads
CBetter resource management
DUnlimited number of threads
How does a thread pool improve performance?
ABy creating threads only when needed
BBy reusing threads instead of creating new ones
CBy running tasks one at a time
DBy avoiding the use of threads
What is a potential downside of having a very small thread pool?
ATasks may wait too long to be executed
BToo many threads consume resources
CThreads never get reused
DTasks run without any delay
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.