Introduction To Real-Time Operating Systems
Introduction To Real-Time Operating Systems
Introduction To Real-Time Operating Systems
Operating Systems
• What are Real-time Embedded systems?
• The embedded system which processes real time
input data from various units to produce a meaningful
result.
• It mostly has RTOS.
• Very Stringent operating criteria w.r.t. time
• Soft-real time and Hard real time systems.
• In a soft real time systems, deadline can be exceeded
by a small fraction of time.(1msec = 1.05msec)
• In a hard real time system, deadline very stringent.
1msec = 1.0000000msec only
• Characteristics of Real-Time Embedded Systems
• Structure:
• A real-time embedded system interacts with its
environment continuously and timely.
• To retrieve data from its environment – the target
that it controls or monitors, the system must have
sensors in place.
• Since the signals in nature are analog these have to be
converted into digital. ADC is required.
• The brain of an embedded system is a controller,
along with memory, peripherals etc.
• The controller acts upon the target system through
actuators.
• Characteristics of Real-Time Embedded Systems
• Real-Time Response:
• A real-time system or application has to finish certain
tasks within specified time boundaries.
• This is the character that distinguishes a real-time
system from a non-real-time system.
• The ABS is a typical real-time system.
• When the sensors detect a dramatic deceleration of
wheels, the system must act quickly to prevent the
wheels from being locked up; otherwise, a disaster
may occur.
• Moreover, the control law computing is also real-
time.
• Characteristics of Real-Time Embedded Systems
• Highly constrained Environment:
• Real-time embedded systems are often run in highly
resource-constrained environments.
• This makes the system design and performance
optimization quite challenging.
• Sometimes the ES is expected to work in harsh, high
temperature conditions.
• Characteristics of Real-Time Embedded Systems
• Concurrency:
• Concurrency refers to a property of systems in which
several computations are executing simultaneously
and potentially interacting with each other.
• Physical environment is by its nature concurrent –
multiple processes occur at the same time.
• The aim is to meet all the deadlines, with optimum
response time to all events.
• Characteristics of Real-Time Embedded Systems
• Predictability:
• A real-time system must behave in a way that can be
predicted in terms of all timing requirements.
• A real-time system such as an ABS, or an airplane’s
flight-control system, must always be 100%
predictable, or human lives are at stake.
• Many real-time embedded systems contain
heterogeneous computing resources, memories, bus
systems etc.
• This can make a system unpredictable.
• In brief, the system is expected to be deterministic.
• Safety and Reliability
• Hard and Soft Real-Time Embedded Systems:
• A hard real-time system is a system in which most
timing constraints are hard.
• The ES must and should give deterministic output
well within some time constraint.
• Otherwise the computation results into junk or worst
case failure.
• On the other hand, a soft constraint is a constraint
that a system should meet.
• But when the deadline is occasionally missed, it
won’t cause any disastrous result, and the delivered
service is still useful to a certain extent.
• Hard and Soft Real-Time Embedded Systems:
• The wheel speed sensors must be polled every 15
milliseconds.
• Each cycle, the control law computation for wheel
speed must be finished in 20 milliseconds.
• Each cycle, the wheel speed prediction must be
completed in 10 milliseconds.
Real-Time Operating Systems
• The heart of many computerized embedded systems
is real-time operating system (RTOS).
• RTOS should support the construction of applications
that must meet real-time constraints.
• It provides mechanisms and services to carry out
real-time
• task scheduling.
• resource management.
• intertask communication.
• A GPOS: An overview
• An OS is a policy enforcer.
• An OS is composed of multiple software components,
and the core components in the OS form its kernel.
• The kernel provides the most basic level of control
over all of the computer’s hardware devices.
• A kernel always runs in system mode while an user
application always runs in user mode.
• The kernel is protected from illegal access by the
user application.
• Characteristics of RTOS Kernels
• Although a general-purpose OS provides a rich set of
services that are also equally important for RTOS.
• However GPOS consume lot of memory space and
considerable CPU execution time.
• The kernel is very big in size in terms of execution
space.
GPOS
• CI
• It can be observed that both S1 and S2 meet the
deadlines.
• Even though they appear to fail the suffient condition
in RM policy.
• This means that sufficient condition is not enough to
predict whether a process will meet the deadline or
not.
• Necessary and sufficient feasibility testing :
• Scheduling point test
• Completion Time test
• Scheduling point test :
• Assume that the worst case, all services are
requested at the same time.
• An iterative test is defined as follows:
Deadline monotonic scheduling
• This is another scheduling policy for real time
applications.
• This is very similar to RM scheduling policy and a
fixed priority scheduling policy.
• The RM policy assumes that service period must be
equal to service deadline.
• But DM policy removes this restriction such that
deadline can be less than the release period.
Numericals
• Check whether the following service set with two
services is feasible for both RM and DM policy:
T1 = 20msec, T2 = 50msec, C1 = 10msec, C2 = 20msec