Top Banner
Copyright © 2004 Pearson Education, Inc.
12

Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Dec 22, 2015

Download

Documents

Lizbeth Payne
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Copyright © 2004 Pearson Education, Inc.

Page 2: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Copyright © 2004 Pearson Education, Inc.

Chapter 18

Concurrency Control Techniques

Page 3: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-3Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.1Lock and unlock operations for binary locks.

Page 4: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-4Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.2Locking and unlocking operations for two-mode (read-write or shared-exclusive) locks.

Page 5: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-5Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.3Transactions that do not obey two-phase locking. (a) Two transactions T1 and T2. (b) Results of possible serial schedules of T1 and T2.

Page 6: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-6Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.3Transactions that do not obey two-phase locking. (c) A nonserializable schedule S that uses locks.

Page 7: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-7Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.4Transactions T1 and T2 , which are the save as T1 and T2 of Figure 18.3 but which allow the two-phase locking protocol. Not that they can produce a deadlock.

Page 8: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-8Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.5Illustrating the deadlock problem. (a) A partial schedule of T1 and T2 that is in a state of deadlock. (b) A wait-for graph for the partial schedule in (a).

Page 9: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-9Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.6Lock compatibility tables. (a) A compatibility table for read/write locking scheme. (b) A compatibility table for read/write/certify locking scheme.

Page 10: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-10Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.7A granularity hierarchy for illustrating multiple granularity level locking.

Page 11: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-11Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.8Lock compatibility matrix for multiple granularity locking.

Page 12: Copyright © 2004 Pearson Education, Inc.. Chapter 18 Concurrency Control Techniques.

Slide 18-12Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 18.9Lock operations to illustrate a serializable schedule.