Wht is the actual need of RTOS

Romuald Lobet lobet.romuald at gmx.de
Wed Dec 25 14:35:25 UTC 2002


Herewith will you find the chapter 1 of the TRON specifications 3.02 of K.
Sakamura.

Computers built around a microprocessor, called microcomputers, are making
in-
roads into new computer applications, replacing various control equipment,
by
virtue of their being small and inexpensive.  For example, they are
increasingly being used to replace all kinds of control devices, in other
words, it has become possible for a small computer to replace control
devices
formerly made up of relays, mechanical parts and analog circuits.
Specifically, many products from telephone switching devices, industrial
robots
and NC machine tools, to home appliances such as air conditioners, washers
and
televisions use microcomputer control.

The microcomputers used as control devices are not intended to be used
inside
of standard computers such as mainframes, personal computers or
workstations.
The control computers are characterized by their use as a single part in a
larger system.  For this reason they are called "embedded computer systems",
or "embedded systems" in short.

In general, embedded systems have the ability to detect various external
stimuli or changes in the environment using sensors and then initiate an
operation in response, or to initiate periodic operations so as to affect
the
outside environment.  An air conditioner, for example, uses sensors to
detect
external temperature and humidity and controls its output level and wind
direction in response.  Embedded system programs must perform their control
by following time-varying changes in the external environment without delay.
It is this point that makes them essentially different from typical data
processing programs.

In order to increase the productivity of embedded system programs and
reduce the manufacturing cycle required, the programs themselves are not
written directly using processor instructions, but rather are written using
a
shared management program, or OS.  Application programs written for a given
system are then placed on top of this OS.  The OS itself differs from
operating systems of the type used in a general-purpose computers.  The main
purpose of these operating systems is protection among users and file system
management, whereas embedded operating systems are designed to make it
easier
to program applications using concurrent processing and interrupts for
synchronization with external events.

In general, computers, and the programs which run on them, are sequential in
nature.  They cannot do two things at once.  Embedded systems on the other
hand are often required to monitor the outputs from sensors concurrently.
If there are two sensors requiring monitoring, it is intuitive for the
program to be divided into two parts.  These parts can be thought of as
running concurrently, thus making the task of programming simpler.  The
approach that arose from this type of application is the basis of the
concept
of multitasking.  All processing is divided into separate tasks each of
which
are parallel in flow.  Programs can be produced more quickly and made easier
to understand when divided into tasks in this way.  Of course, a processor
alone is left only with the ability to execute instructions sequentially, so
multitasking is implemented through time-sharing at the OS level.  The OS
having the multitasking capability is called multitasking OS, which is very
useful for embedded systems.

The operating systems used in general-purpose computers are also
multitasking
in the sense that they execute multiple jobs (processes, tasks) based on
time-
sharing.  In the case of general-purpose computers, however, jobs
(processes,
tasks) are highly likely to be unrelated to each other.  In the sense that
one
person may be using the computer for document processing, while another is
using it for compiling a program, and yet another is using a text editor,
the
computer is in fact multitasking.  But each user is only interested in the
job
(program) he or she is executing.  They are not in the least concerned with
what kind of concurrent processing may be going.  In this case, the reason
for
using multitasking is mainly for improved cost performance.  In short, even
though it would be ideal for each user to have his or her own computer, it
is
necessary for them to share a single computer because there aren't enough to
go around.  The result is multitasking.

In embedded systems, on the other hand, a job having a single purpose is
divided into multiple tasks to make the program easier to write. 
Furthermore,
these tasks do not just run in total isolation, but rather have a very
complicated relationship with each other.  In the case of an embedded
system,
the operation of any given task and its mutual relationship to other tasks
is
controlled by the designer of the overall system, and each of the individual
tasks cooperate to achieve a single goal.  In this sense, the multitasking
used in a general-purpose computer is quite different from that used in an
embedded system.

Another important point about operating systems used in embedded systems is
that they operate in real time.  In abstract terms, real-time operation
means
that the computer processing follows changes in external states. 
Specifically,
the time required for the output of results is constrained.  In simplest
terms,
worst-case response time is predictable.

With conventional computers which use batch or time-sharing processing, the
user waits for the computer.  In this case, the fact that the computer is
computing is a goal in itself, and the computer is unrelated to any other
systems.  Accordingly, no matter how long processing takes, everything will
come out all right in most cases as long as the user waits.  True, the
faster
the processing, the better; however, there will be no fatal effects even if
it
takes a long time.

In the case of embedded systems, on the other hand, computation itself is
not
the goal.  The goal is controlling other equipment based on the results of
computation.  The demand for fast processing is high.  If processing is
delayed, results may be meaningless by the time they are available.  Take
the
safety control equipment of a train for example.  If the brakes are not
applied
within a set amount of time when something wrong is detected, an accident
will
result.  Or, let's say the spark plug timing of an automobile engine is
controlled by an embedded system.  Results must be output before engine
rotation reaches a certain point or the calculation will be useless.  In
other
words, it is not only important what happens to the results of processing,
when
they are obtained is also important.  Outputting late results is the same as
not outputting any results at all.

In order to meet the strict demands on processing times, the computer must
wait for stimulus from the external environment.  This means the time the
computer is in operation is reduced.  In other words the computer is being
used relatively seldom.  This extravagant use of computers has only become
possible recently, thanks to the popularity of general-purpose computer
helping to reduce prices.  And that is the reason real-time, embedded
computers are a relatively recent application of computer technology.

During programming, one may refer to the algorithm, data structure, or the
efficiency of execution or the amount of calculations, but the absolute
execution time required is rarely discussed.  But in applications intended
for
embedded systems, it is often critical to know ahead of time the amount of
execution time required by a program.  And this does not just refer to the
CPU
time required by each program (job, process, task).  It is necessary to
estimate the absolute execution time required including the overall load on
the system down to the execution status of other tasks.  This is an
extremely
difficult thing to do, and is just plain impossible under a complex OS like
those used in large machines, because unless the OS itself is fairly simple,
it will be impossible to accurately estimate OS overhead.

Operating systems used in embedded systems are greatly different from
operating systems used for typical data processing or those used for
software
development.  An OS intended for an embedded system must be capable of both
multitasking and real-time operation.

> Hi,
> 
> Angelo, your answer is totally correct, but does not really provide
> a complete beginner with an explanation! I am not sure that I have
> the experience to give the best answer, but may understand the question
> better.
> 
> If you run an appication under Linux (for example) the OS with provide
> a regular run slot for perhaps 20 or 30 times, and everything will run
> as you expected. However after that the system starts running other
> programs
> which get a higher priority because you have been running for longer,
> and so your program runs regulary for a short burst, then stops for a
> short
> time then runs again. This is OK for a normal screen based, or data
> processing
> application, but if you need a quality of service (qos), which means that
> your program is run when required within a specifiable time frame, then
> you
> need to use a real time OS.
> 
> Also many realtime applications are embedded, this implies restricted
> hardware,
> and so it is useful to have a OS cut down to the bare minimum that is
> required.
> This can be done with Linux (as you have the source and can configure it
> any
> way you like) but probably not with any M$ OS. So a lightweight OS like
> RTEMS
> is useful for embedded (or simple apps) just to reduce the hardware
> requirement,
> even where the qos/RT aspect is not strictly vital.
> 
> Perhaps the real experts will correct me if I am wrong?
> 
> Jack
> 
> angelo_f at bigpond.com writes:
> >You didn't actually send this to the whole newsgroup.
> >
> >gopinandan wrote:
> >
> >>Hi all
> >> I am new into embedded sysytems and would like to know wht is the
> actual
> >>need for RTOS and which is the RTOS that would satuisfyu most of the
> >needs
> >>in embedded systems
> >>Kindly help me out in this regards
> >>
> >Basically, an RTOS is required when a specification requires that the
> >device must meet timing constraints.
> >
> >-- 
> >Angelo Fraietta
> >
> >PO Box 859
> >Hamilton NSW 2303
> >
> >Home Page
> >
> >
> >http://www.users.bigpond.com/angelo_f/
> >
> >There are those who seek knowledge for the sake of knowledge - that is
> >CURIOSITY
> >There are those who seek knowledge to be known by others - that is VANITY
> >There are those who seek knowledge in order to serve - that is LOVE
> >    Bernard of Clairvaux (1090 - 1153)
> >
> >
> >
> >
> >
> 
> 
> 

-- 
****************************************
Thank you for having faithfully read this message.

Best regards,

Romuald Lobet
****************************************

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!




More information about the users mailing list