System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3701: Thread pools are advantageous because they
- A: are easy to use
- B: require more memory
- C: are complex to manage
- D: are slow
View Answer
A
Q3702: Instead of creating a thread directly, an application creates a ________ for thread pools.
- A: work object
- B: thread object
- C: callback function
- D: handle
View Answer
A
Q3703: What does each work object in a thread pool have?
- A: An ID number
- B: A handle-like structure
- C: A priority level
- D: An error code
View Answer
B
Q3704: Thread pools manage a small number of ________.
- A: worker threads
- B: processes
- C: memory blocks
- D: handles
View Answer
A
Q3705: Who assigns worker threads to each work object in Windows?
- A: CPU
- B: Windows scheduler
- C: Windows
- D: Kernel
View Answer
B
Q3706: What does a worker thread do when executing a work object?
- A: Invokes a callback function
- B: Starts a new thread
- C: Terminates the process
- D: Releases the semaphore
View Answer
A
Q3707: When a worker object finishes execution, the worker thread
- A: terminates
- B: creates a new thread
- C: returns to Windows thread pool
- D: invokes another work object
View Answer
D
Q3708: Within the callback function, a work object should never invoke
- A: _endthreadex()
- B: _exit()
- C: _sleep()
- D: _yield()
View Answer
A
Q3709: Windows adjusts the number of worker threads ________ based on process behavior.
- A: manually
- B: dynamically
- C: statically
- D: periodically
View Answer
B
Q3710: Applications can set ________ for the number of worker threads in thread pools.
- A: CPU affinity
- B: priority
- C: upper and lower bounds
- D: process limits
View Answer
C