Sie sind auf Seite 1von 18

Real-Time Computing

Sunggu Lee EE Dept., POSTECH

Overview
Introduction Characteristics and Challenges of Real-Time Computing Systems Definitions, Issues and Comparisons Tasks and Scheduling Worst-Case Execution Time Analysis Real-Time Software

Real-Time Operating Systems Middleware

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 2

Introduction [Crnkovic 2002]


Embedded computers

[Examples:] Medical control equipment, mobile phones, and vehicle control systems. Most [] such embedded systems can also be characterized as real-time systems. They must usually meet stringent specifications for safety, reliability, limited hardware capacity etc

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 3

Characteristics and Challenges of RTS [Crnkovic 2002]


Real-time systems are computing systems in which the meeting of timing constraints is essential to correctness. If the system delivers the correct answer, but after a certain deadline, it could be regarded as having failed.

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 4

Types of Real-Time Systems


Hard real-time system

A system where something very bad happens if the deadline is not met
Examples: control systems for aircraft, nucluear reactors, chemical power plants, jet engines, etc.

Soft real-time system

A system where the performance is degraded below what is generally considered acceptable if the deadline is missed
Example: multimedia system

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 5

Utility Function (Task Value Function) [Kim 2005]


Utility 1
Task with a hard deadline Task with a soft deadline

deadline
Building Reliable Component-based Systems
EECE 426 - Embeddede Systems

Time
Page 6

Issues in Real-Time Computing [Liu 2000]

Real-time computing deals with all problems in computer architecture, fault-tolerant computing and operating systems are also problems in real-time computing, with the added complexity of having to meet real-time constraints Real-time computer systems differ from generalpurpose systems

They are more specific in their applications


The consequences of their failure are more drastic Emphasis is placed on meeting task deadlines

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 7

Example Problems in Real-Time Computing


Example 1: Task Scheduling

General-purpose system can use round-robin scheduling


This is NOT suitable for real-time systems because high-priority tasks may miss their deadlines with roundrobin scheduling
A priority mechanism is necessary

Example 2: Cache Usage Scheduling

A general-purpose system typically allows the process that is currently executing the right to use the entire cache area
This keeps the cache miss rate low Side effect: task run times are less predictable
Thus, not so desirable for real-time systems Building Reliable Component-based Systems
EECE 426 - Embeddede Systems

Page 8

Comparison of Typical Systems [Liu 2000]

Jet Engine Control System


Designer knows precise workload to be executed System must be designed to meet task deadlines
If a deadline is not met, the jet engine may explode

General-Purpose Computer Workstation

Workload is not known in advance

System should be designed to be fast on the average


Task execution time variance is less important

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 9

Tasks [Crnkovic 2002]


Real-time systems can be constructed [out] of sequential programs, but typically they are built [out] of concurrent programs, called tasks. Tasks are usually divided into:

Periodic tasks: consist of an infinite sequence of identical activities, called instances, which are invoked within regular time periods. Non-periodic [or aperiodic] : are invoked by the occurrence of an event. [Sporadic : aperiodic tasks with a bounded interarrival time]

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 10

Scheduling [Crnkovic 2002]


Offline scheduling:

The scheduler has complete knowledge of the task set and its constraints. Make their scheduling decisions during run-time. Is the maximum time within which the task must complete its execution with respect to an event. Real-time systems are divided into two classes, hard and soft real-time systems

Online scheduling:

Deadline:

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 11

Schedulability Analysis [Crnkovic 2002]


At this point we must check that the temporal requirements of the system can be satisfied, assuming time budgets assigned in the detailed design stage. In other words, we need to make a schedulability analysis of the system based on the temporal requirements of each component

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 12

WCET Verification [Crnkovic 2002]


Performing a worst-case analysis can either be based on measurements or on a static analysis of the source code. What is more interesting in the test cases is the execution time behavior shown as a function of input parameters as shown in the following slide.

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 13

End-To-End Deadlines [Crnkovic 2002]


End-to-end deadlines

Are set such that the system requirements are fulfilled in the same way as the time budgets are set Should be specified for the input to and output from the component since the WCET cannot be computed since its parts may be executing with different periods.

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 14

Real-Time Operating System


Multi-tasking OS designed to permit tasks (processes) to complete within precisely stated deadlines

If deadline constraints cannot be met for a new task, it may be rejected If a new task would result in deadline violations for other tasks, it may be rejected Vrtx Mentor Graphics Systems VxWorks and pSOS Wind River Systems RTLinux FSMLabs, later acquired by Wind River Systems
Building Reliable Component-based Systems
EECE 426 - Embeddede Systems

Example commercial operating systems


Page 15

Real-Time Middleware
ObjectWeb defines middleware as: "The software layer that lies between the operating system and the applications on each side of a distributed computing system in a network." [Wikipedia]

Collection of Tools for Real-Time Programming

Real-Time Java Real-Time CORBA


CORBA: Component Object Request Broker Architecture

Real-Time Middleware Systems


Time-triggered Message-triggered Object (TMO)


System developed at the University of California at Irvine

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 16

Ex 2

Telematics in a Car Fleet [Kim 2005]


Base Intf TMO
ODSS1 SpM1

An example of a TMO network

Base Intf TMO


ODSS1 SpM1

SvM1

SvM1

Car Intf TMO


ODSS1 SpM1

SvM1

Car Intf TMO


ODSS1 SpM1

Car Intf TMO


ODSS1 SpM1

SvM1

SvM1

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 17

References
Jane Liu, Real-Time Systems, Prentice-Hall, Upper Saddle River, 2000. Ivica Crnkovic and Magnus Larsson, Building Reliable Component-Based Software Systems, Artech House Publishers, July 2002. PowerPoint slides from http://www.idt.mdh.se/cbse-book/presentations/13chapterWC.ppt Kane (K. H.) Kim, PowerPoint slides used for undergraduate class: ECES 123: Introduction to Real-Time Distributed Programming taught at the University of California at Irvine, http://dream.eng.uci.edu

Building Reliable Component-based Systems


EECE 426 - Embeddede Systems

Page 18

Das könnte Ihnen auch gefallen