Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 154
Q3421:
If a thread terminates while inside a critical section without releasing it, other threads will ________.
A. Be blocked
B. Proceed normally
C. Skip the critical section
D. Be terminated
Correct Answer: A
Chapter: 154
Q3422:
Mutex abandonment occurs when a thread or process owning the mutex ________.
A. Terminates without releasing it
B. Releases it properly
C. Locks another mutex
D. Deadlocks
Correct Answer: A
Chapter: 154
Q3423:
Abandoned mutex handles are ________ by the operating system.
A. Signaled
B. Blocked
C. Destroyed
D. Delayed
Correct Answer: A
Chapter: 154
Q3424:
The feature of mutex abandonment is ________ available with Critical Sections.
A. Not
B. Always
C. Sometimes
D. Usually
Correct Answer: A
Chapter: 154
Q3425:
When using WaitForSingleObject() with a timeout, if the wait ends due to timeout, the program must ________.
A. Release the resource
B. Ignore it
C. Retry indefinitely
D. Log the event
Correct Answer: A
Chapter: 154
Q3426:
Only ________ waiting thread at a time is given ownership of a mutex.
A. One
B. Two
C. Multiple
D. All
Correct Answer: A
Chapter: 154
Q3427:
Which system component decides which thread gets mutex ownership based on priority?
A. OS Scheduler
B. Programmer
C. User
D. Input device
Correct Answer: A
Chapter: 154
Q3428:
A single mutex can protect ________ critical regions accessed by competing threads.
A. Multiple
B. Only one
C. No
D. None
Correct Answer: A
Chapter: 154
Q3429:
To optimize performance, the size of the critical region should be ________.
A. Minimum
B. Maximum
C. Irrelevant
D. Unbounded
Correct Answer: A
Chapter: 154
Q3430:
Performance decreases due to excessive use of ________ inside critical regions.
A. Locks
B. Threads
C. Variables
D. Functions
Correct Answer: A
Chapter: 154
Q3431:
The data structure storing the resource should also store ________ corresponding to it.
A. Mutexes
B. Threads
C. Processes
D. Events
Correct Answer: A
Chapter: 154
Q3432:
The property that ensures concurrency is correctly enforced is called ________.
A. Invariant
B. Variable
C. Condition
D. Exception
Correct Answer: A
Chapter: 154
Q3433:
Complex decision structures for entering critical regions should be ________.
A. Avoided
B. Encouraged
C. Ignored
D. Simplified
Correct Answer: A
Chapter: 154
Q3434:
Each critical region must have exactly ________ entry and exit points.
A. One
B. Two
C. Multiple
D. None
Correct Answer: A
Chapter: 154
Q3435:
Mutex must be ________ on entry and ________ on exit from a critical region.
A. Locked, unlocked
B. Unlocked, locked
C. Created, destroyed
D. Deleted, created
Correct Answer: A
Chapter: 154
Q3436:
Premature exits from critical regions such as break, return, or goto statements should be ________.
A. Avoided
B. Used
C. Encouraged
D. Implemented
Correct Answer: A
Chapter: 154
Q3437:
Termination handlers help protect against ________ premature exits from critical regions.
A. Unintended
B. Intended
C. Planned
D. Inevitable
Correct Answer: A
Chapter: 154
Q3438:
If critical code becomes too lengthy, it is recommended to place it in a ________.
A. Function
B. Loop
C. Class
D. Variable
Correct Answer: A
Chapter: 154
Q3439:
WaitForSingleObject is used to ________ a mutex or synchronization object.
A. Wait
B. Unlock
C. Destroy
D. Create
Correct Answer: A
Chapter: 154
Q3440:
A thread waiting indefinitely on a mutex without a timeout can cause a ________.
A. Deadlock
B. Crash
C. Memory leak
D. Exception
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now