System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3201: Which of the following helps in avoiding concurrency-related deadlocks?
- A: Busy waiting
- B: Random thread scheduling
- C: Consistent mutex acquisition order
- D: Recursive locking
View Answer
C
Q3202: To synchronize access to two shared lists without performance degradation, one should use
- A: one mutex per list
- B: single shared mutex
- C: memory barriers
- D: interrupt handlers
View Answer
A
Q3203: Deadlocks are likely when multiple threads lock resources in _______ order.
- A: same
- B: random
- C: sequential
- D: nested
View Answer
B
Q3204: Mutexes and CRITICAL_SECTIONs are used to _______.
- A: lock memory
- B: protect resources from concurrent access
- C: create threads
- D: manage file I/O
View Answer
B
Q3205: Both mutexes and CRITICAL_SECTIONs can be owned by a _______ thread.
- A: single
- B: multiple
- C: system
- D: user
View Answer
A
Q3206: Other threads trying to access a resource owned by a mutex or CS are _______ until the resource is released.
- A: granted
- B: denied
- C: ignored
- D: delayed
View Answer
B
Q3207: Mutexes that are abandoned due to abrupt thread termination are _______ automatically.
- A: blocked
- B: signaled
- C: ignored
- D: deleted
View Answer
B
Q3208: Abrupt termination of a thread holding a mutex indicates a serious _______.
- A: system error
- B: programming flaw
- C: memory leak
- D: security breach
View Answer
B
Q3209: Mutex waits can ________, whereas CRITICAL_SECTION waits cannot.
- A: timeout
- B: fail
- C: wait
- D: retry
View Answer
A
Q3210: Mutexes can be named and shared across _______.
- A: threads in the same process
- B: threads in different processes
- C: files
- D: consoles
View Answer
B