Docsity

Database Systems: Lock Conversions & Workflow Controller - Project Issues & Dependencies, Slides of Fundamentals of E-Commerce

Toggle sidebar
bg1
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
Docsity.com

Partial preview of the text

Download Database Systems: Lock Conversions & Workflow Controller - Project Issues & Dependencies and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

1/18/ 05 1

4.M iscellaneous

ProjectIssues

1/18/ 05 2

Lock Conversions

  • This is step 3 ofthe course project
  • Lock conversion -upgrading an r-lock to a w -lock
    • e.g.,T (^) i = read(x)… w rite(x)
  • The m ain purpose ofstep 3 is to ensure you

understand the lock m anagercode w e supply.

  • D eadlocks are an issue
    • if tw o txnsconverta lock concurrently,they’lldeadlock (both getan r-lock on x before eithergets a w -lock)
    • To avoid the deadlock,a callercan geta w -lock firstand dow n-grade to an r-lock if itdoesn’tneed to w rite.

1/18/ 05 3

Lecture D ependencies

  • Step 5 involves im plem enting a w orkflow controller.

Itdepends on

  • Transaction bracketing
  • Partitioning w ork betw een W C and transaction servers (= RM in the project)
  • Propagating transaction contextin RM calls
  • Param eter-based routing (e.g.choose an RM based on flightnum ber)
  • I’llcoverthis on Feb 8.See also Chapter2.
  • Steps 6 – 10 involve tw o-phase com m it.
  • I’llcoveritby Feb 15.See also Chapter9. 1/18/ 05 4

Process Structure

  • Forarchitecturalreasons,RM and W C should be

processes.

  • O rdinarily,there’s a TM pernetw ork node.
    • To sim ulate this,a TM should be a process

Docsity.com