实时系统-3.ppt

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

Highest Locker’s Priority Protocol (HLP) Basic Idea A task in a CS gets the highest priority among all the tasks that use the resource (off-line analysis) Features Simple implementation A task is blocked when attempting to preempt, not when entering the CS Adopted in Ada95 (protected object), POSIX mutexes * CH8 Resource Sharing in Real-Time Systems * An HLP Example Tasks * CH8 Resource Sharing in Real-Time Systems * Properties of HLP Deadlock free * CH8 Resource Sharing in Real-Time Systems * Properties of HLP Task will be blocked at most once * CH8 Resource Sharing in Real-Time Systems * Response Time Analysis with HLP * CH8 Resource Sharing in Real-Time Systems * Implementation of HLP The P(scb) Operation * CH8 Resource Sharing in Real-Time Systems * Implementation of HLP The V Operation * CH8 Resource Sharing in Real-Time Systems * A Summary of HLP Pros Bounded priority inversion Deadlock free Number of blocking = 1 Cons The extreme case of HLP = NPP E.g. when the highest priority task uses all semaphores, the lower priority tasks will inherit the highest priority * CH8 Resource Sharing in Real-Time Systems * Priority Ceiling Protocol (PCP) Basic idea Each semaphore S has a Ceiling C(S) Assume that S is the semaphore with highest ceiling locked by other tasks currently: C(S) is ”the current system ceiling” If A wants to lock a semaphore (not necessarily S), it must have a strictly higher priority than C(S) i.e. P(A) C(S); Otherwise A is blocked, and it transmits its priority to the task currently holding S * CH8 Resource Sharing in Real-Time Systems * An Example of PCP * CH8 Resource Sharing in Real-Time Systems * An Example of PCP * CH8 Resource Sharing in Real-Time Systems * Properties of PCP Deadlock is avoided Chained blockings are avoided Assume J1 access S1 and S2, J2 accesses S2 and J3 accesses S1 According to PCP, PS1 = PS2 = PJ1 * CH8 Resource Sharing in Real-Time Systems * Schedulability Analysis with PCP * CH8 Resource Sharing in Real-Tim

文档评论(0)

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

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

1亿VIP精品文档

相关文档