resource management and priorities in real time systems n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Resource management and priorities in Real-Time Systems PowerPoint Presentation
Download Presentation
Resource management and priorities in Real-Time Systems

Loading in 2 Seconds...

play fullscreen
1 / 13

Resource management and priorities in Real-Time Systems - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

Resource management and priorities in Real-Time Systems. Jan Lindström. Contents. Objectives Resources Priority inversion problem Methods to avoid priority inversion Priority inheritance protocol Summary. Objectives. What are shared resources ?

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Resource management and priorities in Real-Time Systems


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
resource management and priorities in real time systems

Resource management and priorities in Real-Time Systems

Jan Lindström

Real-Time Systems, J. Lindström

contents
Contents
  • Objectives
  • Resources
  • Priority inversion problem
  • Methods to avoid priority inversion
    • Priority inheritance protocol
  • Summary

Real-Time Systems, J. Lindström

objectives
Objectives
  • What are shared resources ?
  • Why resources influence scheduling of the real-time tasks ?
  • What is priority inversion problem ?
  • What methods there are to avoid priority inversion problem ?
  • How does priority inheritance work ?

Real-Time Systems, J. Lindström

shared resources
Shared resources
  • Several tasks access software and hardware objects where mutual exclusion is necessary.
  • Resource allocated to one job at time. Once allocated, held by the job until no longer needed.
  • Examples: semaphores, locks, servers,…
  • Operations: lock(resource) --- <critical section>--- unlock(resource)

Real-Time Systems, J. Lindström

priority inversion problem
Priority inversion problem

lock(R)

unlock(R)

lock(R)

Real-Time Systems, J. Lindström

pre emption of tasks in their critical sections
Pre-emption of tasks in their critical sections
  • Negative effect on schedulability and predictability.
  • Traditional resource management algorithms fail. ( They decouple resource management decisions from scheduling decisions).

Real-Time Systems, J. Lindström

mars pathfinder
Mars Pathfinder
  • Landed 4.7.1997
  • Experiences software glitches.
  • http://research.microsoft.com/~mbj/Mars_Pathfinder/Mars_Pathfinder.html

Real-Time Systems, J. Lindström

priority inversion in mars pathfinder
Priority inversion in Mars Pathfinder

Real-Time Systems, J. Lindström

avoiding priority inversion
Avoiding priority inversion
  • Non-preemptive critical sections
    • Causes unpredictable waiting time.
    • Usable only to short critical sections.
  • Entry protocols for critical sections
    • Priority Inheritance Protocol.
    • Priority Ceiling Protocol.

Real-Time Systems, J. Lindström

priority inheritance protocol
Priority inheritance protocol

Under this protocol, if a higher priority task TH is blocked by a lower priority task TL, because TL is currently executing critical section needed by TH, TL temporarily inherits the priority of TH. When blocking ceases (i.e., TL exits the critical section), TL resumes its original priority. Unfortunately, priority inheritance may lead to deadlock.

Real-Time Systems, J. Lindström

example of priority inheritance
Example of priority inheritance

blocked

T1

T2

T3

prio(T1) > prio(T2) > prio(T3)

without priority inheritance

T1

T2

T3

with priority inheritance

prio(T3) = prio(T1)

Real-Time Systems, J. Lindström

complexity of scheduling
Complexity of scheduling
  • ”When there are mutual exclusion constraints in a system, it is impossible to find an optimal on-line scheduling algorithm (unless it is clairvoyant).” (Mok, 1983)
  • ”The problem of deciding feasibility for set of periodic tasks which use semaphores to enforce mutual exclusion is NP-hard.” (Mok, 1983).

Real-Time Systems, J. Lindström

summary
Summary
  • Critical sections have negative effect on schedulabitity and predictability.
  • Critical sections can cause priority inversion problem.
  • Priority inheritance can control priority inversion.

Real-Time Systems, J. Lindström