search
Log In

Recent questions tagged transaction-and-concurrency

0 votes
1 answer
1
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 243 views
0 votes
1 answer
2
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 199 views
0 votes
0 answers
4
0 votes
0 answers
5
0 votes
0 answers
7
0 votes
0 answers
8
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 354 views
0 votes
0 answers
9
0 votes
1 answer
10
0 votes
0 answers
11
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 53 views
0 votes
0 answers
12
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 45 views
0 votes
0 answers
13
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 136 views
0 votes
0 answers
14
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 85 views
0 votes
0 answers
15
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 131 views
0 votes
0 answers
16
0 votes
0 answers
17
0 votes
0 answers
18
0 votes
0 answers
19
In timestamp ordering,$W-timestamp(Q)$ denotes the largest timestamp of any transaction that executed $write(Q)$ successfully. Suppose that, instead, we defined it to be the timestamp of the most recent transaction to execute $write(Q)$ successfully.Would this change in wording make any difference ? Explain your answer.
asked Apr 1, 2019 in Databases akash.dinkar12 72 views
0 votes
0 answers
20
Consider a database system that includes an atomic increment operation, in addition to the read and write operations. Let V be the value of data item X. The operation $increment(X)$ by C sets the value of X to V + C in an atomic step. The ... $b$. Show that the inclusion of increment mode locks allows for increased concurrency. (Hint: Consider check-clearing transactions in our bank example.)
asked Apr 1, 2019 in Databases akash.dinkar12 128 views
0 votes
0 answers
21
Locking is not done explicitly in persistent programming languages. Rather, objects (or the corresponding pages) must be locked when the objects are accessed. Most modern operating systems allow the user to set access protections (no access, read, write) on ... ,for example). Describe how the access-protection mechanism can be used for page-level locking in a persistent programming language.
asked Apr 1, 2019 in Databases akash.dinkar12 61 views
0 votes
0 answers
22
Consider a variant of the tree protocol called the forest protocol. The database is organized as a forest of rooted trees. Each transaction $T_i$ must follow the following rules: $ $ The first lock in each tree may be on any data item. $ $ The second, and all ... data item may not be relocked by Ti after it has been unlocked by $T_i$. Show that the forest protocol does not ensure serializability.
asked Apr 1, 2019 in Databases akash.dinkar12 139 views
0 votes
0 answers
23
Consider the following graph-based locking protocol that allows only exclusive lock modes, and that operates on data graphs that are in the form of a rooted directed acyclic graph. $ $ A transaction can lock any vertex first. $ $ To lock any other vertex, the ... , and must be holding a lock on one of the parents of the vertex. Show that the protocol ensures serializability and deadlock freedom.
asked Apr 1, 2019 in Databases akash.dinkar12 199 views
0 votes
0 answers
24
Consider the following graph-based locking protocol, which allows only exclusive lock modes, and which operates on data graphs that are in the form of a rooted directed acyclic graph. $ $ A transaction can lock any vertex first. $ $ To lock any other vertex ... must be holding a lock on the majority of the parents of that vertex. Show that the protocol ensures serializability and deadlock freedom.
asked Apr 1, 2019 in Databases akash.dinkar12 54 views
0 votes
0 answers
25
Consider the following extension to the tree-locking protocol, which allows both shared and exclusive locks: $ $ A transaction can be either a read-only transaction, in which case it can request only shared locks, or an update transaction, in which ... any data item first, whereas update transactions must lock the root first. Show that the protocol ensures serializability and deadlock freedom.
asked Apr 1, 2019 in Databases akash.dinkar12 114 views
0 votes
0 answers
26
Show by example that there are schedules possible under the tree protocol that are not possible under the two-phase locking protocol, and vice versa.
asked Apr 1, 2019 in Databases akash.dinkar12 36 views
0 votes
0 answers
27
Consider a database organized in the form of a rooted tree. Suppose that we insert a dummy vertex between each pair of vertices. Showthat, if we follow the tree protocol on the new tree, we get better concurrency than if we follow the tree protocol on the original tree.
asked Apr 1, 2019 in Databases akash.dinkar12 71 views
0 votes
1 answer
28
0 votes
1 answer
29
...