Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3031: Shared variables like request counters are prone to ________ if not protected.
  • A: memory leaks
  • B: race conditions
  • C: segmentation faults
  • D: deadlocks
View Answer
B

Q3032: The use of intermediate variables helps to ________ the critical section logic.
  • A: reduce clarity
  • B: complicate code
  • C: emphasize
  • D: delay execution
View Answer
C

Q3033: The purpose of protecting shared variables is to maintain ________.
  • A: data consistency
  • B: thread duplication
  • C: CPU cycle optimization
  • D: cache invalidation
View Answer
A

Q3034: In the given example, CRITICAL_SECTION was used to protect ________.
  • A: log messages
  • B: string literals
  • C: status counters
  • D: binary files
View Answer
C

Q3035: The term “shared variable” refers to variables that are ________ by multiple threads.
  • A: stored
  • B: accessed
  • C: ignored
  • D: owned
View Answer
B

Q3036: If a thread enters a CRITICAL_SECTION, other threads attempting to enter are ________.
  • A: terminated
  • B: blocked
  • C: skipped
  • D: reversed
View Answer
B

Q3037: The CRITICAL_SECTION construct avoids the occurrence of ________ while accessing shared data.
  • A: signal overflow
  • B: data fragmentation
  • C: race conditions
  • D: memory exhaustion
View Answer
C

Q3038: Only ________ thread can modify a shared variable at a time when using CRITICAL_SECTION.
  • A: one
  • B: two
  • C: all
  • D: background
View Answer
A

Q3039: The shared variable modification in CRITICAL_SECTION is done in a ________ manner.
  • A: random
  • B: nested
  • C: mutually exclusive
  • D: repeated
View Answer
C

Q3040: Shared variables must be protected by ________ synchronization object across all threads.
  • A: multiple
  • B: any random
  • C: a single
  • D: a dynamic
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now