北邮数据库课程讲义chapter13.ppt

  1. 1、本文档共41页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
北邮数据库课程讲义chapter13

Thomas’ Write Rule DataBase System Concepts Suppose that transaction Ti issues a read(Q) or write(Q) operation. Let Qk denote the version of Q whose write timestamp is the largest write timestamp less than or equal to TS(Ti). 1. If transaction Ti issues a read(Q), then the value returned is the content of version Qk. 2. If transaction Ti issues a write(Q): if TS(Ti) R-timestamp(Qk) then transaction Ti roll back Else if TS(Ti) = W-timestamp(Qk) overwrite the contents of Qk Else create a new version of Q DataBase System Concepts Reads always succeed; A write by Ti is rejected if some other transaction Tj that (in the serialization order defined by the timestamp values) should read Tis write, has already read a version created by a transaction older than Ti. DataBase System Concepts Deadlock Handling System is deadlocked if there is a set of transactions such that every transaction in the set is waiting for another transaction in the set,and none of the transactions can ever proceed with its normal executions. T1 T2 lock-X on X write (X) lock-X on Y write (X) wait for lock-X on X wait for lock-X on Y DataBase System Concepts Deadlock Prevention Strategies Deadlock prevention protocols ensure that the system will never enter into a deadlock state. Require that each transaction locks all its data items before it begins execution (predeclaration). Impose partial ordering of all data items and require that a transaction can lock data items only in the order specified by the partial order (graph-based protocol). Timeout-Based Schemes : a transaction waits for a lock only for a specified amount of time. After that, the wait times out and the transaction is rolled back. wait-die scheme If TS(Ti) TS(Tj) then Ti Waits Else RollBack Ti Restart Ti with the same TS(Ti) Endif wound-wait scheme If TS(Ti) TS(Tj) then Ti Waits Else RollBack Tj Restart Tj with the same TS(Tj

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档