Anda di halaman 1dari 24

BITS Pilani

Pilani Campus

RKTiwary
RTOS
What is Embedded Systems ?
An embedded system is a special-purpose computer
system designed to perform one or a few dedicated
functions, often with real-time computing constraints.

Embedded systems contain a processor, software and


Memory and The processor may be 8051micro-controller
or a Pentium-IV processor, Memory ROM and RAM
respectively

Memory

Input Processor Output

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Real-Time Operating System
Real-time embedded systems is one major subclass of
embedded systems and time is most important part for this
type of system
An RTOS is an OS for response time-controlled and event-
controlled processes. It is very essential for large scale
embedded systems.
RTOS occupy little space from 10 KB to 100KB
Confer to timing:The main task of a RTOS is to manage the
resources of the computer such that a particular operation
executes in precisely the same amount of time every time it
occurs.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Car
• Mission: Reaching the destination safely.

• Controlled System: Car.

• Operating environment: Road conditions and other


traffic.

• Controlling System
- Human driver: Sensors - Eyes and Ears of the driver.
- Computer: Sensors - Cameras, Infrared receiver, and
Laser telemeter.

• Controls: Accelerator, Steering wheel, Break-pedal.


• Actuators: Wheels, Engines, and Brakes.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


When RTOS is not necessary?
Software for a large number of small-scale embedded
system use no RTOS and these functions are incorporated into
the application software.

For small-scaled systems, RTOS’s function can be replaced


by C.

For example, instead of the memory allocation and de-


allocation functions of RTOS, the C function

Software can directly handle inter-process communication

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


When RTOS is necessary?
However, RTOS is essential when…

A common and effective way of handling of the


hardware source calls from the interrupts

I/O management with devices, files, mailboxes


becomes simple using an RTOS

Effectively scheduling and running and blocking of the


tasks in cases of many tasks and many more…..

In conclusion, an RTOS may not be necessary in a


small-scaled embedded system. An RTOS is necessary
when scheduling of multiple processes and devices is
important.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
RTOS a neccessity

 Sophisticated applications
 writing one large program does not suffice
 multiple operations at widely varying times
 a single program , unwieldy
 two fundamental abstractions
 the process and the operating system
 process defines the state of an executing program
 OS provides the mechanism for switching
 satisfy complex timing requirements
 events happening at very different rates
 take real time into account

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Electronic fuel injection (EFI)
• allows precise and fast control of fuel injected
• by control of the ‘on-time’ period of the solenoid operated
injectors (spray nozzle) and plunger.
• delivery pipe fuel pressure is maintained constant by a fuel
pressure regulator
• opening and closing times of between 0.5 and 1 ms.
• engine operating speed of 6000 rpm (10 ms revolution time)
• injector on-time can be controlled between 1 and 10 ms

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Multirate Systems
Automotive engine control

by Marley [Mar78]
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Embedded vs. Real Time Systems

Embedded system: is a computer system that performs a


limited set of specific functions. It often interacts with its
environment.
RTS: Correctness of the system depends not only on the
logical results, but also on the time in which the results are
produced.

Real Time Embedded


Systems Systems

Examples?

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Real-time system.

Changes its state as a function of real time

Eg: chemical reaction

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Characteristics of RTS

 Event-driven, reactive.
 High cost of failure.
 Concurrency/multiprogramming.
 Stand-alone/continuous operation.
 Reliability/fault-tolerance requirements.
 Predictable behavior.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Definitions
• Hard real-time — systems where it is absolutely imperative that
responses occur within the required deadline. E.g. Flight control systems.

• Soft real-time — systems where deadlines are important but which will
still function correctly if deadlines are occasionally missed. E.g. Data
acquisition system.

• Real real-time — systems which are hard real-time and which the
response times are very short. E.g. Missile guidance system.

• Firm real-time — systems which are soft real-time but in which there is
no benefit from late delivery of service.

A single system may have all hard, soft and real real-time subsystems.
In reality many systems will have a cost function associated with missing each
deadline

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Examples

Real Time Embedded:


▪ Nuclear reactor control
▪ Flight control
▪ Basically any safety critical system
▪ GPS
▪ MP3 player
▪ Mobile phone
Real Time, but not Embedded:
▪ Stock trading system
▪ Skype
Embedded, but not Real Time:
▪ Home temperature control
▪ Sprinkler system
▪ Washing machine, refrigerator, etc.
▪ Blood pressure meter

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


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.

 Do not normally include facilities such as file


management.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


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.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Interrupt servicing

 Control is transferred automatically to a


pre-determined memory location.

 This location contains an instruction to jump to


an interrupt service routine.

 Further interrupts are disabled, the interrupt


serviced and control returned to the interrupted
process.

 Interrupt service routines MUST be short,


simple and fast.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Example

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Radar System
•An input/output subsystem that samples and digitizes the
echo signal from radar and places the sampled value in shared
memory.
•An array of digital signal processor to process sample values.

•Data processors to analyze the produced data which interface


with display system and generate commands to control radar
and select parameters to be used by signal processors in the
next cycle of data collection and analysis.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Signal Processing

•To search for objects of interest in it’s coverage area, the radar
scans the area by pointing its antenna in one direction at a time.

•It sends a short radio frequency pulse and collects and


examines the echo signal returning to antenna.

•Echo signal consists only background noise, if transmitted pulse


doesn’t hit any object.

•If there is a reflective object at distance ‘x’ from antenna, the


echo signal reflected returns approximately 2x/c seconds after
transmitted pulse and is stronger than when there is no reflected
signal.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Signal Processing
•If object is moving, the frequency of reflected signal is no longer
equal to the transmitted pulse. Therefore by examining the
strength and frequency spectrum of the echo signal, the system
can determine where there are objects in a direction.
•Specifically the system divides the time into small disjoint
intervals. Each interval corresponds to a distance range and
length of interval is equal to range resolution divided by c.
•The digital sampled values are placed in a buffer called bin.
•Sampled values in bin are inputs used by a digital signal
processor to produce outputs of the form

x(k) =

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Signal Processing

•Based on the characteristic of the transform,


the signal processor decides whether there is an
object in that distance range. If there is one,
it generates a track record containing the position and
velocity of the object and places the record in the
shared memory.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Tracking
•Strong noise and man-made interference can lead the signal
processing and detection process to wrong conclusion about
presence of objects.
•An application that examines all track records to sort out false
returns from real ones and update the trajectory is called
tracker.
•Tracker assigns each measured value to a trajectory. If the
trajectory is an existing one, measured value is assigned to it
gives current position and velocity of object moving along
trajectory. If new, measured value gives position and velocity
of possible new object.
•Trackers run one or more data processors which
communicate with signal processor via the shared memory.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Anda mungkin juga menyukai