Operating System Questions and Answers Part-21

1. An un-interruptible unit is known as ____________
a) single
b) atomic
c) static
d) none of the mentioned

Answer: b
Explanation: An un-interruptible unit is known as atomic

2. TestAndSet instruction is executed ____________
a) after a particular process
b) periodically
c) atomically
d) none of the mentioned

Answer: c
Explanation: TestAndSet instruction is executed atomically

3. Semaphore is a/an _______ to solve the critical section problem.
a) hardware for a system
b) special program for a system
c) integer variable
d) none of the mentioned

Answer: c
Explanation: Semaphore is a/an integer variable to solve the critical section problem.

4. What are the two atomic operations permissible on semaphores?
a) wait
b) stop
c) hold
d) none of the mentioned

Answer: a
Explanation: Wait

5. What are Spinlocks?
a) CPU cycles wasting locks over critical sections of programs
b) Locks that avoid time wastage in context switches
c) Locks that work better on multiprocessor systems
d) All of the mentioned

Answer: d
Explanation: All of the mentioned

6. What is the main disadvantage of spinlocks?
a) they are not sufficient for many process
b) they require busy waiting
c) they are unreliable sometimes
d) they are too complex for programmers

Answer: b
Explanation: They require busy waiting

7. The wait operation of the semaphore basically works on the basic _______ system call.
a) stop()
b) block()
c) hold()
d) wait()

Answer: b
Explanation: block()

8. The signal operation of the semaphore basically works on the basic _______ system call.
a) continue()
b) wakeup()
c) getup()
d) start()

Answer: b
Explanation: wakeup()

9. If the semaphore value is negative ____________
a) its magnitude is the number of processes waiting on that semaphore
b) it is invalid
c) no operation can be further performed on it until the signal operation is performed on it
d) none of the mentioned

Answer: a
Explanation: its magnitude is the number of processes waiting on that semaphore

10. The code that changes the value of the semaphore is ____________
a) remainder section code
b) non – critical section code
c) critical section code
d) none of the mentioned

Answer: c
Explanation: The code that changes the value of the semaphore is critical section code