Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 22
Q541:
Busy waiting during critical section handling results in _______.
A. CPU efficiency
B. Productive CPU usage
C. Wasted CPU cycles
D. Higher security
Correct Answer:
C
Chapter: 22
Q542:
Spinlocks avoid _______ when waiting for a lock.
A. critical section
B. context switch
C. deadlock
D. priority inversion
Correct Answer:
B
Chapter: 22
Q543:
In multiprocessor systems, to ensure atomicity, one can _______.
A. disable interrupts
B. lock the data bus
C. increase clock speed
D. use GPU
Correct Answer:
B
Chapter: 22
Q544:
In uniprocessor systems, atomicity during semaphore operations can be achieved by _______.
A. enabling interrupts
B. disabling interrupts
C. boosting memory
D. locking memory
Correct Answer:
B
Chapter: 22
Q545:
Semaphore is mainly used to handle _______ problems.
A. storage
B. synchronization
C. network
D. display
Correct Answer:
B
Chapter: 22
Q546:
Spinlocks are expected to be held for _______.
A. infinite times
B. short times
C. entire program duration
D. not at all
Correct Answer:
B
Chapter: 22
Q547:
During wait(S) operation, the process loops if S is _______.
A. greater than 1
B. greater than 0
C. less than or equal to 0
D. equal to 10
Correct Answer:
C
Chapter: 22
Q548:
What is the outcome if no process releases the lock in busy waiting?
A. Deadlock
B. Starvation
C. Infinite loop
D. All of the above
Correct Answer:
D
Chapter: 22
Q549:
Algorithm 3 scans the waiting array in _______ ordering.
A. reverse
B. linear
C. cyclic
D. random
Correct Answer:
C
Chapter: 22
Q550:
In Semaphore, while (S <= 0) represents _______.
A. ready state
B. waiting state
C. signal state
D. exit state
Correct Answer:
B
Chapter: 22
Q551:
A spinlock is also referred to as _______.
A. critical lock
B. signal lock
C. busy lock
D. mutex lock
Correct Answer:
C
Chapter: 22
Q552:
What is a disadvantage of busy waiting?
A. Reduces CPU usage
B. Saves memory
C. Wastes CPU cycles
D. Increases process speed
Correct Answer:
C
Chapter: 22
Q553:
In Algorithm 3, processes maintain _______ to ensure bounded waiting.
A. semaphores
B. busy waiting
C. waiting array
D. spinlocks
Correct Answer:
C
Chapter: 22
Q554:
In semaphore definitions, modifications to the integer value must happen _______.
A. sequentially
B. individually
C. atomically
D. randomly
Correct Answer:
C
Chapter: 22
Q555:
Which tool provides synchronization without using hardware locks?
A. Mutex
B. Spinlock
C. Semaphore
D. Interrupt disabling
Correct Answer:
C
Chapter: 22
Q556:
In multi-processor environments, soft solution to ensure atomic execution is _______.
A. Spinlock
B. Data bus lock
C. Bakery algorithm
D. Process migration
Correct Answer:
C
Chapter: 22
Q557:
In the wait(S) function, "while(S <= 0);" performs a _______ operation.
A. no operation
B. increment
C. decrement
D. multiplication
Correct Answer:
A
Chapter: 22
Q558:
Critical section entry is controlled by _______ in the semaphore-based solution.
A. TestAndSet
B. Mutex
C. Swap
D. Waiting array
Correct Answer:
B
Chapter: 22
Q559:
Busy waiting in spinlocks leads to _______ resource utilization.
A. effective
B. inefficient
C. maximum
D. error-free
Correct Answer:
B
Chapter: 22
Q560:
Spinlocks are mainly used in _______ systems.
A. Single-core
B. Multiprocessor
C. Embedded
D. Real-time
Correct Answer:
B