System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 124
Q2681:
The API used to get thread priority is ________.
A. GetThreadPriority
B. SetThreadPriority
C. SetPriorityClass
D. GetPriorityClass
Correct Answer:
A
Chapter: 124
Q2682:
Thread priorities are dynamic and can change with process priority or be boosted by ________.
A. Windows
B. CPU
C. Kernel
D. Memory
Correct Answer:
A
Chapter: 124
Q2683:
The feature to enable or disable priority boosting is controlled by ________.
A. SetThreadPriorityBoost
B. SetPriorityClass
C. CreateProcess
D. GetThreadPriority
Correct Answer:
A
Chapter: 124
Q2684:
In Windows multithreading, thread priority can range from ________ to ________ relative to process priority.
A. -2 to +2
B. 0 to +5
C. -5 to +5
D. 1 to 10
Correct Answer:
A
Chapter: 124
Q2685:
Threads that are waiting, suspended, or blocked are considered ________ for scheduling.
A. not ready
B. ready
C. running
D. finished
Correct Answer:
A
Chapter: 125
Q2686:
A thread is in the running state when it is _______.
A. running on a processor
B. waiting for I/O
C. suspended
D. terminated
Correct Answer:
A
Chapter: 125
Q2687:
On a multiprocessor computer, ________ threads can be in the running state simultaneously.
A. more than one
B. only one
C. none
D. only two
Correct Answer:
A
Chapter: 125
Q2688:
A thread enters the wait state when it performs a wait on a ________ handle.
A. non-signaled
B. signaled
C. terminated
D. running
Correct Answer:
A
Chapter: 125
Q2689:
When a thread is waiting for disk or data transfer, it is commonly called ________.
A. blocked
B. running
C. ready
D. terminated
Correct Answer:
A
Chapter: 125
Q2690:
A thread is ready if it could be _______.
A. running
B. suspended
C. terminated
D. blocked
Correct Answer:
A
Chapter: 125
Q2691:
The thread moves through the ________ state before entering the ready state.
A. standby
B. running
C. waiting
D. terminated
Correct Answer:
A
Chapter: 125
Q2692:
The scheduler runs the highest-priority ready thread when a ________ becomes available.
A. processor
B. thread
C. disk
D. memory
Correct Answer:
A
Chapter: 125
Q2693:
If several threads have the same high priority, the scheduler runs the one that has been in the ready state for the ________.
A. longest time
B. shortest time
C. medium time
D. least time
Correct Answer:
A
Chapter: 125
Q2694:
When a thread’s time slice expires without waiting, the executive moves the thread from running to ________.
A. ready
B. waiting
C. terminated
D. suspended
Correct Answer:
A
Chapter: 125
Q2695:
The executive places a thread in the ready state as soon as the appropriate handles are ________.
A. signaled
B. blocked
C. terminated
D. suspended
Correct Answer:
A
Chapter: 125
Q2696:
A thread can be suspended regardless of its ________.
A. state
B. priority
C. CPU usage
D. memory usage
Correct Answer:
A
Chapter: 125
Q2697:
A suspended ready thread ________ be run by the scheduler.
A. will not
B. will
C. sometimes
D. always
Correct Answer:
A
Chapter: 125
Q2698:
If a running thread is suspended, it is placed in the ________ state.
A. ready
B. running
C. waiting
D. terminated
Correct Answer:
A
Chapter: 125
Q2699:
A thread is in the terminated state after it ________.
A. terminates
B. starts
C. waits
D. suspends
Correct Answer:
A
Chapter: 125
Q2700:
A terminated thread remains in the terminated state as long as there are any open ________ on it.
A. handles
B. processes
C. threads
D. schedulers
Correct Answer:
A