System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3411: Fill in the blank: The ________ object in Windows synchronization allows one or more threads to wait until an event occurs.
- A: Event
- B: Mutex
- C: Semaphore
- D: Critical Section
View Answer
A
Q3412: The use of synchronization objects helps prevent ________ conditions when accessing shared resources.
- A: Race
- B: Execution
- C: Compilation
- D: Memory
View Answer
A
Q3413: Which of the following is NOT a Windows synchronization object?
- A: Spinlock
- B: Event
- C: Mutex
- D: Critical Section
View Answer
A
Q3414: Fill in the blank: ________ synchronization objects are kernel objects that can be shared across processes.
- A: Mutex and Semaphore
- B: Critical Section
- C: Event
- D: Thread
View Answer
A
Q3415: Fill in the blank: The ________ object in Windows is used to signal that a resource is free or a particular condition has been met.
- A: Event
- B: Mutex
- C: Critical Section
- D: Semaphore
View Answer
A
Q3416: Fill in the blank: To protect a shared resource in a multithreaded Windows application, a ________ is usually employed.
- A: Mutex
- B: Critical Section
- C: Shared memory
- D: Event
View Answer
A
Q3417: Fill in the blank: A ________ is typically used to synchronize threads when a one-time notification is needed.
- A: Event
- B: Mutex
- C: Critical Section
- D: Semaphore
View Answer
A
Q3418: Which synchronization object requires explicit release by the owning thread before another thread can acquire it?
- A: Mutex
- B: Event
- C: Semaphore
- D: Critical Section
View Answer
A
Q3419: If there is no timeout specified with WaitForSingleObject on a mutex handle, the calling thread could ________.
- A: Block forever
- B: Execute normally
- C: Exit immediately
- D: Skip the mutex
View Answer
A
Q3420: Critical Sections do not support ________, unlike mutex handles.
- A: Timeout
- B: Locking
- C: Unlocking
- D: Waiting
View Answer
A