You are on page 1of 30

Program Elective IV

ECT426
Real Time Operating Systems

• A Real Time Operating System (RTOS) is any


Operating System (OS) intended to serve real-time
applications that process data as it comes in, typically
without any buffer delays.
• A real time system is a time bound system which has
well defined fixed time constraints.
• Processing must be done within the defined
constraints or the system will fail.
Real Time Operating Systems
Real Time – Soft and Hard

• Soft Real Time- Deadlines may be missed.

– Digital Camera, Mobile phone etc.

• Hard Real Time- Deadlines should never be missed.

– Air bag control in cars, anti-lock brake, engine


control system etc.

Real Time Operating Systems


Real Time Operating Systems
Real Time Operating Systems
Real Time Operating Systems
Module
1
Operating systems
Objectives and functions
Architecture of OS
Types of OS
What is an Operating
System?
• A program that acts as an interface between
the user of a computer and the computer
hardware.
• It is a layer of software between user and
computer hardware
• Operating system goals:
– Execute user programs and solve user
problems
– Make the computer system convenient to
use Real Time Operating Systems
Computer System
• Computer system can be divided into four components:
Structure
– Hardware – provides basic computing resources
• CPU, memory, I/O devices like keyboard, mouse etc
– Operating system
• Controls and coordinates use of hardware among
various applications and users
– Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
• Word processors, compilers, web browsers,
database systems, video games
– Users
• People, machines, other computers or even
Real Time Operating Systems
Four Components of a Computer
System

Real Time Operating Systems


• Compiler is a computer program that reads a program
written in one language, which is called the source
language, and translates it into another language, which is
called the target language.
• Most often, the source language is a high level language and
the target language is a low level language. So, in general
compilers can be seen as translators that translate from one
language to another.
• Assembler is a software or a tool that translates Assembly
language to machine code. So, an assembler is a type of a
compiler and the source code is written in Assembly
language.
• Assembly language is a human readable language but it
What Operating Systems Do
• Depends on the point of view
– User’s view and System’s view
• User view is about ease of use
• System view is about resource utilization

• In mainframe systems, OS is designed to maximize


resource utilization
• OS in dedicated systems such as workstations are designed
to
compromise between individual usability and resource
utilization
• OS in Handheld computers are resource poor, but optimized
for individual usability and battery life
• OS in some computers have little or no user interface, such as
Real Time Operating Systems
embedded computers in devices and automobiles
Operating systems
Operating System
Definition
• OS is a resource allocator
– Manages all resources
– Decides between conflicting requests for
efficient and fair resource use

• OS is a control program
– Controls execution of programs to prevent
errors and improper use of the computer

Real Time Operating Systems


OS Objectives and Functions
• OS is a layer of software whose job is to manage all
devices and provide user programs with a simpler
interface to the hardware

• Objectives of OS is to offer
–Convenience
–Efficiency
–Ability to evolve

Real Time Operating Systems


Operating System Definition (Cont.)

• No universally accepted definition

• “Everything a vendor ships when you order an


operating system” is good approximation

• “The one program running at all times on the


computer” is the kernel.

Real Time Operating Systems


Textbook 2: William Stallings
Layers and views of computer system

Real Time Operating Systems


A Layered Approach
• End user views a computer system in terms of a set of
applications
• Applications are developed in a programming language and is
developed by application programmer
• To make the applications reachable to computer hardware
system programs or utilities are provided

• OS comprises collection of system programs

• OS masks the details of the hardware from the programmer and


provides the programmer with a convenient interface for using
the system. Real Time Operating Systems
Broad Functions of OS

• As User/Computer Interface

• As Resource manager
Functions of OS as User/Computer Interface

• OS provides services in the following areas:

– Program Development- Editors/Debuggers assist


programmer in creating programs. These are
provided as application program development
tool.
– Program execution – load program-run program-
execute program
Real Time Operating Systems
Functions of OS as User/Computer Interface

– Access to I/O devices- OS provides a uniform


interface for
I/O devices which are appropriate for the end users
– Controlled Access to files - OS needs to understand
structure of file and also provide protection to users
in multiuser environment. Access to system files
are also to be in a controlled manner

Real Time Operating Systems


Functions of OS as User/Computer Interface
– Error detection – OS needs to be constantly aware of
possible errors
• Error may occur in the CPU, memory hardware, in
I/O devices, or in user programs
• For each type of error, OS should take the appropriate action
to ensure correct and consistent computing
• Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
– Accounting - To keep track of which users use how much
and
what kinds of computer resources
Real Time Operating Systems
Functions of OS as Resource manager

• OS controls the basic functions of the


computer like movement, storage,
processing of data

The main functions as resource manager are


• Process Management
• Memory Management
• File Management
• I/O system Management
• Secondary storage Management
Real Time Operating Systems
Functions of OS as Resource manager

• Process Management
1. Creating and deleting both user and system
processes
2. Suspending and resuming processes
3. Providing mechanisms for process
synchronization
4. Providing mechanisms for process
communication
5. Providing mechanisms for deadlock handling

Real Time Operating Systems


Functions of OS as Resource manager

• Memory Management
1. Keeps track of which parts of memory are
currently being used and by whom
2. Deciding which processes are to be loaded into
memory when memory space is available
3. Allocating and deallocating memory space needed

Real Time Operating Systems


Functions of OS as Resource manager

• File Management
1. Creating and deleting files
2. Creating and deleting directories
3. Support for manipulating files and directories
4. Mapping files onto secondary storage
5.Backing up files on non-volatile storage
media Volatile- RAM: data lost when power is
off
Non Volatile- ROM, Hard disks etc. : data is
preserved
Real Time Operating Systems
Functions of OS as Resource manager

• I/O system Management


1. Processes like buffering, caching etc
Cache-stores copy of original data,
Buffer is area in main memory to hold data
temporarily, Spooling- Spool is a kind of buffer used
to hold jobs for a device until the device is ready
2. General device-driver interface
3. Drivers for specific hardware devices

Real Time Operating Systems


Functions of OS as Resource manager

• Secondary Storage Management


1. Free space management
2. Disk Scheduling
3. Storage allocation

Real Time Operating Systems

You might also like