Atomic Transactions - Operating System Questions and Answers

  • 1. A collection of instructions that performs a single logical function is called :
   A.) transaction
   B.) operation
   C.) function
   D.) all of the mentioned

Answer: Option 'A'

transaction

  • 2. A terminated transaction that has completed its execution successfully is ____________ otherwise it is __________
   A.) committed, destroyed
   B.) aborted, destroyed
   C.) committed, aborted
   D.) none of the mentioned

Answer: Option 'C'

committed, aborted

  • 3. The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as ________ of transaction.
   A.) safety
   B.) protection
   C.) roll – back
   D.) revert – back

Answer: Option 'C'

roll – back

  • 4. Write ahead logging is a way :
   A.) to ensure atomicity
   B.) to keep data consistent
   C.) that records data on stable storage
   D.) all of the mentioned

Answer: Option 'D'

all of the mentioned

  • 5. In the write ahead logging a _____ is maintained.
   A.) a memory
   B.) a system
   C.) a disk
   D.) a log record

Answer: Option 'D'

a log record

  • 6. An actual update is not allowed to a data item :
   A.) before the corresponding log record is written out to stable storage
   B.) after the corresponding log record is written out to stable storage
   C.) until the whole log record has been checked for inconsistencies
   D.) all of the mentioned

Answer: Option 'A'

​before the corresponding log record is written out to stable storage

  • 7. The undo and redo operations must be _________ to guarantee correct behaviour, even if a failure occurs during recovery process.
   A.) idempotent
   B.) easy
   C.) protected
   D.) all of the mentioned

Answer: Option 'A'

idempotent

  • 8. The system periodically performs checkpoints that consists of the following operation(s) :
   A.) Putting all the log records currently in main memory onto stable storage
   B.) putting all modified data residing in main memory onto stable storage
   C.) putting a log record onto stable storage
   D.) all of the mentioned

Answer: Option 'D'

all of the mentioned

  • 9. Consider a transaction T1 that committed prior to checkpoint. The <T1 commits> record appears in the log before the <checkpoint> record. Any modifications made by T1 must have been written to the stable storage either with the checkpoint or prior to it. Thus at recovery time:
   A.) There is a need to perform an undo operation on T1
   B.) There is a need to perform a redo operation on T1
   C.) There is no need to perform an undo and redo operation on T1
   D.) All of the mentioned

Answer: Option 'C'

There is no need to perform an undo and redo operation on T1

  • 10. 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: Option 'A'

concurrent execution of transactions is equivalent to the transactions executed serially

  • 11. 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: Option 'C'

governs how locks are acquired and released

  • 12. The two phase locking protocol consists of :
   A.) growing & shrinking phase
   B.) shrinking & creation phase
   C.) creation & growing phase
   D.) destruction & creation phase

Answer: Option 'A'

growing & shrinking phase

  • 13. 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: Option 'A'

A transaction may obtain locks, but does not release any

  • 14. 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 obtain locks, and releases a few or all of them
   D.) A transaction may release locks, and does obtain new locks

Answer: Option 'C'

A transaction may obtain locks, and releases a few or all of them

  • 15. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock ?
    I) 2-phase locking
    II) Time-stamp ordering
   A.) I only
   B.) II only
   C.) Both I and II
   D.) Neither I nor II

Answer: Option 'B'

II only