CS计算机代考程序代写 COMP9315 Sample Exam

COMP9315 Sample Exam

COMP9315 Sample Exam

The University of New South Wales

COMP9315 DBMS Implementation
Sample Exam

DBMS Implementation

[Instructions] [Notes] [PostgreSQL] [C]

[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8]

Question 8 (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 q8.txt

Submit via:   give cs9315 sample_q8 q8.txt

or via: Webcms3 > exams > Sample Exam > Submit Q8 > Make Submission

End of Question