0% found this document useful (0 votes)
45 views

RTS Lecture 1 1642240037391

This document discusses an overview of real-time systems presented at BITS Pilani. It covers: 1) The goals and functions of an operating system including managing resources and controlling program execution. 2) Types of real-time systems including hard and soft systems, and examples like digital process control and packet voice. 3) Characteristics of real-time applications including cyclic, asynchronous, and predictable vs unpredictable workloads.

Uploaded by

Gaurav Bagde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

RTS Lecture 1 1642240037391

This document discusses an overview of real-time systems presented at BITS Pilani. It covers: 1) The goals and functions of an operating system including managing resources and controlling program execution. 2) Types of real-time systems including hard and soft systems, and examples like digital process control and packet voice. 3) Characteristics of real-time applications including cyclic, asynchronous, and predictable vs unpredictable workloads.

Uploaded by

Gaurav Bagde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

BITS Pilani

presentation
BITS Pilani Pawan Gupta
Pilani Campus
BITS Pilani
Pilani Campus

SS ZG553, Real Time Systems


Lecture No 1.
Overview of Operating
Systems
Operating System acts as a middle man between the user
and the computer hardware.
Goals of the Operating System
– Executes user programs and makes problem solving easier
– Makes computer system convenient to use.
– Use the hardware in an efficient manner.

3
BITS Pilani, Pilani Campus
Modeling an Operating
System
Operating System is a resource allocator
– Manages all resources
– Decides conflicting requests for efficient and fair resource usage

Operating System is a Control Program


– Controls execution of programs to prevent errors and improver use of the
computer.

Operating System has a Kernel part that does all


operations

4
BITS Pilani, Pilani Campus
Real time Systems
Real time systems are systems that need to run
continuously and take decisions in a timely manner.
Components involved
– External Sensors and Actuators
– Embedded Processors
– Output Peripherals

2 broad categories
– Open loop Systems
– Closed loop Systems

5
BITS Pilani, Pilani Campus
Real-Time and Embedded
Systems
A real-time system must deliver services in a timely manner
– Not necessarily fast, but must meet some timing
deadline
An embedded system is hidden from view within a larger
system
Many real-time and embedded systems exist, often without
the awareness of their users
– Washing machine, photocopier, mobile phone, car, aircraft, industrial plant,
microwave oven, toothbrush, CD player, medical devices, etc.
Must be able to validate real-time systems for correctness
– Some embedded real-time systems are safety critical – i.e. if they do not complete
on a timely basis, serious consequences result
– Bugs in embedded real-time systems are often difficult or expensive to fix

BITS Pilani, Pilani Campus


Block Diagram of Embedded System

7
BITS Pilani, Pilani Campus
Real-Time and Embedded
Systems
Several representative classes of real time and embedded
system:
– Digital process control
– Higher-level command and control
– Tracking and signal processing
– Real-time databases
– Telephony and multimedia

Algorithms for scheduling tasks such that those systems


completion a reliable and timely fashion
Implementation techniques, operating systems and
languages for building such systems

BITS Pilani, Pilani Campus


Real-Time Communications
Real-time systems are increasingly distributed, including
communication networks
– Control loop may include a communication step
– System may depend on network stimuli

• Not only does a system need to run a control law with


time constraints, it must also schedule communications,
sending and receiving messages according to deadlines

BITS Pilani, Pilani Campus


Example: Drive by Wire
All data must be delivered reliably
– Bad if you turn the steering wheel, and nothing happens

• Commands from control system have highest priority,


then sensors and actuators, then control inputs
– Anti-lock brakes have a faster response time than the driver, so prioritize to ensure
the car doesn’t skid

• Network must schedule and prioritize communications

BITS Pilani, Pilani Campus


Open loop and Closed loop
Systems
Open loop Systems
– Error factor is not taken into account
– Not stable and output is unreliable

Closed loop Systems


– Error factor and external environment taken into account
– More stable and output is accurate and reliable

11
BITS Pilani, Pilani Campus
Open Loop System

12
BITS Pilani, Pilani Campus
Closed loop Systems

13
BITS Pilani, Pilani Campus
Classification of Real time
Systems
Failure of a Real time system can bring operations to a
standstill
Embedded Systems range from day to day applications
which include toys, electric toasters, etc
2 broad categories
– Hard Real Time Systems
– Soft Real Time Systems

14
BITS Pilani, Pilani Campus
Hard and Soft Real time Systems

Hard Real time Systems


– Failure to meet deadlines lead to catastrophe
– Example would be an automatic flight control scenario

Soft Real Time Systems


– Failure to meet deadlines would not cause everlasting damages
– Examples could range from a video game to washing machines, etc

15
BITS Pilani, Pilani Campus
Packet Voice
Voice is digitized and sent as a sequence of packets
– Constant spacing, every 10-30ms depending on codec

• Strict timeliness requirement


– Mouth to ear delay needs to be less than approximately 150ms
– Packets must be played out with equal spacing
Relaxed reliability requirement
– Some small fraction of packets can be lost, and just sound like crackles on the
wire; most need to arrive

• Emergency calls may have priority

BITS Pilani, Pilani Campus


Types of Real-Time Application
Purely cyclic
– Every task executes periodically
– Demands in (computing, communication, and storage) resources do not vary
significantly from period to period
– Example: most digital controllers and real-time monitors

• Mostly cyclic
– Most tasks execute periodically
– The system must also respond to some external events (fault
recovery and external commands) asynchronously
– Example: modern avionics and process control systems

BITS Pilani, Pilani Campus


Types of Real-Time Application
Asynchronous: mostly predictable
– Most tasks are not periodic
– The time between consecutive executions of a task may vary considerably, or the
variations in resource utilization in different periods may be large
– These variations have either bounded ranges or known statistics

• Asynchronous: unpredictable
– Applications that react to
asynchronous events and have tasks with high run-time complexity
– Example: intelligent real-time control systems

BITS Pilani, Pilani Campus


Types of Real-Time Application
As we will see later, the type of application affects how we
schedule tasks, prove correctness.
It is easier to reason about applications that are more
cyclic, synchronous and predictable
– Many real-time systems designed in this manner
– Safe, conservative, design approach, if it works for your application

BITS Pilani, Pilani Campus


Implementation Considerations
Some real-time embedded systems are complex,
implemented on high-performance hardware
– Industrial plant control
– Civilian flight control

• Many must be implemented on hardware chosen to be


low cost, low power, light-weight and robust; with
performance a distant concern
– Military flight control, space craft control
– Consumer goods

• Often-times implemented in C or assembler, fitting within


a few kilobytes of memory
– Correctness a primary concern, efficiency a close second

BITS Pilani, Pilani Campus


Hard vs. Soft Real-Time Systems
The firmness of timing constraints affects how we reason
about,and engineer, the system
If a job must never miss its deadline, then the system is
described
as hard real-time
– A timing constraint is hard if the failure to meet it is considered a fatal
error; this definition is based upon the functional criticality of a job
– A timing constraint is hard if the usefulness of the results falls off abruptly
(or may even go negative) at the deadline
– A timing constraint is hard if the user requires validation (formal proof or
exhaustive simulation) that the system always meets its timing constraint
• If some deadlines can be missed occasionally, with acceptably
low probability, then the system is described as soft real-time
– This is a statistical constraint

BITS Pilani, Pilani Campus


Hard vs. Soft Real-Time Systems
Note: there may be no advantage in completing a job early
– It is often better to keep jitter (variation in timing) in the response times of a stream of
jobs small
• Timing constraints can be expressed in many ways:
– Deterministic
• e.g. the relative deadline of every control-law computation is 50
ms; the response time of at most 1 out of 5 consecutive
control-law computations exceeds 50ms
– Probabilistic
• e.g. the probability of the response time exceeding 50 ms is
less than 0.2
– In terms of some usefulness function
• e.g. the usefulness of every control-law computation is at least
0.8 [In practice, usually deterministic constraints, since easy
to validate]

BITS Pilani, Pilani Campus


Examples: Hard & Soft Real-Time
Systems
Hard real-time:
– Flight control
– Railway signalling
– Anti-lock brakes
– Etc.

• Soft real-time:
– Stock trading system
– DVD player
– Mobile phone
– Etc.

BITS Pilani, Pilani Campus


Summary

Real time systems are timely


Systems can be classified broadly
– Open loop
– Closed loop

Based on deadlines systems are


– Hard real time
– Soft real time

24
BITS Pilani, Pilani Campus

You might also like