![]() |
VOOZH | about |
Question 1
In a database system, unique timestamps are assigned to each transaction using Lamport βs logical clock. Let TS(T1) and TS(T2) be the timestamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R and T2 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.
if TS(T2) < TS(T1) then
T1 is killed
else T2 waits.
Assume any transaction that is not killed terminates eventually. Which of the following is TURE about the database system that uses the above algorithm to prevent deadlocks?[GATE 2017 || SET-1 MCQ || 2-mark]
The database system is both deadlock-free and starvation-free.
The database system is deadlock-free, but not starvation-free.
The database system is starvation-free, but not deadlock-free.
The database system is neither deadlock-free nor starvation-free.
Question 2
Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?
Transaction T1 : R1(X) ; W1(Y) ; R1(X) ; W1(X) ; COMMIT(T1)ββ
Transaction T2 : W2(X); W2(Y) ;COMMIT(T2)ββ [GATE 2025 || SET -2 MSQ || 2-mark ]
R1(X),W2(X),W1(Y),W2(Y),R1(X),W1(X),COMMIT(T2),COMMIT(T1)
W2(X),R1(X),W2(Y),W1(Y),R1(X),COMMIT(T2),W1(X),COMMIT(T1)
R1(X),W1(Y),W2(X),W2(Y),R1(X),W1(X),COMMIT(T1),COMMIT(T2)
W2(X),R1(X),W1(Y),W2(Y),R1(X),COMMIT(T2),W1(X),COMMIT(T1)
Question 3
An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account A attempted simultaneous transfers of Rs. 10000 each from account A to account B. Both transactions read the same value, Rs. 11000, as the initial balance in A and were allowed to go through. B was credited Rs. 10000 twice. A was debited only once and ended up with a balance of Rs. 1000.
Which of the following properties is/are certain to have been violated by the system? [GATE 2025||SET-2 MSQ || 2-mark]
Atomicity
Consistency
Isolation
Durability
Question 4
A schedule of three database transactions T1β,T2β, andT3β is shown. Riβ(A) and Wiβ(A) denote read and write of data item A by transaction Tiβ, i=1,2,3 The transaction T1β aborts at the end. Which other transaction(s) will be required to be rolled back?
R1(X); W1(Y); R2(X); R2(Y); R3(Y); ABORT(T1);
(GATE 2025 | MCQ | 1-Mark)
Only T2
Only T3
Both T2β and T3
Neither T2 nor T3
Question 5
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE? [GATE 2024 ||SET- 2MSQ || 2-mark]
2PL permits only serializable schedules
With 2PL, a transaction always locks the data item being read or written just before every operation and always releases the lock just after the operation
With 2PL, once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transaction
A deadlock is possible with 2PL
Question 6
Consider the following read-write schedule S over three transactions T1,T2 and T3β, where the subscripts in the schedule indicate transaction IDs:
S: r1(z); w1(z);r 2(x); r3(y); w3(y); r2(y); w2(x); w2(y);
Which of the following transaction schedules is/are conflict equivalent to S? [GATE 2024|| SET-1 MSQ || 2-mark ]
T1βT2βT3β
T1βT3βT2β
T3βT2βT1β
T3βT1βT2
Question 7
Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction T i, respectively. Consider the schedule S with four transactions.
S: R4(x) R2(x) R3(x) R1(y) W1(y) W2(x) W3(y) R4(y)
Which one of the following serial schedules is conflict equivalent to S ? [GATE 2022 || MCQ || 2-mark]
T1ββT3ββT4ββT2β
T1ββT4ββT3ββT2β
T4ββT1ββT3ββT2β
T3ββT1ββT4ββT2β
Question 8
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery. Which of the following statements is/are correct? [GATE 2021 || SET-1 MCQ || 1-mark]
The system cannot recover any further.
The same undo and redo list will be used while recovering again.
The database will become inconsistent.
All the transactions that are already undone and redone will not be recovered again.
Question 9
Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system:
R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)
Consider the statements P and Q below:
P: S is conflict-serializable.
Q: If T3 commits before T1 finishes, then S is recoverable.
Which one of the following choices is correct? [GATE 2021 || SET-2 MCQ || 2-mark]
Both P and Q are true.
P is false and Q is true.
Both P and Q are false.
P is true and Q is false.
Question 10
Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti. Consider the following two schedules.
S1 : r1(x) r1(y) r2(x) r2(y) w2(y) w1(x)
S2 : r1(x) r2(x) r2(y) w2(y) r1(y) w1(x)
Which one of the following options is correct? [GATE 2021 || SET-1 MCQ || 2-mark]
S1 is not conflict serializable, and S2 is conflict serializable.
Both S1 and S2 are conflict serializable.
Neither S1 nor S2 is conflict serializable.
S1 is conflict serializable, and S2 is not conflict serializable.
There are 24 questions to complete.