Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 145
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
Correct Answer: C
Chapter: 145
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
Correct Answer: A
Chapter: 145
Q3203:
Deadlocks are likely when multiple threads lock resources in _______ order.
A. same
B. random
C. sequential
D. nested
Correct Answer: B
Chapter: 146
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
Correct Answer: B
Chapter: 146
Q3205:
Both mutexes and CRITICAL_SECTIONs can be owned by a _______ thread.
A. single
B. multiple
C. system
D. user
Correct Answer: A
Chapter: 146
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
Correct Answer: B
Chapter: 146
Q3207:
Mutexes that are abandoned due to abrupt thread termination are _______ automatically.
A. blocked
B. signaled
C. ignored
D. deleted
Correct Answer: B
Chapter: 146
Q3208:
Abrupt termination of a thread holding a mutex indicates a serious _______.
A. system error
B. programming flaw
C. memory leak
D. security breach
Correct Answer: B
Chapter: 146
Q3209:
Mutex waits can ________, whereas CRITICAL_SECTION waits cannot.
A. timeout
B. fail
C. wait
D. retry
Correct Answer: A
Chapter: 146
Q3210:
Mutexes can be named and shared across _______.
A. threads in the same process
B. threads in different processes
C. files
D. consoles
Correct Answer: B
Chapter: 146
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()
Correct Answer: A
Chapter: 146
Q3212:
CRITICAL_SECTIONs generally work _______ than mutexes.
A. slower
B. faster
C. less efficiently
D. with more overhead
Correct Answer: B
Chapter: 146
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
Correct Answer: B
Chapter: 146
Q3214:
If a mutex is abandoned by a thread, waiting threads will not be _______.
A. blocked
B. permitted
C. ignored
D. delayed
Correct Answer: A
Chapter: 146
Q3215:
Mutexes allow specifying a _______ value while waiting, but CRITICAL_SECTION does not.
A. timeout
B. priority
C. owner
D. process ID
Correct Answer: A
Chapter: 146
Q3216:
Mutexes that are _______ can be used across different processes.
A. named
B. unnamed
C. signed
D. unsigned
Correct Answer: A
Chapter: 146
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
Correct Answer: A
Chapter: 146
Q3218:
Which of the following waits cannot time out?
A. Mutex wait
B. CRITICAL_SECTION wait
C. Semaphore wait
D. Event wait
Correct Answer: B
Chapter: 146
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
Correct Answer: A
Chapter: 146
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
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now