Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 161
Q3561:
When the lock bit is off, it indicates that ______.
A. thread is terminated
B. Critical Section is busy
C. no thread is inside CS
D. the system is idle
Correct Answer: C
Chapter: 161
Q3562:
Locking and unlocking in Critical Section require ______.
A. OS interrupts
B. memory swap
C. few machine-level instructions
D. page faults
Correct Answer: C
Chapter: 161
Q3563:
Recursive call status and thread ID are stored in ______.
A. thread context
B. CS data structure
C. system stack
D. user stack
Correct Answer: B
Chapter: 161
Q3564:
If the lock bit is already set, the thread enters ______.
A. sleep state
B. critical memory
C. tight loop
D. wait queue
Correct Answer: C
Chapter: 161
Q3565:
Tight loop repeatedly checks the ______.
A. stack size
B. cache size
C. lock bit
D. processor status
Correct Answer: C
Chapter: 161
Q3566:
Spin count controls how many times ______ is checked.
A. thread ID
B. thread count
C. lock bit
D. mutex ID
Correct Answer: C
Chapter: 161
Q3567:
If the thread exceeds the spin count, it calls ______.
A. TerminateThread()
B. WaitForSingleObject()
C. ReleaseMutex()
D. ThreadSleep()
Correct Answer: B
Chapter: 161
Q3568:
Spin count is especially useful in ______ systems.
A. single processor
B. multiprocessor
C. networked
D. graphical
Correct Answer: B
Chapter: 161
Q3569:
LeaveCriticalSection() performs which of the following actions?
A. turns on lock bit
B. reboots system
C. turns off lock bit
D. starts mutex
Correct Answer: B
Chapter: 161
Q3570:
Which function notifies the kernel if there are waiting threads?
A. WaitForSingleObject()
B. ReleaseMutex()
C. ReleaseSemaphore()
D. ResetEvent()
Correct Answer: C
Chapter: 161
Q3571:
______ is used to unlock a Critical Section and inform the kernel.
A. ResetEvent()
B. ReleaseMutex()
C. LeaveCriticalSection()
D. ReleaseSemaphore()
Correct Answer: D
Chapter: 161
Q3572:
A high spin count can reduce the frequency of calling ______.
A. ReleaseThread()
B. EnterCriticalSection()
C. WaitForSingleObject()
D. SuspendThread()
Correct Answer: C
Chapter: 161
Q3573:
In Critical Section, recursive overhead is managed using ______.
A. thread pool
B. recursion limit
C. CS data structure
D. call stack
Correct Answer: C
Chapter: 161
Q3574:
Spin count is beneficial in ______ systems where locking is frequent.
A. disk-based
B. single-threaded
C. multiprocessor
D. graphical
Correct Answer: C
Chapter: 161
Q3575:
The purpose of tight loop is to repeatedly check ______.
A. thread ID
B. lock bit
C. mutex state
D. cache line
Correct Answer: B
Chapter: 161
Q3576:
Efficiency of Critical Section comes from using ______.
A. system API
B. disk cache
C. minimal instructions
D. kernel threads
Correct Answer: C
Chapter: 161
Q3577:
Thread enters tight loop if Critical Section is ______.
A. empty
B. recursively called
C. locked
D. misaligned
Correct Answer: C
Chapter: 161
Q3578:
The lock bit is turned off using ______.
A. WaitForObject()
B. LeaveCriticalSection()
C. EnterCriticalSection()
D. SuspendThread()
Correct Answer: B
Chapter: 162
Q3579:
Which function is used to initialize a Critical Section with a spin count?
A. SetSpinCount()
B. InitializeCriticalSpinCount()
C. InitializeCriticalSectionAndSpinCount()
D. CreateCriticalSpin()
Correct Answer: C
Chapter: 162
Q3580:
Spin count optimization helps in reducing ______.
A. thread priority
B. memory size
C. system calls
D. processor speed
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now