Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 153
Q3401:
Semaphores are used to control access to a resource by ________.
A. One thread
B. Multiple threads
C. Only the main thread
D. Only processes
Correct Answer: B
Chapter: 153
Q3402:
Critical Section objects are best suited for synchronizing threads within the ________.
A. Same process
B. Different processes
C. Remote computers
D. Multiple users
Correct Answer: A
Chapter: 153
Q3403:
A mutex can be owned by a thread and can also be ________.
A. Released by any thread
B. Owned by multiple threads
C. Owned by processes
D. Released by the OS
Correct Answer: A
Chapter: 153
Q3404:
Windows synchronization objects are important in programs that use ________.
A. Shared resources
B. Only read-only data
C. Single-threaded operations
D. Stateless communication
Correct Answer: A
Chapter: 153
Q3405:
Threads in Windows that share data must use synchronization objects to prevent ________.
A. Data corruption
B. Thread creation
C. Thread destruction
D. Deadlocks (but choose the best answer for corruption)
Correct Answer: A
Chapter: 153
Q3406:
Events in Windows synchronization can be either manual-reset or ________-reset.
A. Auto
B. Multi
C. Single
D. Resettable
Correct Answer: A
Chapter: 153
Q3407:
The synchronization object used to restrict access to a resource to a fixed number of threads is called a ________.
A. Mutex
B. Event
C. Semaphore
D. Critical Section
Correct Answer: C
Chapter: 153
Q3408:
Fill in the blank: A ________ synchronization object is lighter weight than a mutex but only works within a single process.
A. Critical Section
B. Mutex
C. Event
D. Semaphore
Correct Answer: A
Chapter: 153
Q3409:
Fill in the blank: To signal an event in Windows, the function ________ is used.
A. SetEvent
B. WaitForSingleObject
C. CreateMutex
D. ReleaseMutex
Correct Answer: A
Chapter: 153
Q3410:
Fill in the blank: In Windows, a ________ can be used to ensure mutual exclusion among threads across multiple processes.
A. Mutex
B. Critical Section
C. Event
D. Semaphore
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 153
Q3412:
The use of synchronization objects helps prevent ________ conditions when accessing shared resources.
A. Race
B. Execution
C. Compilation
D. Memory
Correct Answer: A
Chapter: 153
Q3413:
Which of the following is NOT a Windows synchronization object?
A. Spinlock
B. Event
C. Mutex
D. Critical Section
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 153
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
Correct Answer: A
Chapter: 154
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
Correct Answer: A
Chapter: 154
Q3420:
Critical Sections do not support ________, unlike mutex handles.
A. Timeout
B. Locking
C. Unlocking
D. Waiting
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now