GATE CS 2017 (Forenoon) — Question 42

Database Management Systems (DBMS)Transactions, Concurrency Control, Conflict SerializabilityMCQ2 marks · −2/3 if wrongMedium

In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let \(TS(T_1)\) and \(TS(T_2)\) be the timestamps of transactions \(T_1\) and \(T_2\) respectively. Besides, \(T_1\) holds a lock on the resource \(R\), and \(T_2\) has requested a conflicting lock on the same resource \(R\). The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp.
code
1if TS(T_2) < TS(T_1) then
2    T_1 is killed
3else T_2 waits
4
Assume any transaction that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
  1. A
    The database system is both deadlock-free and starvation-free.
  2. B
    The database system is deadlock-free, but not starvation-free.
  3. C
    The database system is starvation-free, but not deadlock-free.
  4. D
    The database system is neither deadlock-free nor starvation-free.
Practise the full 2017-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkDatabase System Concepts (Korth)Normalisation, SQL, transactions and indexing — the DBMS syllabus in one book.
Practise more on Transactions, Concurrency Control, Conflict SerializabilityTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group