Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 144
Q3161:
The parameter lpMutexName in CreateMutex() follows rules of _______.
A. Thread ID
B. Process name
C. Windows namespace
D. Thread handle
Correct Answer: C
Chapter: 144
Q3162:
A thread will not be blocked if it _______.
A. is of high priority
B. is in sleep
C. state already owns the mutex
D. has multiple handles
Correct Answer: C
Chapter: 144
Q3163:
Mutexes provide an advantage over CRITICAL_SECTION by supporting _______.
A. local threads
B. thread IDs
C. naming and interprocess communication
D. thread sleeping
Correct Answer: C
Chapter: 144
Q3164:
Mutexes can be used to protect shared files through _______.
A. local memory
B. events
C. memory maps
D. semaphores
Correct Answer: C
Chapter: 144
Q3165:
Releasing a mutex when not owned by the thread results in _______.
A. success
B. thread switching
C. failure
D. delay
Correct Answer: C
Chapter: 144
Q3166:
The CreateMutex function returns a handle of type _______.
A. INT
B. BOOL
C. HANDLE
D. CHAR
Correct Answer: C
Chapter: 144
Q3167:
To release a mutex, the correct syntax is _______.
A. BOOL ReleaseMutex(HANDLE hMutex)
B. BOOL OpenMutex(HANDLE hMutex)
C. BOOL ResetMutex(HANDLE hMutex)
D. BOOL UnlockMutex(HANDLE hMutex)
Correct Answer: A
Chapter: 144
Q3168:
Critical section and mutex both provide _______ control.
A. event
B. priority
C. thread
D. exclusive
Correct Answer: D
Chapter: 144
Q3169:
The term 'mutex' is derived from _______.
A. Module Exit
B. Multiple Users
C. Mutual Exclusion
D. Mutual Execution
Correct Answer: C
Chapter: 144
Q3170:
Mutexes can become signaled when _______.
A. they are deleted
B. abandoned by a thread
C. released twice
D. used across processes
Correct Answer: B
Chapter: 144
Q3171:
WaitForMultipleObjects() is used when a thread needs to _______.
A. wait on several mutexes
B. wait on one mutex
C. wait for a timeout
D. wake other threads
Correct Answer: A
Chapter: 144
Q3172:
Mutexes are part of _______ API.
A. Unix
B. Linux
C. Windows
D. POSIX
Correct Answer: C
Chapter: 144
Q3173:
Mutex is a synchronization _______.
A. event
B. object
C. thread
D. resource
Correct Answer: B
Chapter: 144
Q3174:
In OpenMutex(), what happens if the named mutex does not exist?
A. New mutex is created
B. Error occurs
C. Thread is paused
D. Mutex is recycled
Correct Answer: B
Chapter: 144
Q3175:
The main thread is typically responsible for _______ the mutex.
A. releasing
B. opening
C. creating
D. abandoning
Correct Answer: C
Chapter: 144
Q3176:
OpenMutex() is usually called by _______ threads.
A. main
B. sub
C. worker
D. other
Correct Answer: C
Chapter: 144
Q3177:
Mutex handles are used for _______.
A. process control
B. thread priority
C. identification and synchronization
D. user interface
Correct Answer: C
Chapter: 144
Q3178:
When using WaitForSingleObject(), what is being waited on?
A. event
B. thread handle
C. mutex handle
D. file pointer
Correct Answer: C
Chapter: 144
Q3179:
CreateMutex() has how many parameters?
A. 1
B. 2
C. 3
D. 4
Correct Answer: C
Chapter: 144
Q3180:
The function ReleaseMutex() is declared in _______.
A. cstdio
B. windows.h
C. iostream
D. stdlib.h
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now