0% found this document useful (0 votes)
22 views17 pages

Lecture 23 - Real Time Systems

The document discusses embedded software and real-time systems, highlighting their characteristics, definitions, and design processes. It explains the distinction between soft and hard real-time systems, the importance of timing analysis, and the role of real-time operating systems in managing processes and resources. Key points include the necessity for embedded systems to react to environmental stimuli in real time and the use of state models to represent system behavior.

Uploaded by

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

Lecture 23 - Real Time Systems

The document discusses embedded software and real-time systems, highlighting their characteristics, definitions, and design processes. It explains the distinction between soft and hard real-time systems, the importance of timing analysis, and the role of real-time operating systems in managing processes and resources. Key points include the necessity for embedded systems to react to environmental stimuli in real time and the use of state models to represent system behavior.

Uploaded by

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

Software Engineering

CSCI 3701

Lecture 23: Real Time Systems

Presented By:
Prof. Sally Mohamed Elghamrawy

56
Chapter 20- Embedded Systems
Embedded software

• Embedded software is computer software, written to control


machines or devices that are not typically thought of as computers,
commonly known as embedded systems. It is typically specialized for
the particular hardware that it runs on and has time and memory
constraints.
Embedded software

• Computers are used to control a wide range of systems from simple


domestic machines, through games controllers, to entire
manufacturing plants.
• Their software must react to events generated by the hardware and,
often, issue control signals in response to these events.
• The software in these systems is embedded in system hardware,
often in read-only memory, and usually responds, in real time, to
events from the system’s environment.
Definition

• A real-time system is a software system where the correct functioning of


the system depends on the results produced by the system and the time
at which these results are produced.

• A soft real-time system is a system whose operation is corrupted if results


are not produced according to the specified timing requirements.

• A hard real-time system is a system whose operation is incorrect if results


are not produced according to the timing specification.
Embedded system characteristics

• Embedded systems generally run continuously and do not terminate.


• Interactions with the system’s environment are uncontrollable and
unpredictable.
• There may be physical limitations (e.g. power) that affect the design
of a system.
• Direct hardware interaction may be necessary.
• Issues of safety and reliability may dominate the system design.
Reactive systems

• Given a stimulus, the system must produce a reaction or


response within a specified time.

• Periodic stimuli. Stimuli which occur at predictable time


intervals
o For example, a temperature sensor may be polled 10 times per
second.
• Aperiodic stimuli. Stimuli which occur at unpredictable times
o For example, a system power failure may trigger an
interrupt which must be processed by the system.
A general model of an embedded real-
time system
Design process activities

• Platform selection
• Stimuli/response identification
• Timing analysis
• Process design
• Algorithm design
• Data design
• Process scheduling
Real-time system modelling

• The effect of a stimulus in a real-time system may trigger a


transition from one state to another.
• State models are therefore often used to describe
embedded real-time systems.
• UML state diagrams may be used to show the states and state
transitions in a real-time system.
State machine model of a petrol (gas)
pump
Real-time programming

• Programming languages for real-time systems development have to


include facilities to access system hardware, and it should be
possible to predict the timing of particular operations in these
languages.
• Systems-level languages, such as C, which allow efficient code to be
generated are widely used in preference to languages such as Java.
• There is a performance overhead in object-oriented systems
because extra code is required to mediate access to attributes and
handle calls to operations. The loss of performance may make it
impossible to meet real-time deadlines.
Real-time operating systems

• Real-time operating systems are specialised operating systems which


manage the processes in the RTS.

• Responsible for process management and resource (processor and


memory) allocation.

• May be based on a standard kernel which is used unchanged or


modified for a particular application.

• Do not normally include facilities such as file management.


Components of a real-time operating
system
real-time operating system components

• Real-time clock
– Provides information for process scheduling.
• Interrupt handler
– Manages aperiodic requests for service.
• Scheduler
– Chooses the next process to be run.
• Resource manager
– Allocates memory and processor resources.
• Dispatcher
– Starts process execution.
Key points

• An embedded software system is part of a hardware/software system


that reacts to events in its environment. The software is ‘embedded’ in
the hardware. Embedded systems are normally real-time systems.
• A real-time system is a software system that must respond to events in
real time. System correctness does not just depend on the results it
produces, but also on the time when these results are produced.
• Real-time systems are usually implemented as a set of communicating
processes that react to stimuli to produce responses.
• State models are an important design representation for embedded
real-time systems. They are used to show how the system reacts to its
environment as events trigger changes of state in the system.
Key points

• There are several standard patterns that can be observed in different


types of embedded system. These include a pattern for monitoring the
system’s environment for adverse events, a pattern for actuator control
and a data-processing pattern.
• Designers of real-time systems have to do a timing analysis, which is
driven by the deadlines for processing and responding to stimuli. They
have to decide how often each process in the system should run and the
expected and worst-case execution time for processes.
• A real-time operating system is responsible for process and resource
management. It always includes a scheduler, which is the component
responsible for deciding which process should be scheduled for
execution.

You might also like