Operating System Questions and Answers Part-24

1. Serializable schedules are ones where ____________
a) concurrent execution of transactions is equivalent to the transactions executed serially
b) the transactions can be carried out one after the other
c) a valid result occurs after execution transactions
d) none of the mentioned

Answer: a
Explanation: Serializable schedules are ones where concurrent execution of transactions is equivalent to the transactions executed serially

2. A locking protocol is one that ____________
a) governs how locks are acquired
b) governs how locks are released
c) governs how locks are acquired and released
d) none of the mentioned

Answer: c
Explanation: A locking protocol is one that governs how locks are acquired and released

3. The two phase locking protocol consists of ____________
a) growing & shrinking phase
b) shrinking & creation phase
c) creation & growing phase
d) destruction & creation phase

Answer: a
Explanation: The two phase locking protocol consists of growing & shrinking phase

4. The growing phase is a phase in which?.
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer: a
Explanation: A transaction may obtain locks, but does not release any

5. The shrinking phase is a phase in which?
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer: c
Explanation: A transaction may release locks, but does not obtain any new locks

6. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I) 2-phase locking
II) Timestamp ordering
a) I only
b) II only
c) Both I and II
d) Neither I nor II

Answer: b
Explanation: II only

7. What is a reusable resource?
a) that can be used by one process at a time and is not depleted by that use
b) that can be used by more than one process at a time
c) that can be shared between various threads
d) none of the mentioned

Answer: a
Explanation: that can be used by one process at a time and is not depleted by that use

8. Which of the following condition is required for a deadlock to be possible?
a) mutual exclusion
b) a process may hold allocated resources while awaiting assignment of other resources
c) no resource can be forcibly removed from a process holding it
d) all of the mentioned

Answer: d
Explanation: all of the mentioned

9. A system is in the safe state if ____________
a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) all of the mentioned
d) none of the mentioned

Answer: a
Explanation: A system is in the safe state if the system can allocate resources to each process in some order and still avoid a deadlock

10. The circular wait condition can be prevented by ____________
a) defining a linear ordering of resource types
b) using thread
c) using pipes
d) all of the mentioned

Answer: a
Explanation: The circular wait condition can be prevented by defining a linear ordering of resource types