search
Log In

Recent questions tagged transaction-and-concurrency

0 votes
2 answers
1
Let $S$ be the following schedule of operations of three transactions $T_1$, $T_2$ and $T_3$ in a relational database system: $R_2(Y), R_1(X), R_3(Z), R_1(Y)W_1(X), R_2(Z), W_2(Y), R_3(X), W_3(Z)$ Consider the statements $P$ and $Q$ below: $P$: $S$ is conflict- ... correct? Both $P$ and $Q$ are true $P$ is true and $Q$ is false $P$ is false and $Q$ is true Both $P$ and $Q$ are false
asked Feb 18 in Databases Arjun 834 views
5 votes
2 answers
2
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? The same undo and redo list ... any further All the transactions that are already undone and redone will not be recovered again The database will become inconsistent
asked Feb 18 in Databases Arjun 1.1k views
3 votes
3 answers
3
Let $r_i(z)$ and $w_i(z)$ denote read and write operations respectively on a data item $z$ by a transaction $T_i$. Consider the following two schedules. $S_1: r_1(x)r_1(y)r_2(x)r_2(y)w_2(y)w_1(x)$ ... $S_2$ is conflict serializable Both $S_1$ and $S_2$ are conflict serializable Niether $S_1$ nor $S_2$ is conflict serializable
asked Feb 18 in Databases Arjun 646 views
1 vote
2 answers
4
Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It will result in deadlock situation immediately be granted immediately be rejected be granted as soon as it is released by $A$
asked Apr 1, 2020 in Databases Lakshman Patel RJIT 390 views
0 votes
1 answer
5
When transaction $Ti$ requests a data item currently held by $Tj,Ti$ is allowed to wait only if it has a time stamp smaller than that of $Tj$ (that is $Ti$ is order than Tj). Otherwise, $Ti$ is rolled back (dies). This is Wait-die Wait-wound Wound-wait Wait
asked Apr 1, 2020 in Databases Lakshman Patel RJIT 292 views
0 votes
3 answers
6
When transaction $Ti$ requests a data item currently held by $Tj,Ti$ is allowed to wait only if it has a timestamp smaller than that of $Tj$ (that is $Ti$ is order than Tj). Otherwise, $Ti$ is rolled back (dies). This is Wait-die Wait-wound Wound-wait Wait
asked Apr 1, 2020 in Databases Lakshman Patel RJIT 393 views
0 votes
1 answer
7
Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It will result in deadlock situation immediately be granted immediately be rejected be granted as soon as it is released by $A$
asked Apr 1, 2020 in Databases Lakshman Patel RJIT 233 views
0 votes
1 answer
8
Global locks synchronize access to local resources. synchronize access to global resources. are used to avoid local locks. prevent access to global resources.
asked Mar 31, 2020 in Databases Lakshman Patel RJIT 238 views
1 vote
3 answers
9
In conservative two phase locking protocol, a transaction Should release all the locks only at the beginning of transaction Should release exclusive locks only after the commit operation Should acquire all the exclusive locks at the beginning of transaction Should acquire all the locks at the beginning of transaction
asked Mar 30, 2020 in Databases Lakshman Patel RJIT 920 views
1 vote
4 answers
10
Consider following schedules involving two transactions: $S_{1}: \: r_{1}(X);r_{1}(Y);r_{2}(X);r_{2}(Y);w_{2}(Y);w_{1}(X)$ $S_{2}: \: r_{1}(X);r_{2}(X);r_{2}(Y);w_{2}(Y);r_{1}(Y);w_{1}(X)$ Which of the ... . $S_1$ is conflict serializable and $S_2$ is not conflict serializable $S_1$ is not conflict serializable and $S_2$ is conflict serializable Both $S_1$ and $S_2$ are not conflict serializable
asked Mar 24, 2020 in Databases jothee 1.4k views
7 votes
5 answers
11
Consider a schedule of transactions $T_1$ and $T_2$: $\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|} \hline T_1 & RA & & & RC & & WD & & WB & \text{Commit} & \\ \hline T_2 & & RB & WB & & RD & & WC & & & \text{Commit} \\ \hline \end{array}$ Here, RX stands for Read(X) and WX ...
asked Feb 12, 2020 in Databases Arjun 5k views
0 votes
0 answers
14
0 votes
0 answers
15
0 votes
0 answers
17
0 votes
0 answers
18
Consider the timestamp ordering protocol, and two transactions, one that writes two data items p and q, and another that reads the same two data items. Give a schedule whereby the timestamp test for a write operation fails and causes the first transaction to be ... carry out actions, but are unable to complete their task because of interaction with the other processes, is called a live lock.)
asked Apr 3, 2019 in Databases akash.dinkar12 421 views
0 votes
0 answers
19
0 votes
1 answer
20
0 votes
0 answers
21
Explain why the following technique for transaction execution may provide better performance than just using strict two-phase locking: First execute the transaction without acquiring any locks and without performing any writes to the database as in the validation based techniques, ... the database. Instead, rerun the transaction using strict two-phase locking. (Hint: Consider waits for disk I/O.)
asked Apr 3, 2019 in Databases akash.dinkar12 77 views
0 votes
0 answers
22
Under a modified version of the timestamp protocol, we require that a commit bit be tested to see whether a read request must wait. Explain how the commit bit can prevent cascading abort. Why is this test not necessary for write requests?
asked Apr 3, 2019 in Databases akash.dinkar12 63 views
0 votes
0 answers
23
For each of the following protocols, describe aspects of practical applications that would lead you to suggest using the protocol, and aspects that would suggest not using the protocol: $•$ Two-phase locking $•$ Two-phase locking with multiple-granularity locking $•$ The tree protocol $•$ Timestamp ordering $•$ Validation $•$ Multi version timestamp ordering $•$ Multi version two-phase locking
asked Apr 1, 2019 in Databases akash.dinkar12 211 views
0 votes
0 answers
24
Show that there are schedules that are possible under the two-phase locking protocol, but are not possible under the timestamp protocol, and vice versa.
asked Apr 1, 2019 in Databases akash.dinkar12 105 views
0 votes
0 answers
25
Use of multiple-granularity locking may require more or fewer locks than an equivalent system with a single lock granularity. Provide examples of both situations, and compare the relative amount of concurrency allowed.
asked Apr 1, 2019 in Databases akash.dinkar12 171 views
0 votes
0 answers
26
...