Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 179
Q3921:
Assigning a thread to processor affinity improves
A. cache locality
B. processor temperature
C. thread priority
D. process creation time
Correct Answer: A
Chapter: 179
Q3922:
Processor affinity can help in improving
A. performance by reducing cache misses
B. thread creation speed
C. process termination
D. speed of disk access
Correct Answer: A
Chapter: 179
Q3923:
Processor affinity can exclude other threads
A. from a dedicated processor
B. from all processors
C. from the network
D. from the disk
Correct Answer: A
Chapter: 179
Q3924:
Processor affinity is mostly controlled by
A. the kernel
B. user application
C. compiler
D. settings
Correct Answer: A
Chapter: 180
Q3925:
What does the system affinity mask indicate?
A. processors configured on the system
B. processors used by a process
C. threads running on the system
D. memory allocation
Correct Answer: A
Chapter: 180
Q3926:
Process affinity mask indicates
A. the processors that can be used by process threads
B. total system memory
C. the number of running threads
D. the number of active users
Correct Answer: A
Chapter: 180
Q3927:
By default, the process affinity mask is
A. the same as the system affinity mask
B. different from the system mask
C. always zero
D. always one
Correct Answer: A
Chapter: 180
Q3928:
Thread affinity mask is a
A. subset of the process affinity mask
B. total system mask
C. system affinity mask
D. unrelated to process mask
Correct Answer: A
Chapter: 180
Q3929:
SetProcessAffinityMask function sets
A. the process affinity mask
B. thread affinity mask
C. system affinity mask
D. memory allocation mask
Correct Answer: A
Chapter: 180
Q3930:
The new process affinity mask must be
A. a subset of the mask returned by GetProcessAffinityMask()
B. any random value
C. the full system mask
D. always zero
Correct Answer: A
Chapter: 180
Q3931:
SetThreadAffinityMask function returns
A. the previous thread affinity mask
B. a boolean value
C. a pointer
D. to the process affinity mask
Correct Answer: A
Chapter: 180
Q3932:
SetProcessAffinityMask function returns
A. a BOOL
B. the previous mask
C. a pointer
D. an integer
Correct Answer: A
Chapter: 180
Q3933:
The process affinity mask affects
A. all the threads in the process
B. only the main thread
C. only new threads
D. only system threads
Correct Answer: A
Chapter: 180
Q3934:
Initially, thread affinity mask
A. is the same as process affinity mask
B. zero
C. one
D. system affinity mask
Correct Answer: A
Chapter: 180
Q3935:
Process affinity masks are
A. bit vectors
B. integers
C. strings
D. floating-point numbers
Correct Answer: A
Chapter: 180
Q3936:
Which API is used to set the thread affinity mask?
A. SetThreadAffinityMask
B. GetProcessAffinityMask
C. SetProcessAffinityMask
D. SetSystemAffinityMask
Correct Answer: A
Chapter: 180
Q3937:
If the system affinity mask has the bit value '1', it means that the processor is
A. configured on the system
B. not configured
C. disabled
D. offline
Correct Answer: A
Chapter: 180
Q3938:
The thread affinity mask can only be a
A. subset of the process affinity mask
B. any random value
C. always the same as system mask
D. always zero
Correct Answer: A
Chapter: 181
Q3939:
Inter-process communication (IPC) is used to
A. pass information among processes
B. manage memory
C. handle user input
D. control threads
Correct Answer: A
Chapter: 181
Q3940:
A pipe used for IPC is usually
A. a file-like object
B. a database
C. a network socket
D. a hardware device
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now