Skip to content
Snippets Groups Projects
Commit 7fc8b089 authored by Peter J. Keleher's avatar Peter J. Keleher
Browse files

auto

parent b539bcc0
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ This contains some code for testing. You should be able to run: `python3 testing
Your task is to finish a few of the unfinished pieces in the two files.
* (8 pts) Implement IX Locks in `transactions.py`: Currently the code supports S, X, and IS locks. So if a transaction needs to lock a tuple in the X mode, the entire relation is locked. This is of course not ideal and we would prefer to use IX locks (on the relation) to speed up concurrency. The code for this will largely mirror the code for IS. You will have to change the `getXLockTuple()` function and also the `compatibility_list` appropriately.
* (4 pts) Implement `woundWait()` in `transactions.py` for deadlock prevention. This is currently called only by the last test of our testing apparatus, and is every bit as simple as it looks. Choose "younger transactions" by virtue of their transaction IDs (younger w.r.t to transaction1 means that their transaction_id is greater than transaction1).
* (4 pts) Implement `woundWait()` in `transactions.py` for deadlock prevention. This is currently called only by the last test of our testing apparatus, and is every bit as simple as it looks. Input is an array of *transactionID,transactionType* tuples. Choose "younger transactions" by virtue of their transaction IDs (younger w.r.t to transaction1 means that their transaction_id is greater than transaction1).
* (8 pts) Function `detectDeadlocksAndChooseTransactionsToAbort()` in `transactions.py`: The deadlock detection code is called once every few seconds. You should analyze the `waits-for` graph and figure out
if there are any deadlocks and decide which transactions to abort to resolve it. This function only needs to decide which transactions to kill -- our code handles the actual abort (see `detectDeadlocks()`).
......
......@@ -3,7 +3,7 @@
You will be implementing rollback recovery in `transactions.py`. More
specifically, you will be implementing the `restartRecovery()`
with functionality as described in Section 19.4, most specifically 19.4.2. You will be recovering as if from a
with functionality as described in Section 19.4. You will be recovering as if from a
crash. Implement both the **redo** and **undo phases**, including
re-execution, *compensating log records*, etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment