
1
1/18/05 1
4. Miscellaneous
Project Issu es
1
18
05 2
Lock C onversions
•This is step 3 of the course project
•Lock conversion - upgrading an r-lock to a w-lock
–e.g., Ti= read(x) … write(x)
•The main purpose of step 3 is to en sure you
understand the lock manager code we supply.
• D eadlocks are an issue
–if two txnsconvert a lock concurrently, they’ll deadlock
(both get an r-lock on x before either gets a w-lock)
–To av oid the deadlock, a caller can get a w-lock first and
dow n-grad e to an r-lock if it doesn’t need to write.
1
18
05 3
L ecture D ependencies
•Step 5 involves implem enting a workflow controller.
It depends on
–Transaction brack eting
–Partition ing work between WC and transaction servers
(= RM in the project)
–Propag ating tran saction con text in RM calls
–Param eter-based routing (e.g. ch oose an RM based on
flight num ber)
–I’ll cover this on Feb 8. S ee also Chapter 2.
•Steps 6 – 10 involve two-phase co m m it.
–I’ll cover it by Feb 15. S ee also Chapter 9.
1
18
05 4
Pro cess Structure
•For architectural reason s, RM and WC should be
pro cesses.
•Ordinarily, there’s a TM per network node.
–To simulate this, a TM sh o u ld be a process