System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3621: SRWs are more ______ than Critical Sections.
- A: complex
- B: lightweight
- C: slow
- D: expensive
View Answer
B
Q3622: SRW lock usage decision should be made ______.
- A: during execution
- B: before acquiring the lock
- C: after acquiring the lock
- D: before compiling
View Answer
B
Q3623: Which API is used to initialize a Slim Reader/Writer Lock?
- A: InitializeCriticalSection()
- B: InitializeMutex()
- C: InitializeSRWLock()
- D: InitSRWThreadLock()
View Answer
C
Q3624: To acquire an SRW lock in shared mode, which function is used?
- A: AcquireSRWLockExclusive()
- B: AcquireSRWLockShared()
- C: LockSRWShared()
- D: GetSRWReadLock()
View Answer
B
Q3625: Which API releases a shared SRW lock?
- A: UnlockSRWShared()
- B: ReleaseSRWLockShared()
- C: ReleaseSRWLockExclusive()
- D: ExitSRWShared()
View Answer
B
Q3626: Which API acquires an SRW lock in exclusive mode?
- A: GetSRWLockExclusive()
- B: AcquireExclusiveSRW()
- C: AcquireSRWLockExclusive()
- D: LockExclusiveSRW()
View Answer
C
Q3627: Which API is used to release an SRW lock acquired in exclusive mode?
- A: ExitSRWLockShared()
- B: ReleaseSRWLockExclusive()
- C: UnlockSRWShared()
- D: ReleaseLockExclusiveSRW()
View Answer
B
Q3628: Slim Read/Write Locks are considered ______.
- A: heavyweight
- B: kernel-based
- C: lightweight
- D: non-thread-safe
View Answer
C
Q3629: Threads should use SRW in shared mode when ______.
- A: they modify data
- B: they delete data
- C: they read data only
- D: they lock kernel
View Answer
C
Q3630: Threads writing shared data should use SRW in ______ mode.
- A: locked
- B: shared
- C: exclusive
- D: parallel
View Answer
C