Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3631: Which of the following is NOT a valid SRW API?
  • A: InitializeSRWLock()
  • B: AcquireSRWLockExclusive()
  • C: ReleaseSRWLockShared()
  • D: SetSRWSpinCount()
View Answer
D

Q3632: If a thread is only reading and not modifying data, it should use SRW in ______.
  • A: shared mode
  • B: exclusive mode
  • C: read/write mode
  • D: critical mode
View Answer
A

Q3633: Exclusive mode SRWs are similar to usage of ______.
  • A: Semaphores
  • B: Mutexes or Critical Sections
  • C: Pipes
  • D: Events
View Answer
B

Q3634: SRW APIs must be used according to ______.
  • A: thread count
  • B: thread IDs
  • C: access type (read/write)
  • D: processor architecture
View Answer
C

Q3635: AcquireSRWLockShared() is called when ______.
  • A: data is being written
  • B: data is being deleted
  • C: data is being read only
  • D: data is being compiled
View Answer
C

Q3636: ReleaseSRWLockExclusive() is called after ______.
  • A: thread creation
  • B: reading data
  • C: updating shared variable
  • D: initializing SRW
View Answer
D

Q3637: To protect shared data with no modification, SRW should be used in ______.
  • A: both modes
  • B: critical mode
  • C: shared mode
  • D: exclusive mode
View Answer
C

Q3638: AcquireSRWLockExclusive() is the counterpart of ______.
  • A: ReleaseSRWLockShared()
  • B: AcquireSRWLockShared()
  • C: ReleaseSRWLockExclusive()
  • D: InitSRWLock()
View Answer
C

Q3639: SRW Locks can be used similarly to CS or MUTEX in ______.
  • A: shared mode
  • B: non-blocking mode
  • C: exclusive mode
  • D: scheduler mode
View Answer
C

Q3640: The API used to release an SRW lock after shared reading is ______.
  • A: FreeSRWLock()
  • B: ReleaseSRWLockExclusive()
  • C: ReleaseSRWLockShared()
  • D: UnlockSRW()
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now