Você está na página 1de 7

REAL-TIME One form of a special-purpose operating system is

real time system. Real time systems are defined as

OPERATING those systems in which the correctness of the


system depends not only on the logical result of
computation, but also on the time at which results
SYSTEMS are produced. A real time system is used when
rigid time requirements have been placed on the
operation of the processor or the flow of data; thus,
it is often used as control device in an application.
Examples of this type of real time system are
command and control system, process control
systems, flight control system, the space shuttle
avionics system, future system such as the space
ABSTRACT: station, space – based defense system such as SDI,
and large command and control systems.
The paper analyzes the performance of two
different real-time operating systems. We survey 2.1. REAL TIME SYSTEM – OPERATING
the state-of-the-art in real-time operating systems SYSTEM:
(RTOSs) from the system synthesis point of view.
This paper is intended to provide an overview of At the core of software real-time system is a real-
the basic concepts and practices that are associated time operating system. One of the main differences
with real time operating systems. Real-time between real-time operating systems and general-
applications vary tremendously in their scope, in purpose operating systems is the ability to
the tightness of their performance specifications guarantee a worst-case latency. On a general-
and in their cost constraints. Traditional purpose OS, an external interrupt could be put into
applications were associated with the aerospace, a queue and then serviced later after the OS has
nuclear power and defense industries. Such finished its current Operation and any other
systems are large, and they must meet all deadlines interrupts in the queue.
and cost is not a critical issue. While these
applications continue to be important, embedded On the other hand, a real-time OS can halt its
controllers in the transportation, consumer current process to handle an interrupt immediately.
electronics and communication industries now In essence, the real-time OS guarantees event
constitute a major share of real-time systems. response within a certain interval. To do this, the
real-time OS assigns priorities to processes and
RTOS's have a very long research history, which interrupts. If a high priority interrupt occurs, the
provides important theoretical results and useful OS immediately halts its process and services the
industrial implementations. Convergence of interrupt.
applications, technology, and market trends of
embedded systems implies a strong need for new
generation of RTOS. This paper deals with a 2.2. NEED OF REAL TIME SYSTEM:
survey of classical academic and industrial RTOS
work. Timing correctness requirements in a real time
system arise because of the physical impact of the
controlling systems activities upon its environment.
I. INTRODUCTION TO OPERATING SYSTEM: For example, if the computer controlling a robot
does not command it to stop or turn on time, the
An operating system is program that manages the robot might collide with another object on the
computer hardware. It also provides a basis for factory floor possibly causing serious damage .in
application programs and acts as an intermediary many real time systems even more consequences
between a user of a computer and computer will result if timing as well as logical correctness
hardware. The operating system controls and properties of the system are not satisfied, e.g.,
coordinates the use of the hardware among the consider nuclear power plants or air traffic control
various application programs for various users. system fail.

II. REAL TIME SYSTEM: 2.3. BASIC FACILITIES OF RTOS:

1
Once the CPU has been allocated to process the
Being fast is a necessary condition of a real time process keeps CPU until it release the CPU either
system, but it is not sufficient. It has to meet by terminating or by switching to the waiting state.
explicitly deadlines and being fast on the average Example: - Microsoft window 3.1, apple
does not guarantee that a deadline will be met. If a Macintosh.
real time system can be shown to meet its deadlines
Dispatcher latency: the dispatcher is the module
then we say that it is predictable. Multitasking is
that gives control of CPU to the process selected by
required to develop a good real time application
the short-term scheduler. The time it takes for the
Pseudo parallelism “– to handle multiple external
dispatcher to stop one process and start another
events occurring simultaneously. Rate monotonic
running is known as dispatch latency.
scheduling (RMS) - is utilized to compute in
advance the processor power required to handle the Scheduling criteria: Different CPU scheduling
simultaneous events. Algorithms (scheduling algorithms have different properties and may favor
mechanism) are needed to decide which task or one class of processes over another. The
thread will run at a given time. Function is to characteristics used for comparison can make a
switch from one task or process to another (context substantial difference in determination of
switch). algorithm. The criteria include the following:
• Overhead – should be completed as quickly as
CPU utilization: To keep the CPU as busy as
possible.
possible. CPU utilization may range from 0-100%.
• Dispatch time should be independent of the In real system it should range from 40% (for lightly
number of threads in the ready list. loaded system) to 90% (for heavily used system).
• Ready list should be organized each time an
element is added to the list. Through put: one measure of work is the number
of processes completed for time unit called through
put. E.g. for long process – 1process per hour. For
III. SCHEDULING: short process – 10 process per second.
Scheduling is a fundamental operating system Turn around time: How long it takes to execute
function. All computer resource are scheduled that process. The interval from the time sufficient
before use, CPU is the primary resource .its of a process to the time of completion is a turn
scheduling is central to operating-system design. around time. Turn around time is the sum of period
spend waiting to get into memory, waiting in ready
queue, executing on CPU I/O.
3.1. CPU SCHEDULING:
Waiting time: The CPU scheduling algorithm does
CPU scheduling is a task of selecting a waiting not affect the amount of time during which a
process from the ready queue and allocating the process execute nor does I/O. It affects only the
CPU to it. The CPU is allocated to the selected amount of time that a process spends waiting in the
process by the dispatcher. ready queue. Waiting time is done sum of period
spend waiting in the ready queue.
• Preemptive scheduling:-
Under the following CPU scheduling can take Response time: The time from the submission of
place. request until the first response is produced. This
1. When a process switches from the running state measure is called response time. The amount of
to the waiting state (I/O request, or invocation of time it takes to start responding but not the time
wait for the termination of one of the child that it takes to o/p that response.
processes).
2. When a process switches from the running state 3.2. SCHEDULING ALGORITHMS:
to the ready state (for e.g., when an interrupt
occurs). CPU scheduling deals with the problems of
3. When a process switches from the waiting state deciding which of the processes in ready queue is
to ready state (for e.g., completion of I/O). to be allocated the CPU.
4. When a process terminates. 1. First come, first-severed scheduling
In circumstances, 1 and 4 are non-preemptive 2. Shortest-job-first scheduling
scheduling, 2 and 3 are preemptive scheduling. 3. Priority scheduling
• Non-preemptive scheduling:- 4. Round-robin scheduling

2
5. Multilevel queue scheduling constraint on both start and finish times. Periodic
6. Multilevel feedback queue scheduling requirements can arise from dynamic events such
as an object falling in front of a moving robot, or a
human operator pushing a button on a console.
3.3. REAL –TIME SYSTEM SCHEDULING:
Tasks, which are bounded inter arrival, are called
sporadic tasks.
Real-time control applications can be mapped onto
Depending on second factor they are critical and
a spectrum of performance. On one side, hard real-
non-critical tasks:
time systems are very deterministic and never miss
an event. An example of a hard real-time system in • Critical tasks:- Their timely execution is critical.
an engine dynamometer. If an event were missed. Ex: - life support systems, stability control of an
The data collected or the road conditions simulated aircraft.
would be incorrect. On the other side of the Despite their critical nature, it is not always
spectrum, soft real-time systems do not require the essential that every iteration be executed
same degree of determinism and occasionally miss successfully and within a given deadline.
events without malfunctioning. For example,
missing a single data point in a temperature • Non-critical tasks: - They are not critical to the
monitoring system does not impact the overall application. The tasks should be completed with in
trend because the general trend of temperature a given deadline; otherwise, they are not useful.
changes slowly. Implementing soft real time
functionality requires careful design of the IV. STRUCTURE OF REAL-TIME SYSTEM:
scheduler and related aspects of the operating
system. First, the system must have priority The state of the controlled process and of the
scheduling, and real time processes must have the operating environment (e g: pressure, temperature,
highest priority. Second, the dispatch latency must speed and altitude) is acquired by sensor, which
be small the smaller the latency, the faster a real provides inputs to controller, the real time
time process can execute once it is run able. The computer. The data rate from each sensor depends
problem is that many operating systems, including on how quickly the measured parameters can
most versions of UNIX, are forced to wait either change.
for a system call to complete or for an I/O block to
take place before doing a context switch. The “trigger generator “is a representation of the
mechanism use to trigger the execution of
individual jobs. There is a fixed set of application
3.4. TIMING CONSTRAINTS FOR TASKS: tasks or job, the “job list”
That is in fig
Timing constraints can be met based on the type of
application used. A task is something that needs to
be done. It is often implemented in a separate
Job list clock
thread, but does not have to be. In other words,
tasks are a set of process with data dependencies
between them. Tasks can be classified depending
Controlled
on two factors: - Sensors
process
1. by the predictability of their arrival.
2. By the consequences of they’re not being
executed on time. Trigger
generator
Basing on the first factor: -
• Periodic- In case of periodic task, a period might
mean ‘once per period T’ or ‘exactly T units apart’.
An example of dynamically created tasks is a
(periodic) task that monitors a particular flight; this Actuators Execution
comes into existence when the aircraft enters an air
traffic control region and will cease to exist when
the aircraft leaves the region.
• Aperiodic: An aperiodic task has a deadline by Display operation
which it must finish or start, or it may have a

3
Fig: schematic block diagram of real time system 5.3. RELIABILITY:
The software for these tasks is preloaded into the
Many real-time systems operate under severe
computer. Many of the jobs are periodic. Jobs can
reliability requirements. That is, if certain tasks,
also be initiated depending on the sate of controlled
called critical tasks, miss their deadline then a
process or on the operating environment. Finally,
catastrophe may occur. The requirement for critical
jobs can be initiated on command from operated
tasks should be that all of them always make their
input panel.
deadline (a 100% guarantee), subject to certain
The output of the computer is fed to actuators and failure and workload assumptions.
the displays. The actuators typically have a
mechanical or hydraulic component, and so their
5.4. SIZE OF SYSTEM AND DEGREE OF COORDINATION:
time constants are quite high .as a result, the data
rates to the actuators are quite low.
Real-time systems vary considerable in size and
The sensors and the actuators run at relatively low complexity. In most current real-time systems the
data rates. The computer itself must fast enough to entire system is loaded in to the memory, or if there
execute the control algorithms. As a result the are well-defined phases, each phase is loaded just
separates into three areas an outer low rate area prior to the beginning of the phase. The ability to
consisting of sensors actuators displays, and input load entire systems in to memory and to limit task
panels, middle or peripheral area and the central interactions simplifies many aspects of building
cluster of processors .The controlled process can and analyzing real-time systems. Increase in size
go through distinct phases, quite frequently. and coordination gives rise to many new problems
that must be addressed and complicates the notion
of predictability.
V. CHARACTERIZING REAL TIME SYSTEMS

Building a real time system can vary from a simple 5.5. ENVIRONMENT:
task to an extremely complex task where the state
of the art is still lacking. The difficulty depends on The environment in which a real –time system is to
the characteristics of a real time system along, at operate plays an important role in the design of the
least, five dimensions given below:- system. The deterministic environments give rise to
small, static real-time systems where all deadlines
can be guaranteed a priori. The problem is that the
5.1. GRANULARITY OF THE DEADLINE AND LAXITY OF THE
approaches taken in relatively small, static systems
TASKS:
do not scale to other environments, which are
larger, much more complicated, and less
If the time between when a task is activated
controllable. A dynamic real-time system operating
(required to be executed) and when it must
in a non-deterministic environment is required in
complete execution is short then the deadline is
many future applications.
tight (i.e. the granularity of the deadline is small,
deadline is close). Even large granularity deadlines
can be tight, when the laxity (deadline minus VI. ACHIEVING REAL-TIME PERFORMANCE:
computation time) is small. In general, the tighter
the deadline the more difficult the design task. Achieving quantifiable real-time performance
requires integrated solutions across many areas.
We discuss some of those areas: -
5.2. STRICTNESS OF A DEADLINE:
Real-time operating systems are an integral part of
real-time systems. Real-time operating systems
The strictness of the deadline refers to the value of
stress predictability and include features to support
executing a task after its deadline. For a hard real
real-time constraints.
-time task there is no value to executing the task
after the deadline has passed. A soft real-time task Three general categories of real-time system
retains some diminished value after its deadline so operating Systems exist: -
it should still be executed. Very different -Small, proprietary kernels
techniques are usually used for hard and soft real- -Real-time extensions to commercial timesharing
time tasks. operating systems such as UNIX and
-Research kernels.

4
6.1. SMALL, FAST, PROPRIETARY KERNELS:- system calls that are not recommended to be used
when running a real-time application.
They come in two varieties
The trend to begin with a complexity new
• Homegrown: - Specialized to the application. implementation of UNIX based on micro kernels
• Commercial offerings: - The cost of uniquely may reduce or eliminate some of the above
developing and maintaining the first type, as well problems. For example MACH is heavily based on
as the increasing quality of the commercial lazy evaluation .one example for this strategy is
offerings is significantly reducing. The practice of copy-on-write. Variable real-time features that
generating homegrown kernels. To reduce the run- were added to MACH include real-time threads,
time overheads incurred by the kernel and to make real-time synchronization primitives, and support
the system fast, the kernel has a fast context switch. for priority inheritance. Another fundamental
Has a small size (with its associated minimal problem with timesharing paradigm is that these
functionality). Minimum intervals during which operating systems want to remove control over
interrupts are disabled. To deal with the timing resources from the application. So given all these
requirements, the kernel provides bounded problems for RT-UNIX or RT-MACH can be used
execution time for most primitives, maintains a in real-time applications where missing a deadline
real-time clock, and provides a priority scheduling has no severe consequences. If deadlines must be
mechanism. guaranteed to be met these operating systems can
The kernels also perform multi-tasking and inter- still be used if the designers can hand craft a set of
task communication and synchronization. Some priorities that will always work.
researches believe that the current kernel features
provide almost no support for solving the difficult 6.3. RESEARCH OPERATING SYSTEMS: -
timing problems and would rather need more
sophisticated kernels that directly address timing
and fault tolerance constraints. While many real-time applications will continue to
Recently there have been efforts to produce be constructed with proprietary real-time kernels
seamless real-time kernels that scale from the with extensions to commercial timesharing
small, proprietary kernels to large kernels that operating systems, some significant problems exist.
support UNIX interfaces. In particular the proprietary kernels have difficulty
when scaling to large applications, and the time
sharing extensions emphasize speed rather than
6.2. REAL –TIME EXTENSIONS TO COMMERCIAL OPERATING predictability. The Spring KERNEL contains real-
SYSTEMS:-
time support for multiprocessors and distributed
systems. Spring, like MARS presents anew
A second approach to real-time operating systems paradigm for real-time operating systems, but
is the extension of commercial products, e.g., unlike MARS it strives for a more flexible
extending UNIX to RT-UNIX, OR POSIX to RT- combination of of-line and on-line techniques.
POSIX, or MACH to RT-MACH. The real time
version of commercial operating systems are VII. APPLICATIONS OF REAL-TIME
generally slower and less predictable than the SYSTEMS:
proprietary kernels, but have great functionality
and better software development environment-very Achieving complex, real-time systems is non trivial
important considerations in many applications. and will require research break-through in many
In particular, POSIX P.1003.4 subcommittee is aspects of system design and implementation. The
defining standards for real-time operating systems. architecture and hardware must also be designed to
Various problems exist when attempting to convert support predictability and facilitate analysis. An
a non real-time operating system to a real-time insidious aspect of critical real-time systems,
version. For example, in UNIX interface problems especially with respect to the real-time
exist in process scheduling due to the nice and set requirements, is the weakest link in the entire
priority primitives and its round robin scheduling system can undermine careful design and analysis
policy. These and some other problems can and at other levels. Finally, two very new trends
have been solved to result in a real-time operating involve the development of real-time databases and
system that is used for both real-time and non-real real-time artificial intelligence. We discuss them in
processing. For example, they list over RT-UNIX detail below:-

5
7.1. REAL-TIME DATABASES: implementations previously used by AI researchers
.For example, AI systems must be made to run
A real-time database is a database system where (at much faster aloe preemption to reduce latency for
least some) transactions have explicit timing responding to new stimuli, include deadlines and
constraints such as deadlines. Real-time database other timing constraints in search techniques.
systems can be found, for instance, in program
In addition to these changes within AI, real-time AI
trading in stock market, radar tracking systems,
(RTAI) techniques must be interfaced with lower
battle management systems, and computer
level real-time systems technology to produce a
integrated manufacturing systems. Some of these
functioning, reliable and carefully analyzable
systems are soft real-time systems.
system. Integrating RTAI and low level real-time
Most current real-time databases work deals with systems is quite a challenge because these RTAI
soft real-time systems. In this work, the need for an applications are operating in non-deterministic
integrated approach that includes conflict environments, there is missing or noisy
resolution, deadlock resolution, buffer information, objectives may change dynamically,
managements are identified. Many protocols base partial solution are sometimes acceptable so that
on locking, optimistic, and time stamped trade off between the quality of the solution and
concurrency control have been developed and time need to derive it can be made.
evaluated in test bed or simulation environments.
It is too easy to synthesize the general principles
In most case the optimistic approaches seem to
and ideas from these experiments, as sufficient
work best.
evaluative data is not available. Competing
Most hard real-time database systems are main software architectures for real-time AI include
memory databases of small size, with predefined production rule architectures, blackboard
transactions, and hand crafted for efficient architectures, and process trellis architecture. The
performance. The metrics for hard real-time process trellis architecture, used in the medical
databases are different than for soft real-time domain, is a highly static approach while the other
databases. In soft real-time database transactions two are much more dynamic. The trellis
have similar properties, but in addition have soft architecture has potential to provide static real-time
real-time constraints. Metrics include response guarantees for those applications characterized by
time and a throughput, but also include percentage enough time to completely compute results from a
of transactions, which meet their deadlines, or a set of inputs arrive. This approach is suitable from
weighted value function, which reflects the value, for certain types if real-time AI monitoring
imparted by a transaction completing on time. In a systems, but its generality for complex real-time AI
hard real-time database, transactions have systems has not been demonstrated.
serializability, atomicity, and permanence
properties. While the notion of consistency is
VIII. CURRENT RESEARCH IN REAL-TIME
relevant here, traditional approaches involve
OPERATING SYSTEMS:
achieving consistency, involving waits, rollbacks,
and aborts are not directly applicable. While the
Identifying that new approaches are needed which
hard real-time system should guarantee all critical
challenge the basic assumptions made by
transaction deadlines and strive to meet all other
timesharing operating systems and developing
transaction deadlines, this is not always possible.
those new paradigms. Developing real-time
Hence, metrics such as maximizing the value
synchronization primitives such as those that
imparted by complete transactions and maximizing
support priority inheritance, developing support for
the percentage of transactions that complete by
fault tolerance.
their deadline are primary metrics. Throughput and
response times are secondary metrics if they are Retaining significant strongly emphasizing
used at all. predictability not only of the kernel but also
providing good support for application level
predictability. There are several research projects
7.2. REAL-TIME ARTIFICIAL INTELLIGENCE:
that tell about the scope and research that is
ongoing. Some of them are MARS, SPRING,
Many complex real-time applications now require
MARUTI, ARTS, CHAOS, HARTOS,
or will require knowledge–based online assistance
DARK.MARS kernel offers support for controlling
operating in real-time. This necessitates a major
a distributed application based entirely on time
change to some of the paradigms and
events from the environment. The Maruti system

6
focuses on support for dynamic on-line guarantees
that tasks make their deadlines and on fault
tolerance. Maruti has been designed in a top down
approach with a goal of demonstrating principles.
As such, the actual implementation is high level
and runs on top of UNIX.

IX. CONCLUSIONS:

The scientific research community many grand


challenge problems whose solution requires high
performance computing. This list includes
scientific problems in earth and space sciences,
vision and robotics etc. These are of course very
important problems. One important grand
challenge that is missing is the need for developing
science and technology of real-time computing .So
many large, complex future applications depend on
real-time systems that is critical to focus efforts on
its -development.

X. BIBLIOGRAPHY:
[1] OPERATING SYSTEMS.--By Galvin.
[2] REAL-TIME SYSTEMS.--By Jane W. S. Liu.
[3] RTOS PROGRAMMING.--By I Kolnick.
[4] http:\\www.hcs.bu.edu
[5] http:\\www.cs.bu.edu
[6] http:\\beta.ece.vcsb.edu

Você também pode gostar