Capítulo01-sistemas en tiempo real

20
Sistemas en Tiempo Real © 2013. H. Mora Presentación basada en la presentación Chapter 1 del libro “Real -Time Systems and Programming Languages”  SISTEMAS EN TIEMPO REAL Introducción a los Sistemas de Tiempo Real 1

Transcript of Capítulo01-sistemas en tiempo real

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 1/20

Sistemas en Tiempo Real © 2013. H. Mora

Presentación basada en la presentación Chapter 1 del libro “Real-Time Systems and Programming Languages” 

SISTEMAS EN TIEMPO REAL

Introducción a los Sistemas de Tiempo Real

1

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 2/20

PREREQUISITES

• Basic understanding of Ada and C

• Basic understanding of Computer Architectures.

• Basic understanding of Operating Systems

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 3/20

OBJETIVOS

• Conocer los conceptos básicos de los Sistemas deTiempo Real

• Conocer las características de un Sistema deTiempo Real.

• Conocer situaciones de aplicación de los Sistemasde Tiempo Real.

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 4/20

WHAT IS A REAL-TIME SYSTEM? 

• A real-time system is any information processing systemwhich has to respond to externally generated inputstimuli within a finite and specified period

the correctness depends not only on the logical resultbut also the time it was delivered

• failure to respond is as bad as the wrong response! 

The computer is a component in a larger engineeringsystem => EMBEDDED COMPUTER SYSTEM

• 99% of all processors are for the embedded systemsmarket

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 5/20

CLASIFICACIÓN 

• Hard real-time   —   systems where it is absolutelyimperative that responses occur within the requireddeadline, e.g. A flight control system

• Soft real-time  — 

 systems where deadlines are importantbut which will still function correctly if deadlines areoccasionally missed. E.g. Data acquisition system

• Firm real-time  —   systems which are soft real-time but in

which there is no benefit from late delivery of service

 A single system may have hard, soft and firm real-timesubsystems. In reality many systems will have a cost function

associated with missing each deadline

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 6/20

TERMINOLOGY 

• Time-aware   —   system makes explicit reference totime (eg. open vault door at 9.00)

• Reactive   —   system must produce output within

deadline (as measured from input)• Required to constraint input and output (time) variability,

input jitter  and output jitter control 

• Time-triggered   —   computation is triggered by the

passage of time• Release activity at 9.00

• Release activity every 25ms  –  a periodic activity

• Event-trigger    —   computation is triggered by an

external or internal event

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 7/20

EXAMPLE 1: A SIMPLE FLUID CONTROL SYSTEM

Pipe

Flow meter

Valve

Interface

ComputerTime

Input flow

reading

Processing

Output valve

angle

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 8/20

APPLICATION EXAMPLE:A GRAIN-ROASTING PLANT

Fuel Tank

Furnace

Bin

Pipe

fuel

grain

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 9/20

APPLICATIONS: A PROCESS CONTROLSYSTEM

Process

Control

Computer

Chemicalsand

Materials

ValveTemperature

TransducerStirrer

Finished

Products

PLANT

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 10/20

APPLICATIONS: A PRODUCTIONCONTROL SYSTEM

Production

Control

System

Parts

Machine Tools Manipulators Conveyor Belt

Finished

Products

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 11/20

COMMAND AND CONTROL SYSTEM

Temperature, Pressure, Power and so on

Terminals

Command and Control

Computer

Command

Post

Sensors/Actuators

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 12/20

EXAMPLE 2: SISTEMA DE FRENADO ABS

freno

computadorsensor de velocidad

sensor de guiñadaÁngulo de giro

pedal defreno

actuador

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 13/20

A TYPICAL EMBEDDED SYSTEM

Algorithms for

Digital Control

Data Logging

Data Retrievaland Display

Operator

Interface

InterfaceEngineering

System

Remote

Monitoring System

Real-Time

Clock

Database

Operator’s 

Console

DisplayDevices

Real-Time Computer

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 14/20

CHARACTERISTICS OF A RTS

• Guaranteed response times —  we need to be able topredict with confidence the worst case response timesfor systems; efficiency is important but predictability isessential

• Concurrent control of separate system components —  devices operate in parallel in the real-world; better tomodel this parallelism by concurrent entities in theprogram

• Facilities to interact with special purpose hardware —  need to be able to program devices in a reliable andabstract way

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 15/20

CHARACTERISTICS OF A RTS

• Support for numerical computation –  be able to supportthe discrete/continuous computation necessary forcontrol system feed-back and feed-forward algorithms

• Large and complex —  vary from a few hundred lines ofassembler or C to 20 million lines of Ada, also variety aswell as size is an issue

• Extreme reliability and safety —  embedded systemstypically control the environment in which they operate;failure to control can result in loss of life, damage toenvironment or economic loss

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 16/20

RT PROGRAMMING LANGUAGES

• With operating system support• Assembly languages

• Sequential systems implementation languages —  e.g. RTL/2,Coral 66, Jovial, C.

• No operating system support!

• High-level concurrent languages. e.g. Ada, Java, Pearl,Modula-2.

• We will consider:• Java/Real-Time Java

• C and Real-Time POSIX (not in detail)

• Ada 2005

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 17/20

REAL-TIME LANGUAGES AND OSS

Hardware

Operating

System

User Programs

Typical OS Configuration

Hardware

Including Operating

System Components

User Program

Typical Embedded Configuration

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 18/20

SUMMARY

• This lecture has introduced a number of keydefinitions and examples of real-time

systems

• The basic aspects of a real-time are well

represented in the following diagrams

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 19/20

ASPECTS OF REAL-TIME SYSTEMS

Real-Time

Temporal

RequirementsStructure Classification

Characteristics

(see next page)

Deadline/

Latency

Input/output

 jitter

Periodic/

Sporadic/

Aperiodic

Time-

triggered

Event-

triggeredCriticality

Role of

time

hard time-aware

reactivesoft

firm

7/27/2019 Capítulo01-sistemas en tiempo real

http://slidepdf.com/reader/full/capitulo01-sistemas-en-tiempo-real 20/20

Characteristics

Real-Time

facilitiesConcurrency

 Numerical

computation

Interaction

with

hardware

Efficiency/

Predictability

Reliability/

Safety

Large/

Complex

ASPECTS OF REAL-TIME SYSTEMS