COMP9315 Final Exam
COMP9315 Final Exam
Copyright By PowCoder代写 加微信 powcoder
The University of Wales
COMP9315 DBMS Implementation
Final Exam
DBMS Implementation
[Instructions] [Notes] [PostgreSQL] [C]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9]
Question 9 (10 marks)
Consider the following transactions:
T1: R(X) R(Y) W(X) W(Y)
T2: W(X) R(Y)
T3: R(Y) R(X) W(Y)
Note that above is not a schedule; it simply gives the sequence
of read/write operations for each transaction. We assume that all transactions
eventually commit successfully.
Using the transactions above, answer the following questions:
Add appropriate lock/unlock operations for a two-phase locking strategy.
Give a possible schedule that might arise from executing the transactions
defined in part (a).
Add lock/unlock operations which are definitely not based on two-phase locking.
Give a possible schedule that might arise from executing the transactions
defined in part (c).
In answering the questions above …
show lock operations as follows:
Lr(X) = a request for a read-lock on the object X
Lw(X) = a request for a write-lock on the object X
U(X) = a request to release the lock currently held on object X
use the following notation in giving schedules:
write them with time increasing left-to-right, and with each transaction on a separate line
each column should contain only one operation (i.e. only one operation executes at a given point in time)
indicate a delay waiting on a lock by a dotted line from the lock request until the operation that is eventually executed when the lock is acquired
In other words, use the same kind of notation that is used on
pages I-67 and I-69 of the Course Notes.
in giving possible schedules, you may use any order of operations that you wish,
provided that
there is some overlap between the transaction operations
the order is consistent with the operations within each transaction
the order follows what would be induced by your lock operations
Show all working.
Instructions:
Type your answer to this question into the file called q9.txt
Submit via: give cs9315 sample_q9 q9.txt
or via: Webcms3 > exams > Sample Exam > Submit Q9 > Make Submission
End of Question
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com