- 1、本文档共27页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
Chapter16:ConcurrencyControlLock-BasedProtocolsMultipleGranularityDeadlockHandlingInsertandDeleteOperationsConcurrencyinIndexStructures浙江大学数据库系统概念第十六章共27页,您现在浏览的是第1页!
Lock-BasedProtocolsAlockisamechanismtocontrolconcurrentaccesstoadataitemDataitemscanbelockedintwomodes:1.exclusive(X)mode.Dataitemcanbebothreadaswellaswritten.X-lockisrequestedusinglock-Xinstruction.2.shared(S)mode.Dataitemcanonlyberead.S-lockisrequestedusinglock-Sinstruction.Lockrequestsaremadetoconcurrency-controlmanager.Transactioncanproceedonlyafterrequestisgranted.浙江大学数据库系统概念第十六章共27页,您现在浏览的是第2页!
Lock-BasedProtocols(Cont.)Lock-patibilitymatrixAtransactionmaybegrantedalockonanitemiftherequestedlockispatiblewithlocksalreadyheldontheitembyothertransactionsAnynumberoftransactionscanholdsharedlocksonanitem,butifanytransactionholdsanexclusiveontheitemnoothertransactionmayholdanylockontheitem.Ifalockcannotbegranted,therequestingtransactionismadetowaittillallinpatiblelocksheldbyothertransactionshavebeenreleased.Thelockisthengranted.浙江大学数据库系统概念第十六章共27页,您现在浏览的是第3页!
Lock-BasedProtocols(Cont.)Exampleofatransactionperforminglocking:T2:lock-S(A);read(A);unlock(A);lock-S(B);read(B);unlock(B);display(A+B)Lockingasaboveisnotsufficienttoguaranteeserializability—ifAandBgetupdatedin-betweenthereadofAandB,thedisplayedsumwouldbewrong.Alockingprotocolisasetofrulesfollowedbyalltransactionswhilerequestingandreleasinglocks.Lockingprotocolsrestrictthesetofpossibleschedules.Basically,howtogenerateacorrect(serializable)schedule?浙江大学数据库系统概念第十六章共27页,您现在浏览的是第4页!
您可能关注的文档
- 用用样本数字特征估计总体数字特征.pptx
- 直角三角形边与角的关系专题复习导学案(1).pptx
- 数控系统的备份与还原训练.pptx
- 旋转位置传感器在暖通空调(HVAC)挡板上的应用.pptx
- 种常见的防空警报器.pptx
- 相鼠笼式异步电动机.pptx
- 沃尔玛企业文化(1).pptx
- 消息流广告素材制作及关键词设置指导.pptx
- 知识产权理论与实务2011第4讲.pptx
- 消费者群体与消费者心理(1).pptx
- 专题4语法动词的时态语态主谓一致-2023中考英语一轮复习.docx
- 儿童英语口语训练技巧.pptx
- 七年级地理开学摸底考6.docx
- 专题12圆周角和圆心角的关系(原卷版)(重点突围).docx
- Unit1第4课时SectionB(2a-2e)(分层作业)(原卷版)2.docx
- 13.2.2用坐标表示轴对称(分层练习)-2023-2024学年八年级数学上册(人教版).docx
- 专题4.6直线与角章末题型过关卷(沪科版)(原卷版).docx
- 专题08课外文言文阅读过关训练-2023-2024学年七年级上学期语文期中期末复习大礼包.docx
- 专题05句型知识梳理二Unit6-Unit10(原卷版)-2021-2022学年七年级英语上学期期末考点大串讲(牛津上海版).docx
- 1.6利用三角函数测高(练习).doc
文档评论(0)