Real Time System - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Real Time System

Description:

is a computing system which has timing constraints and the correctness of such a ... Constraints, Thesis Universite libre de Bruxelles, Faculte des Sciences, Ann'ee ... – PowerPoint PPT presentation

Number of Views:133
Avg rating:3.0/5.0
Slides: 56
Provided by: kone1
Category:
Tags: libre | real | seee | system | time

less

Transcript and Presenter's Notes

Title: Real Time System


1
Real Time System
  • Jan Konecny
  • CS-384 Design of Operating Systems
  • Eric Durant
  • Milwaukee School Of Engineering
  • February 2005

2
Real Time Systems
  • Real time system

3
Real Time Systems
  • Real time system
  • is a computing system which has timing
    constraints and the correctness of such a system
    depends not only on its logical results but also
    on the time at which the results are available

4
Real Time Systems
  • Application of Real time system

5
Real Time Systems
  • Application of Real time system
  • Control of engines
  • Chemical and nuclear plant control

6
Real Time Systems
  • Application of Real time system
  • Control of engines
  • Chemical and nuclear plant control
  • Traffic
  • Flight control systems

7
Real Time Systems
  • Application of Real time system
  • Control of engines
  • Chemical and nuclear plant control
  • Traffic
  • Flight control systems
  • Railway switching system
  • Robotic

8
Real Time Systems
  • Application of Real time system
  • Control of engines
  • Chemical and nuclear plant control
  • Traffic
  • Flight control systems
  • Railway switching system
  • Robotic
  • Military and Space systems

9
Deadline
  • Hard deadline
  • Soft deadline

10
Deadline
  • Hard deadline
  • meeting a task deadline is critical for the
    system functionality

11
Deadline
  • Hard deadline
  • meeting a task deadline is critical for the
    system functionality
  • missing a hard deadline is considered as
    a definite failure that could leads to
    catastrophic consequences

12
Deadline
  • Soft deadline
  • is desirable to meet a task deadline, but
    occasionally missing it can be tolerated, with a
    certain cost, so that it is preferable to
    maintain these faults at the lowest possible
    level

13
Deadline
  • Soft deadline
  • is desirable to meet a task deadline, but
    occasionally missing it can be tolerated, with a
    certain cost, so that it is preferable to
    maintain these faults at the lowest possible
    level
  • a task with a soft deadline is expected to be
    completed either before the deadline or as early
    as possible after it

14
Tasks
  • Periodic task
  • Sporadic task
  • Aperiodic task

15
Tasks
  • Periodic task
  • The requests of a periodic task arrive regularly
    two successive requests are separated by exactly
    the same time delay, called the period

16
Tasks
  • Sporadic task.
  • The requests of a sporadic task arrive
    irregularly with each arrival separated from the
    preceding one by at least a certain time delay
    called the minimum separation time.

17
Tasks
  • Aperiodic task.
  • The requests of an aperiodic task arrive
    irregularly with no minimum separation time

18
Tasks
  • Aperiodic task.
  • The requests of an aperiodic task arrive
    irregularly with no minimum separation time
  • this kind of task cannot have a hard deadline
    since no guarantee can be made for them

19
Graphical representation
  • GRAPHICAL REPRESENTATION
  • Hard deadline
  • A safety critical system
  • Soft deadline
  • Hybrid deadline

20
Graphical representation
  • Figure 2.1 A Hard Deadline N. Audsley, A.
    Burns, 2

21
Graphical representation
  • Figure 2.2 A Safety Critical system N. Audsley,
    A. Burns, 2

22
Graphical representation
  • Figure 2.3 A Soft Deadline N. Audsley, A.
    Burns, 2

23
Graphical representation
  • Figure 2.4 A Hybrid System N. Audsley, A.
    Burns, 2

24
Periodic Tasks - representation
  • Ci worst-case execution time
  • Ti period
  • Di deadline

Graph Sam Gu, 4
25
Periodic Tasks - representation
  • Ci worst-case execution time
  • Ti period
  • Di deadline

Graph Sam Gu, 4
26
Scheduling Algorithms
  • Static
  • Dynamic

27
Scheduling Algorithms
  • Static
  • The priorities are assigned to each task before
    the activation of all tasks.

28
Scheduling Algorithms
  • Static
  • The priorities are assigned to each task before
    the activation of all tasks.
  • During the execution of the system, the system
    selects the highest priority request

29
Scheduling Algorithms
  • Static
  • The priorities are assigned to each task before
    the activation of all tasks.
  • During the execution of the system, the system
    selects the highest priority request
  • If there are many active requests corresponding
    to this task, generally the oldest one is selected

30
Scheduling Algorithms
  • Dynamic
  • The scheduling algorithm computes the priorities
    during the execution of the system

31
Scheduling Algorithms
  • Dynamic
  • The scheduling algorithm computes the priorities
    during the execution of the system
  • The priority of each active request is based on
    the system state

32
Scheduling Algorithms
  • Dynamic
  • The scheduling algorithm computes the priorities
    during the execution of the system
  • The priority of each active request is based on
    the system state
  • e.g., the current time, the request
    characteristics (the remaining execution time of
    each request, the time available before reaching
    the deadline)

33
Scheduling Algorithms
  • Dynamic
  • The scheduling algorithm computes the priorities
    during the execution of the system
  • The priority of each active request is based on
    the system state
  • e.g., the current time, the request
    characteristics (the remaining execution time of
    each request, the time available before reaching
    the deadline)
  • the priority of a task or a request may change
    during system evolution.

34
Missed deadline
  • Abortion
  • Delayed finalization
  • Rejection
  • Skip

35
Missed deadline
  • Abortion
  • the task is terminated before finishing the
    computation either because it will not end its
    computation by the deadline or because another
    (more important) task needs the resource.

36
Missed deadline
  • Abortion
  • the task is terminated before finishing the
    computation either because it will not end its
    computation by the deadline or because another
    (more important) task needs the resource.
  • requires some sort of cleaning up mechanism, last
    wishes, etc.

37
Missed deadline
  • Delayed finalization
  • the task runs until completion even though it
    finishes after the deadline

38
Missed deadline
  • Delayed finalization
  • the task runs until completion even though it
    finishes after the deadline
  • Rejection
  • The task invocation is not accepted into the
    system

39
Missed deadline
  • Delayed finalization
  • the task runs until completion even though it
    finishes after the deadline
  • Rejection
  • The task invocation is not accepted into the
    system
  • Skip
  • The task is not invoked and the whole invocation
    is not executed

40
Network Scheduling
  • Controller Area Network (CAN)

41
Controller Area Network (CAN)
  • Controller Area Network (CAN)
  • industrial standard bus protocol based on fixed
    priority scheduling

42
Controller Area Network (CAN)
  • Controller Area Network (CAN)
  • industrial standard bus protocol based on fixed
    priority scheduling
  • is similar to CPU scheduling

43
Controller Area Network (CAN)
  • Controller Area Network (CAN)
  • industrial standard bus protocol based on fixed
    priority scheduling
  • is similar to CPU scheduling
  • but there is no central scheduler. Each node on
    the CAN bus must conform to a protocol of bus
    arbitration, in order to avoid collision

44
Controller Area Network (CAN)
  • Multiple synchronized nodes may access a bus
  • Whenever bus is idle, a node may send a message
    to bus
  • Each message has an identifier
  • The bus acts as a AND gate. 0 is the dominant
    bit 1 is the recessive bit

45
Controller Area Network (CAN)
  • Standard frame format has 11 bit identifier, and
    extended frame format has 29 bit identifier
  • Losing nodes will stop sending their message and
    wait until the bus is idle again

46
Controller Area Network (CAN)
  • Example
  • We have 3 nodes on the CAN bus A, B and C
  • As message has priority 4(100 in binary)
  • Bs message has priority 5(101 in binary)
  • Cs message has priority 7(111 in binary)
  • All 3 stations starts transmitting at the same
    time.
  • First, all stations transmit 1 and read 1
    back
  • Next, A and B transmit 0 and C transmit 1
    bus reads 0 C backs off.
  • Next, A transmits 0 and B transmits 1 bus
    reads 0 B backs off.
  • A wins bus arbitration and starts transmitting
    its data.

47
Dynamic scheduling algorithms
  • Earliest Deadline
  • Least Laxity

48
Dynamic scheduling algorithms
  • Earliest Deadline
  • Least Laxity
  • The laxity of a process is defined as the
    deadline minus remaining computation time

49
Dynamic scheduling algorithms
  • Earliest Deadline
  • Least Laxity
  • The laxity of a process is defined as the
    deadline minus remaining computation time
  • Problem two processes have similar laxities
  • One process will run for a short while and then
    get preempted by the other and visa versa, this
    can result in "thrashing

50
Multiprocessor System
  • The development of appropriate scheduling schemes
    for multiprocessor systems is problematic

51
Multiprocessor System
  • The development of appropriate scheduling schemes
    for multiprocessor systems is problematic
  • Mok and Dertouzos8 showed that the algorithms
    that are optimal for single processor systems are
    not optimal for increased numbers of processors

52
Multiprocessor System
  • Consider, for example, 3 periodic processes P1,
    P2 and P3 that must be executed on 2 processors.
  • Let P1 and P2 have identical deadline
    requirements, namely a period of 50 units and an
    execution requirement (per cycle) of 25 units
  • let P3 have requirements of 100 and 80.
  • If the earliest deadline algorithm is used P1 and
    P2 will have highest priority and will run on the
    two processors (in parallel) for their required
    25 units.
  • This will leave P3 with 80 units of execution to
    accomplish in the 75 units that are available.
  • As a result of applying the earliest deadline
    algorithm, P3 will miss its deadline even though
    average processor utilization is only 65.
  • However an allocation that maps P1 and P2 to one
    processor and P3 to the other easily meets all
    deadlines.

53
Conclusion
  • Real time system soft, hard
  • Static, dynamic scheduling
  • Network scheduling
  • Multiprocessor system
  • Feasibility, schedule ability
  • Application in real world

54
Bibliography
  • 1 Joÿel Goossens, Scheduling of Hard Real-Time
    Periodic Systems with Various Kinds of Deadline
    and Offset Constraints, Thesis Universite libre
    de Bruxelles, Faculte des Sciences, Annee
    academique 1998-1999
  • 2 N. Audsley, A. Burns, Scheduling hard
    real-time systems, Software Engineering Journal
    archive, Volume 6 , Issue 3 (May 1991) table of
    contents Special issue on real-time software
    Pages 116 - 128 Year of Publication 1991,
    ISSN0268-6961
  • Department of Computer Science, University of
    York, UK,
  • 3 , G. Bernat, A. Burns, Weakly Hard Real-Time
    System, sEEE Transactions on Computers archive
    Volume 50 , Issue 4 (April 2001), table of
    contents Pages 308 321, Year of Publication
    2001, ISSN0018-9340
  • 4 Sam Gu, Real-Time Scheduling Techniques for
    Hard Real-Time Automotive Control Systems,
    Real-Time Automotive Seminar October 21-22-2004,
    The Ritz-Carlton Dearborn, MI
  • 5. J.C. Laprie, A Unified Concept for Reliable
    Computing and Fault Tolerance, pp. 1-28 in
    Resilient Computer Systems, ed. T. Anderson,
    Collins and Wiley (1989).
  • 6 O. Babaoglu, K. Marzullo and F.B. Schneider,
    Priority Inversion and its Prevention in
    Real-Time Systems, PDCS Report No.17,
    Dipartimento di Matematica, Universita di
  • Bologna (1990).
  • 7. A. M. Lister, Fundamentals of Operating
    Systems, Macmillan Computer Science Series
    (1984), 3rd. Edition,
  • 8. A.K. Mok and M.L. Dertouzos, Multiprocessor
    Scheduling in a Hard Real-Time
  • Environment, in Proc. 7th Texas Conf. Comput.
    Syst. (November 1978).

55
QUESTION ?
Write a Comment
User Comments (0)
About PowerShow.com