Introduction to RealTime Systems - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Introduction to RealTime Systems

Description:

Precedence constraints and dependencies. Functional parameters ... Precedence relation: partial ordering operator ... an extended precedence graph. Fred Kuhns ... – PowerPoint PPT presentation

Number of Views:173
Avg rating:3.0/5.0
Slides: 20
Provided by: Fre58
Category:

less

Transcript and Presenter's Notes

Title: Introduction to RealTime Systems


1
Introduction to Real-Time Systems
  • Fred Kuhns
  • Computer Science Dept.
  • Washington University

2
What is a Real-Time System?
  • Real-time systems have been defined as "those
    systems in which the correctness of the system
    depends not only on the logical result of the
    computation, but also on the time at which the
    results are produced"
  • J. Stankovic, "Misconceptions About Real-Time
    Computing," IEEE Computer, 21(10), October 1988.

3
Real-Time Characteristics
  • Real-time systems often are comprised of a
    controlling system, controlled system and
    environment.
  • Controlling system acquires information about
    environment using sensors and controls the
    environment with actuators.
  • Timing constraints derived from physical impact
    of controlling systems activities. Hard and soft
    constraints.
  • Periodic Tasks Time-driven recuring at regular
    intervals.
  • Aperiodic event-driven.

4
Typical Real-Time System
Con trolled System
Controlling System
Environment
5
Some Definitions
  • Timing constraint constraint imposed on timing
    behavior of a job hard or soft.
  • Release Time Instant of time job becomes
    available for execution. If all jobs are
    released when the system begins execution, then
    there is said to be no release time
  • Deadline Instant of time a job's execution is
    required to be completed. If deadline is
    infinity, then job has no deadline. Absolute
    deadline is equal to release time plus relative
    deadline
  • Response time Length of time from release time
    to instant job completes.

6
Hard versus Soft
  • Hard failure to meet constraint is a fatal
    fault. Validation system always meets timing
    constraints.
  • Deterministic constraints
  • Probabilistic constraints
  • Constraints in terms of some usefulness function.
  • Soft late completion is undesirable but
    generally not fatal. No validation or only
    demonstration job meets some statistical
    constraint. Occasional missed deadlines or
    aborted execution is usually considered
    tolerable. Often specified in probabilistic terms

7
Validating Constraints
  • Validation Demonstration by a provably correct,
    efficient procedure or by exhaustive simulation
    and testing. Involves three steps
  • timing constraints of each application and
    corresponding components are consistent,
  • each component can meet its timing constraints if
    executed alone and required resources are
    available,
  • The underlying scheduling algorithm(s), all
    timing constraints are met

8
Developing a Reference Model
  • Modeling the system to focus on timing properties
    and resource requirements. Composed of three
    elements
  • workload model - describes applications supported
    by system
  • Temporal parameters
  • Precedence constraints and dependencies
  • Functional parameters
  • resource model - describes system resources
    available to applications
  • Modeling resources (Processors and Resources)
  • Resource parameters
  • algorithms - defines how application uses
    resources at all times.
  • Scheduling Hierarchy

9
Tasks and Jobs Definitions
  • Task (Ti) Set of related jobs jointly provide
    function.
  • Job (Jij) Unit of work, scheduled and executed
    by system. characterized by the following
    parameters
  • Temporal parameters timing constraints and
    behavior
  • Functional parameters intrinsic properties of
    the job.
  • Resource parameters resource requirements.
  • Interconnection parameters how it depends on
    other jobs and how other jobs depend on it

10
Resources
  • Resources can be divided into passive and active
  • Active resources Processors (Pi) they execute
    jobs.
  • Every job must have one or more processors
  • Same type if functionally identical and used
    interchangeably.
  • Passive resource Resource (Ri)
  • job may require Resources in addition to
    processor.
  • reusable resources are not consumed

11
Job/Task Temporal Parameters
  • Hard real-time number and parameters of tasks
    are known at all time.
  • for Job Ji
  • ri - release time, may know range r-, r
    (jitter). For aperiodic/sporadic release or
    interrelease time is a random variable.
  • di - absolute deadline
  • Di - relative deadline
  • (ri, di - feasible interval
  • ei - Execution time. May know range e-, e.
    Most deterministic models use e.

12
Periodic Task Model
  • Jobs repeated at regular or semi-regular
    intervals modeled as periodic.
  • Task Ti is a serious of periodic Jobs Jij.
  • pi - period, minimum interrelease interval
    between jobs in Task Ti. Must be bounded from
    below.
  • ei - maximum execution time for jobs in task Ti.
  • rij - release time of the jth Job in Task i (Jij
    in Ti).
  • ?i - phase of Task Ti, equal to ri1.
  • H - Hyperperiod Least Common Multiple of pi for
    all i H lcm(pi), for all i.
  • ui - utilization of Task Ti.
  • U - Total utilization Sum over all ui.

13
Aperiodic and Sporadic Tasks
  • A periodic or Sporadic task is a stream of
    aperiodic or sporadic jobs.
  • Jobs with a task have similar statistical
    behavior and timing requirements
  • Assumed system is stationary within the
    hyperperiod
  • Aperiodic jobs have soft or no deadlines. Want
    responsiveness.
  • Sporadic jobs have hard deadlines

14
Precedence Constraints and Task Graphs
  • Jobs are either precedence constrained or
    independent.
  • Precedence relation partial ordering operator lt
  • Ji lt Jk Ji is predecessor of Jk, Jk is
    successor of Ji
  • directed graph G (J,lt)
  • Task graph is an extended precedence graph.

15
Functional Parameters
  • Preemptivity
  • Preemption suspend job then dispatch different
    job to processor. Cost includes context switch
    overhead.
  • Non-preemptable task - must be run from start to
    completion.
  • Criticalness - positive integer indicating the
    relative importance of a job. Useful during
    overload.
  • Optional Executions - jobs or portions of jobs
    may be declared optional. Useful during overload.
  • Laxity - Laxity type gt hard or soft timing
    constraints. Supplemented by a usefulness
    function. Useful during overload.

16
Resource Parameters
  • Job resource parameters indicate processor and
    resource requirements.
  • Preemptivity of resources
  • non-preemptive serial access, typical case.
  • preemptive - jobs can interleave access.
  • Resource Graph
  • vertex for processors (Pi) and resources (Ri)
  • is-a-part-of edge Ri -gt Rk, Rk is a part of Ri
  • accessibility edge Pi -gt Pk, cost of Pi
    accessing Pk

17
Schedules and Scheduling
  • Jobs scheduled and allocated resources based on a
    set of scheduling algorithms and access control
    protocols.
  • Scheduler Module implementing scheduling
    algorithms
  • Schedule assignment of all jobs to available
    processors, produced by scheduler.
  • Valid schedule
  • every processor assigned to at most one job at a
    time
  • every job assigned to at most one processor at a
    time
  • no job scheduled before its release time
  • Total amount of processor time assigned to every
    job is equal to its maximum or actual execution
    time

18
Definitions
  • Feasible schedule Every job starts at or after
    release time and completes by deadline
  • Schedulable set of jobs schedulable according to
    an algorithm if the it always produces a feasible
    schedule.
  • Optimal Scheduling algorithm optimal if it
    always produces a feasible schedule if such a
    schedule exists
  • Tardiness Zero if completion time lt deadline,
    otherwise gt 0 (complete - deadline).
  • Lateness difference between completion time and
    deadline, can be negative if early.

19
Performance Measures
  • Miss rate percentage of jobs executed but
    completed late
  • Loss rate percentage of jobs discarded
  • Invalid rate sum of miss and loss rate.
  • makespan If all jobs have same release time and
    deadline, then makespan response time of the
    last job to execute.
  • Max or average response times
  • Max or average tardiness/lateness
Write a Comment
User Comments (0)
About PowerShow.com