System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3211: The function that allows a thread creating a mutex to gain immediate ownership is known as _______.
- A: CreateMutex()
- B: ReleaseMutex()
- C: WaitForSingleObject()
- D: OpenMutex()
View Answer
A
Q3212: CRITICAL_SECTIONs generally work _______ than mutexes.
- A: slower
- B: faster
- C: less efficiently
- D: with more overhead
View Answer
B
Q3213: A major advantage of mutexes over CRITICAL_SECTIONs is that they can be used for _______.
- A: inter-thread communication
- B: inter-process communication
- C: graphics rendering
- D: thread scheduling
View Answer
B
Q3214: If a mutex is abandoned by a thread, waiting threads will not be _______.
- A: blocked
- B: permitted
- C: ignored
- D: delayed
View Answer
A
Q3215: Mutexes allow specifying a _______ value while waiting, but CRITICAL_SECTION does not.
- A: timeout
- B: priority
- C: owner
- D: process ID
View Answer
A
Q3216: Mutexes that are _______ can be used across different processes.
- A: named
- B: unnamed
- C: signed
- D: unsigned
View Answer
A
Q3217: The term "immediate ownership" of a mutex means the creating thread _______.
- A: owns the mutex right after creation
- B: loses the mutex immediately
- C: can share ownership
- D: needs to wait for ownership
View Answer
A
Q3218: Which of the following waits cannot time out?
- A: Mutex wait
- B: CRITICAL_SECTION wait
- C: Semaphore wait
- D: Event wait
View Answer
B
Q3219: Mutexes and CRITICAL_SECTIONs differ mainly in terms of _______.
- A: performance and inter-process sharing
- B: usage and syntax
- C: platform compatibility
- D: size
View Answer
A
Q3220: The abrupt termination of a thread holding a mutex can lead to _______ if not handled properly.
- A: deadlocks
- B: unlimited access
- C: automatic recovery
- D: data corruption
View Answer
A