四川大学操作系统课件.ppt

四川大学操作系统课件.ppt

ID:58813220

大小:571.00 KB

页数:50页

时间:2020-10-01

四川大学操作系统课件.ppt_第1页
四川大学操作系统课件.ppt_第2页
四川大学操作系统课件.ppt_第3页
四川大学操作系统课件.ppt_第4页
四川大学操作系统课件.ppt_第5页
资源描述:

《四川大学操作系统课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、Chapter6Concurrency:Deadlock(死锁)andStarvation(饥饿)OperatingSystems16.1PrinciplesofDeadlock6.1PrinciplesofDeadlock6.2DeadlockPrevention6.3DeadlockAvoidance6.4DeadlockDetection6.5AnIntegratedDeadlockStrategy6.6DiningPhilosophersProblem6.7Summary2DeadlockPermanentblo

2、ckingofasetofprocessesthateithercompeteforsystemresourcesorcommunicatewitheachotherNoefficientsolutioninthegeneralcaseAlldeadlockinvolveconflictingneedsforresourcesbytwoormoreprocesses(死锁源于两个或者多个进程的资源需求冲突).Acommonexampleisthetrafficdeadlock(交通死锁)3456ResourcesCate

3、gories(资源的分类)ReusableResources(可重用资源)ConsumableResources(可消费资源)76.1PrinciplesofDeadlock6.1.1ReusableResources6.1.2ConsumableResources6.1.3ResourceAllocationGraphs6.1.4TheConditionsforDeadlock8ReusableResources(可重用资源)Usedbyonlyoneprocessatatimeandnotdepleted(耗尽)by

4、thatuseProcessesobtainresourcesthattheylaterreleaseforreusebyotherprocessesExamplesincludeprocessors,I/Ochannels,mainandsecondarymemory,devices,anddatastructuressuchasfiles,databases9DeadlockExampleofReusableResourcesInterleavestheexecution:p0p1q0q1p2q210AnotherD

5、eadlockExampleofReusableResourcesSpaceisavailableforallocationof200Kbytes,andthefollowingsequenceofeventsoccurDeadlockoccursifbothprocessesprogresstotheirsecondrequestP1......Request80Kbytes;Request60Kbytes;P2......Request70Kbytes;Request80Kbytes;116.1Principleso

6、fDeadlock6.1.1ReusableResources6.1.2ConsumableResources6.1.3ResourceAllocationGraphs6.1.4TheConditionsforDeadlock12ConsumableResources(可消费资源)Maybecreated(produced)anddestroyed(consumed)byprocessesExamplesincludeinterrupts,signals,messages,andinformationinI/Obuffe

7、rs13DeadlockExampleofConsumableResourcesDeadlockoccursifreceiveisblockingP1......Receive(P2);Send(P2,M1);P2......Receive(P1);Send(P1,M2);146.1PrinciplesofDeadlock6.1.1ReusableResources6.1.2ConsumableResources6.1.3ResourceAllocationGraphs6.1.4TheConditionsforDeadl

8、ock15ResourceAllocationGraphs(资源分配图)Directedgraph(有向图)thatdepicts(表述)astateofthesystemofresourcesandprocesses16ResourceAllocationGraphs176.1PrinciplesofDeadloc

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。