Está en la página 1de 29

CONCEPTS OF

REAL-TIME

OPERATING SYSTEM
OBJECTIVE
 To Understand Why we need OS?
 To identify Types of OS

 To Define Real - Time Systems

 To Classify real time Systems


 To Understand What is an RTOS ?
 Components of RTOS

 To know secrets of What makes an OS as an


RTOS ?
 How to choose RTOS?
OPERATING SYTEMS
- Converts hardware of the system into
virtual machine.
- Acts as an interface between users and
hardware of the system.

- Controls and coordinates use of hardware


among various application programs
among users.
Types of OS
OS

Size Function

Smaller Larger
Ex:RTX-51 EX:WinNT,Unix

Multi-Tasking
Multi-Programming
Ex:RTX-51
Ex:Unix,WinNT
Architecture For Larger OS

Application Programs Kernel


rt
p o
u p Utilities
S
g e Fi
u aste ub M le
n g a na
Sy S

a
m
L ge
I/O

l e r r
d u Despat
he Int.
S c -cher
handler

CPU
I/O Devices
Architecture For Smaller OS

Application Programs Kernel

Dispatcher Int.
Scheduler
Handler.
CPU

I/O Devices
3) Multi-tasking OS:
- An instance of program in execution is
called “Process / Task”.
- Capability of OS to perform more
than one task at same time.
- Ability of OS to support concurrent
execution of two (or) more programs.
- OS switches from task to task
simultaneously.
- Two types are:
1) Cooperative
2) Preemptive
3) Multi-Programming OS:

=
Multi-Tasking
+
* Forms of memory protection
* Enforces concurrency control when
processes access shared I/O devices
and files.
Definition of Real-Time Systems

- Any system in which time at which output


is produced is significant.This is because
input corresponds to some movement in
physical world and output has to relate to
that same movement.The lag from input
time to output time must be sufficiently
small for acceptable timeliness.

OR
- Systems in which correct responses are
produced within a definite time limit. If
computer responses exceed these time
boundary then performance degradation
and/or malfunction results.

- Ex: Flight control, Industrial control,


military applications, robotics, nuclear
power plant control, automobile engine
control, etc.
Classification of Real-Time Systems

Real-Time Systems

Hard Soft
Classification of Real-Time Systems
Soft:
- Acceptance of lower performance for
lateness.
- Rising cost for lateness of system.
- Ex: vending machine, Temperature controller
d:
- No lateness is accepted under any
circumstances.
- Catastrophic failure if deadline missed
- Cost of missing deadline is infinitely h
- Ex: Missile system, aircraft.
What is RTOS?

operating system, that helps to build real-


time system.
Components of RTOS

* Task Management

* Memory Management

* Intertask Communication

* Intertask Synchronization
Functions of RTOS

1) Task Management:

* Allocation of memory and CPU time to task.


a) Scheduler:
- To keep a record of the state of each task

- To schedule the allocation of CPU time


to each task.
b) Dispatcher:
- To perform the context-switching.
Task State Diagram

New Ready Running Halted

Waiting
CPU Scheduling

- Deals with the problem of deciding which of


the
process(Task) in the ready queue is to be
allocated with CPU.

- Intention is to
a) To maximize CPU utilization among
different tasks in a multi-tasking program.
b) To minimize waiting time.
Scheduling Algorithms
a) First-Come-First-Served (FCFS)

b) Shortest Job First (SJF)

c) Priority based Pre-emption

d) Round-Robin (RR)
2) Memory management:
- Dynamic memory Allocation
- Used for storing intermediate results
- Memory allocation and deallocation
must exist within constant time limits.

3) Intertask Communication:
various mechanism available are:
(a) Pipes
(b) Message queues
(c) Remote procedural calls (RPC)
(a) Pipes:
- Simple communication channel that can
be used to send data from one task
to another.
- Pipe can be opened,closed,written to and
read just like files.
- Perform operation in only one direction.
(b) RPC:
- Procedure in one process can directly
call procedure in another process.
- Two process may be running on same
computer or on 2 different computers
connected by network.
(c) Message Queues:
- It allows transmission of messages from
one task to another task.

4) Intertask Synchronization:

Classified as:
(a) Signals
(b) Semaphores
(a) Signals:
- Used when task synchronization is
required without data exchange.
- Simplest and fastest method.
(b) Semaphore:
- Resources can be shared free of conflicts
between the individual tasks.
- Consists of a data item and a pair of
operations, wait and release.
What makes an OS as RTOS?
* An RTOS has to be multi-tasking and
preemptible.
* The notion of task priority has to exist.

* The OS has to support task synchronization


mechanisms.
* A system of priority inheritance has to exist.

* System should be deterministic.


Case Study - Why Windows NT is
not an RTOS?
* An RTOS has to be multi-tasking and
preemptible.

* The notion of task priority has to exist.


- But has only few level of priority,
therefore the predictability is poor
* The OS has to support task synchronization
mechanisms.

* A system of priority inheritance has to exist.


* System should be deterministic.
How to Choose RTOS?

Factors to be considered
* Support of your processor of choice
* Portability to new processor
* Scalability to match varied application
requirement
* Multi processor support
* Extended services such as Network
support
* Standards / POSIX compliance

* Language support

* Development environment

* Licensing arrangements & Price

También podría gustarte