Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 125
Q2701:
The programmer can specify a thread’s ________ to limit which processors run that thread.
A. processor affinity
B. priority
C. time slice
D. state
Correct Answer: A
Chapter: 125
Q2702:
The function to set a thread’s preferred processor is ________.
A. SetThreadIdealProcessor
B. SetProcessAffinityMask
C. GetProcessAffinityMask
D. GetThreadPriority
Correct Answer: A
Chapter: 125
Q2703:
SetProcessAffinityMask helps allocate ________ to threads to assure responsiveness.
A. processors
B. memory
C. time slices
D. priority
Correct Answer: A
Chapter: 125
Q2704:
The scheduler places a ready thread on any available ________ unless restricted by affinity.
A. processor
B. thread
C. memory
D. priority
Correct Answer: A
Chapter: 125
Q2705:
The term used when a thread wakes up after waiting is that it transitions to the ________ state.
A. ready
B. running
C. waiting
D. terminated
Correct Answer: A
Chapter: 126
Q2706:
Threads execute ________, which means they do not run in a fixed sequence by default.
A. asynchronously
B. synchronously
C. sequentially
D. repeatedly
Correct Answer: A
Chapter: 126
Q2707:
Without explicit sequencing, thread execution order is ________.
A. unpredictable
B. fixed
C. controlled
D. linear
Correct Answer: A
Chapter: 126
Q2708:
It is possible for a child thread to run to completion before the ________ thread.
A. parent
B. sibling
C. scheduler
D. main
Correct Answer: A
Chapter: 126
Q2709:
On a multiprocessor computer, the parent and child threads may run ________.
A. concurrently
B. sequentially
C. suspended
D. terminated
Correct Answer: A
Chapter: 126
Q2710:
Initialization required by a child thread must be performed before calling ________.
A. CreateThread()
B. StartThread()
C. RunThread()
D. ExecuteThread()
Correct Answer: A
Chapter: 126
Q2711:
If initialization is not complete, a thread can be suspended until the ________ is ready.
A. data
B. processor
C. scheduler
D. memory
Correct Answer: A
Chapter: 126
Q2712:
The “race condition” occurs when the parent ________ the child to initialize data.
A. races
B. waits
C. suspends
D. blocks
Correct Answer: A
Chapter: 126
Q2713:
Any thread can be preempted or resumed at ________ time.
A. any
B. scheduled
C. fixed
D. the end
Correct Answer: A
Chapter: 126
Q2714:
Synchronization and priority in threads are ________ concepts.
A. different
B. the same
C. similar
D. unrelated
Correct Answer: A
Chapter: 126
Q2715:
Threads are created with defined ________.
A. priorities
B. synchronization
C. time slices
D. memory sizes
Correct Answer: A
Chapter: 126
Q2716:
Synchronization ensures that one thread completes its task before another thread ________.
A. runs
B. suspends
C. terminates
D. starts
Correct Answer: A
Chapter: 126
Q2717:
Testing alone is ________ to ensure multithreaded program correctness.
A. necessary but not sufficient
B. fully sufficient
C. unnecessary
D. optional
Correct Answer: A
Chapter: 126
Q2718:
Threaded program behavior can vary based on processor speed, number of processors, and ________.
A. OS version
B. code length
C. memory size
D. thread priority
Correct Answer: A
Chapter: 126
Q2719:
The default stack size for a thread is ________.
A. 1MB
B. 512KB
C. 2MB
D. 256KB
Correct Answer: A
Chapter: 126
Q2720:
Threads should be used only when activities are naturally ________.
A. concurrent
B. sequential
C. complex
D. redundant
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now