Slides04_03 RTS

download Slides04_03 RTS

of 19

Transcript of Slides04_03 RTS

  • 8/17/2019 Slides04_03 RTS

    1/19

    Scheduling

    Basic Concepts

    Ref: Hard Real-Time Computing Systems

    Giorgio Buttazzo

    Ref: Real-Time Systems & Software  Alan Shaw 

    Processes - Tasks - Threads

  • 8/17/2019 Slides04_03 RTS

    2/19

    Real-Time Systems

    Periodic and periodic

    Hard & Soft !eadlines

    Scheduling of Tasks " Static & !ynamic

    Sharing of Resources and Critical Sections

    !omino #ffect

  • 8/17/2019 Slides04_03 RTS

    3/19

    Best #ffort Scheduling lgorithms

  • 8/17/2019 Slides04_03 RTS

    4/19

    #$ample Cost %unctionsWhat is a “good” system?

  • 8/17/2019 Slides04_03 RTS

    5/19

    etrics for Performance #'aluationWhat is a “good” system?

  • 8/17/2019 Slides04_03 RTS

    6/19

     ttempting to inimi(e )ateness

  • 8/17/2019 Slides04_03 RTS

    7/19

    Scheduling nomalies

  • 8/17/2019 Slides04_03 RTS

    8/19

    Precedence #$ample

  • 8/17/2019 Slides04_03 RTS

    9/19

     dding a processor 

  • 8/17/2019 Slides04_03 RTS

    10/19

    Reducing Computation Times *

  • 8/17/2019 Slides04_03 RTS

    11/19

    +eaken Constraints

  • 8/17/2019 Slides04_03 RTS

    12/19

    Resource Constraints

  • 8/17/2019 Slides04_03 RTS

    13/19

     

    Successive events are separated by at least p

    The Sporadic process

    Shaw’s notation:

  • 8/17/2019 Slides04_03 RTS

    14/19

     

    Cyclic Executives for Scheduling Periodic Tasks:

      Broken into ,locks:

      aor Cycles .CT/ " shortest period where all task periods align

      all tasks e$ecute in a maor cycle

      inor Cycles .mct/ " 0frames1 used to allocate tasks or portions of tasks

    #$ample: Say you ha'e two tasks:

      T2 3 .c24 p24 d2/ 3 .24 54 5/

      T5 3 .c54 p54 d5/ 3 .24 64 6/

      7$$$$$$8888887$$$$$$8888887$$$$$$888888799

      7888888$$$$$$8888887$$$$$$888888888888799

      ; 2 5 6 < = >

      CT 3 >

      mct 3 5 .or 2/

      llocations are: ?T24T5@ ?T24T5@ ?T2@4 repeat

  • 8/17/2019 Slides04_03 RTS

    15/19

     Can this ,e scheduled*

    +hat is CT*

    +hat is mct*

    +hat is a schedule*

  • 8/17/2019 Slides04_03 RTS

    16/19

     

  • 8/17/2019 Slides04_03 RTS

    17/19

     

     da-like implementation of this scheduling

    Clock returns the current time

    Delayuntil x  causes the task to ,lock until at least time x

  • 8/17/2019 Slides04_03 RTS

    18/19

     

    Some principles a,out periodic scheduling:

      +e assume all processes are released at time t; +hy*

      The CT is the least common multiple .lcm/ of the periods +hy*

      The mct must di'ide the CT +hy*

      The mct must ,e A3 the longest computation ,lock +hy*

      mct 3 di for all 3 2494 n

      mct D .mct - gcd.mct4 pi// 3 di

  • 8/17/2019 Slides04_03 RTS

    19/19

     

    !o"e work #$:  .)ecture