System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 177
Q3901:
Cilk++ supports
A. parallel programming in C and C++
B. only Java programming
C. language independent programming
D. sequential programming
Correct Answer:
A
Chapter: 178
Q3902:
Identifying independent subtasks in parallel programming is
A. always easy
B. especially difficult with older serialized codes
C. never required
D. simpler with global variables
Correct Answer:
B
Chapter: 178
Q3903:
Having too many subtasks in a parallel program
A. may improve performance
B. can degrade performance
C. has no effect
D. increases memory only
Correct Answer:
B
Chapter: 178
Q3904:
Excessive use of locking in parallel programs
A. can degrade performance
B. improves speed
C. avoids race conditions
D. makes debugging easier
Correct Answer:
A
Chapter: 178
Q3905:
Global variables in parallel programs
A. can cause problems
B. are always safe
C. to speed up execution
D. are replaced automatically
Correct Answer:
A
Chapter: 178
Q3906:
Updating global counters in parallel requires
A. careful synchronization
B. ignoring updates
C. using local variables only
D. using print statements
Correct Answer:
A
Chapter: 178
Q3907:
Memory cache architecture can cause
A. performance issues in parallelism
B. only benefits performance
C. does not affect multicore chips
D. makes parallelism easier
Correct Answer:
A
Chapter: 178
Q3908:
Multicore chips may cause subtle
A. performance issues due to memory cache architecture
B. problems with synchronization
C. only help increase speed
D. have no disadvantages
Correct Answer:
A
Chapter: 178
Q3909:
Threads are
A. always simple to use
B. straightforward but with pitfalls
C. only used in serial programming
D. unrelated to parallelism
Correct Answer:
B
Chapter: 178
Q3910:
Parallelism challenges include
A. all of the above
B. only memory issues
C. only global variables
D. only thread management
Correct Answer:
A
Chapter: 179
Q3911:
Processor affinity refers to
A. binding a thread to a specific processor
B. allowing a thread to run on any processor
C. letting the OS decide thread scheduling
D. assigning all threads to one processor
Correct Answer:
A
Chapter: 179
Q3912:
The main goal of processor affinity
A. is to schedule threads on specific CPU cores
B. to run threads randomly
C. to maximize thread migration
D. to disable threading
Correct Answer:
A
Chapter: 179
Q3913:
Assigning processor affinity can help minimize
A. delay caused due to memory barriers
B. increase thread migration
C. delays in I/O operations
D. decrease CPU speed
Correct Answer:
A
Chapter: 179
Q3914:
Processor affinity can be used to dedicate
A. a processor to a small set of threads
B. all threads to one processor
C. disable threads
D. enable hyper-threading
Correct Answer:
A
Chapter: 179
Q3915:
Windows can still schedule its own threads
A. on a processor with affinity
B. on all processors except affinity processors
C. only on affinity processors
D. nowhere
Correct Answer:
A
Chapter: 179
Q3916:
Processor affinity is useful for
A. testing specific processor cores
B. ignoring thread synchronization
C. improving network speed
D. disabling multitasking
Correct Answer:
A
Chapter: 179
Q3917:
Worker threads contending for a single resource
A. can be allocated to a single processor
B. should be spread across all processors
C. are not affected by affinity
D. should avoid affinity
Correct Answer:
A
Chapter: 179
Q3918:
Processor affinity can effectively reduce
A. cache issues
B. memory leaks
C. network latency
D. disk I/O delays
Correct Answer:
A
Chapter: 179
Q3919:
Binding a thread to a processor core is also called
A. processor affinity
B. thread pinning
C. thread pooling
D. thread scheduling
Correct Answer:
A
Chapter: 179
Q3920:
Processor affinity setting can be used for
A. diagnostic purposes
B. thread creation
C. resource locking
D. thread termination
Correct Answer:
A