System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3181: The lpMutexName can be NULL for _______ mutexes.
- A: private
- B: process global
- C: thread local
- D: unnamed
View Answer
D
Q3182: Ownership is automatically given to the calling thread when bInitialOwner is _______.
- A: NULL
- B: 1
- C:
- D: 0
View Answer
B
Q3183: Mutexes are helpful in _______ operations where resources are shared.
- A: local
- B: sequential
- C: concurrent
- D: independent
View Answer
C
Q3184: ReleaseMutex() will _______ if the thread does not own the mutex.
- A: return TRUE
- B: throw exception
- C: fail silently
- D: fail
View Answer
A
Q3185: Windows mutexes support timeout values for _______ functions.
- A: ReleaseMutex()
- B: OpenMutex()
- C: CreateMutex()
- D: WaitForSingleObject()
View Answer
D
Q3186: Deadlocks may arise when _______ are used.
- A: threads
- B: memory buffers
- C: Mutexes or CRITICAL SECTIONS
- D: queues
View Answer
C
Q3187: Deadlock is a byproduct of _______.
- A: concurrency control
- B: error handling
- C: memory management
- D: process scheduling
View Answer
A
Q3188: What happens in a deadlock situation?
- A: Threads execute in parallel
- B: Memory is automatically freed
- C: Two or more objects try to lock the same resource at the same time
- D: CPU runs in idle state
View Answer
C
Q3189: Using concurrency objects improperly can lead to _______.
- A: high performance
- B: deadlocks
- C: lost data
- D: thread priority issues
View Answer
B
Q3190: If an element is allowed only when present in both lists or none, what must be synchronized?
- A: Only one list
- B: No list
- C: Only insert operations
- D: Both lists
View Answer
D