search
Log In

Recent questions tagged korth

0 votes
0 answers
1
0 votes
0 answers
2
0 votes
0 answers
4
0 votes
0 answers
5
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 245 views
0 votes
0 answers
6
0 votes
0 answers
7
0 votes
0 answers
8
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 36 views
0 votes
0 answers
9
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 23 views
0 votes
0 answers
10
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 88 views
0 votes
0 answers
11
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 60 views
0 votes
0 answers
12
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 88 views
0 votes
0 answers
13
0 votes
0 answers
14
0 votes
0 answers
15
0 votes
0 answers
16
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 24 views
0 votes
0 answers
17
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 97 views
0 votes
0 answers
18
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 34 views
0 votes
0 answers
19
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 74 views
0 votes
0 answers
20
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 75 views
0 votes
0 answers
21
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 26 views
0 votes
0 answers
22
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 43 views
0 votes
0 answers
23
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 21 views
0 votes
0 answers
24
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 40 views
0 votes
0 answers
25
0 votes
0 answers
26
0 votes
0 answers
28
Consider the following two transactions: $T_{31}$: $read(A);$ $read(B);$ $if A = 0$ $then$ $B := B + 1;$ $write(B);$ $T_{32}$: $read(B);$ $read(A);$ $if B = 0$ $then$ $A := A + 1;$ $write(A);$ Add lock and unlock instructions to transactions $T_{31}$ and $T_{32}$, so that they observe the two-phase locking protocol. Can the execution of these transactions result in a deadlock ?
asked Apr 1, 2019 in Databases akash.dinkar12 28 views
0 votes
0 answers
29
0 votes
0 answers
30
What is a cascadeless schedule ? Why is cascadelessness of schedules desirable ? Are there any circumstances under which it would be desirable to allow noncascadeless schedules ? Explain your answer.
asked Apr 1, 2019 in Databases akash.dinkar12 66 views
...