Operating System Questions and Answers – Atomic Transactions

This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Atomic Transactions”.

1. A collection of instructions that performs a single logical function is called ____________
a) transaction
b) operation
c) function
d) all of the mentioned
View Answer

Answer: a
Explanation: None.

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
View Answer

Answer: c
Explanation: None.

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
View Answer

Answer: c
Explanation: None.
advertisement
advertisement

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
View Answer

Answer: d
Explanation: None.

5. In the write ahead logging a _____________ is maintained.
a) a memory
b) a system
c) a disk
d) a log record
View Answer

Answer: d
Explanation: None.

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
View Answer

Answer: a
Explanation: None.

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
View Answer

Answer: a
Explanation: Idempotent – Multiple executions of an operation have the same result as does one execution.
advertisement

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
View Answer

Answer: d
Explanation: None.

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
View Answer

Answer: c
Explanation: None.
advertisement

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
View Answer

Answer: a
Explanation: None.

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
View Answer

Answer: c
Explanation: None.

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

Answer: a
Explanation: None.

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
View Answer

Answer: a
Explanation: None.

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 release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks
View Answer

Answer: c
Explanation: None.

15. 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
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Operating System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.