Introduction toIntroduction to
Operating systemsOperating systems & RTOS& RTOS
Prologue …
A computer is a complex system with many
resources like CPU, I/O devices, disk, memory
etc… For any common user it is always a
confusion about the using of the resources
effectively. Because, unless otherwise the system
is user-friendly, the user cannot use the
computers effectively.
So we always require a system software which
can take care of all the hardware complexities
and shoulder the responsibility of resource
allocation such that the user can work with the
computer more effectively. This was realised by
the people very long back and they tried to
develop a software to shield the programmers
from the complexity of the hardware.
The result is, a layer of software on the top of
the hardware, to manage all parts of the
system and present the user with an interface
or “Virtual machine” that is easier to
understand the program. This layer of the
software has become our so-called
OPERATING SYSTEM.
Now Lets answer the questionNow Lets answer the question
What is an Operating System?What is an Operating System?
A more formal definition!A more formal definition!
OS is “A collection of software modules to
assist programmers in enhancing the system
efficiency , flexibility and robustness.
Or
“Operating system is a piece of software
which controls all the computer’s resources
and provides the base upon which the
application programs can be written”
From the user point of view
OS is “ An extended machine (virtual)”
and
From the systems view point
“It is a resource manager”.
So,Where your OS sits in your System?So,Where your OS sits in your System?
compilers
databases
word
processors
CPU
memory
I/O devices
Evolution of OSEvolution of OS
 Actually Prof.E.W.Dijsktra is considered as theActually Prof.E.W.Dijsktra is considered as the
father offather of Operating system.Operating system.
OS ComponentsOS Components
 Kernel: Core components of the OSKernel: Core components of the OS
 Process scheduler :Process scheduler :
 Determines when and for long each process executesDetermines when and for long each process executes
 Memory manager :Memory manager :
 Determines when and how memory is allocated to processesDetermines when and how memory is allocated to processes
 Decides what to do when main memory is fullDecides what to do when main memory is full
 File system :File system :
 Organizes named collections of data in persistent storageOrganizes named collections of data in persistent storage
 Networking :Networking :
 Enables processes to communicate with one anotherEnables processes to communicate with one another
The primary functions of anThe primary functions of an
operating systemoperating system
 Multiplexing the processor(s)Multiplexing the processor(s)
 Scheduling the processesScheduling the processes
 Coordinating interaction among processes,interprocessCoordinating interaction among processes,interprocess
communication and Synchronization.communication and Synchronization.
 Managing the system resources(I/O,memory,data files)Managing the system resources(I/O,memory,data files)
 Enforcing acess control and protectionEnforcing acess control and protection
 Maintaining the system integrity and performing errorMaintaining the system integrity and performing error
recoveryrecovery
 Providing an interface to the usersProviding an interface to the users
TYPES OF OPERATING SYSTEMSTYPES OF OPERATING SYSTEMS
There are three types of Operating systems basedThere are three types of Operating systems based
on their applicationon their application
• Stand-Alone Operating systemStand-Alone Operating system
• Network Operating systemsNetwork Operating systems
• Embedded Operating systemsEmbedded Operating systems
Stand-Alone Operating systemStand-Alone Operating system
 It is a complete operating system that worksIt is a complete operating system that works
on a desktop or notebook computer.on a desktop or notebook computer.
Examples of stand-alone operating systems are:Examples of stand-alone operating systems are:
 DOSDOS
 Windows 2000 professionalWindows 2000 professional
 Mac OS XMac OS X
Network Operating systemsNetwork Operating systems
 It is an operating system that provides extensiveIt is an operating system that provides extensive
support for computer networks. A networksupport for computer networks. A network
operating system typically resides on a server.operating system typically resides on a server.
Examples of a network Operating system are:Examples of a network Operating system are:
 Windows 2000 serverWindows 2000 server
 UnixUnix
 LinuxLinux
 SolarisSolaris
Embedded Operating systemEmbedded Operating system
 You can find this operating system on handheldYou can find this operating system on handheld
computers and small devices. It resides on acomputers and small devices. It resides on a
ROM chip. Examples of embedded operatingROM chip. Examples of embedded operating
systems are :systems are :
o Windows CEWindows CE
o Pocket PC 2002Pocket PC 2002
o Palm OSPalm OS
REAL- TIME OPERATINGREAL- TIME OPERATING
SYSTEM (RTOS) :SYSTEM (RTOS) :
 ““The ability of the operating system toThe ability of the operating system to
provide a required level of service in aprovide a required level of service in a
bounded response time”.bounded response time”.
OrOr
 The Real time operating system is anThe Real time operating system is an
operating system that make it suitable foroperating system that make it suitable for
building real time computing applicationsbuilding real time computing applications
also known as real timealso known as real time systems(RTS).systems(RTS).
What is a real time system(RTS)?What is a real time system(RTS)?
A RTS is a system where correctness ofA RTS is a system where correctness of
computing depends not only on the correctnesscomputing depends not only on the correctness
of the logical result of the computation but alsoof the logical result of the computation but also
on the result of delivery time. In a well designedon the result of delivery time. In a well designed
RTS each individual dead line should be met.RTS each individual dead line should be met.
But in practice it is not possible and also costlyBut in practice it is not possible and also costly
to achieve this requirement. So, people classifiedto achieve this requirement. So, people classified
the real time systems in to the following types.the real time systems in to the following types.
Hard Real timeHard Real time::
Here missing an individual deadline results inHere missing an individual deadline results in
catastrophic failure of the system which alsocatastrophic failure of the system which also
causes a great financial loss .causes a great financial loss .
The examples for Hard real time systems areThe examples for Hard real time systems are::
 Air traffic controlAir traffic control
 Nuclear power plant controlNuclear power plant control
Firm Real timeFirm Real time
In this, missing a deadline results inIn this, missing a deadline results in
unacceptable quality reduction. Technicallyunacceptable quality reduction. Technically
there is no difference with hard Real time, butthere is no difference with hard Real time, but
economically the disaster risk is limited.economically the disaster risk is limited.
Examples for Firm real time are :Examples for Firm real time are :
o Failure of Ignition of a automobileFailure of Ignition of a automobile
o Failure of opening of a safeFailure of opening of a safe
Soft real timeSoft real time::
Here the dead line may not be fulfilled and can beHere the dead line may not be fulfilled and can be
recovered from. The reduction in system qualityrecovered from. The reduction in system quality
and performance is at an acceptable level.and performance is at an acceptable level.
Examples of Soft real time systems :Examples of Soft real time systems :
 Multimedia transmission and receptionMultimedia transmission and reception
 Networking, telecom (Mobile) networksNetworking, telecom (Mobile) networks
 websites and serviceswebsites and services
 Computer gamesComputer games
Components of an RTOSComponents of an RTOS
 Process (task) managementProcess (task) management
 SchedulerScheduler
 Synchronization mechanismSynchronization mechanism
 Interprocess communication (IPC)Interprocess communication (IPC)
 SemaphoresSemaphores
 Memory managementMemory management
 Interrupt service mechanismInterrupt service mechanism
 I/O management , H.A.LayerI/O management , H.A.Layer
 Development EnvironmentsDevelopment Environments
 Communication subsystems (Option)Communication subsystems (Option)
 Board Support Packages (BSP)Board Support Packages (BSP)
Features of RTOS’sFeatures of RTOS’s
 PredictabilityPredictability
 TimelinessTimeliness
 ReliabilityReliability
 Fault tolerantFault tolerant
 Efficiency of SystemEfficiency of System
ComponentsComponents
 Resource Allocation.Resource Allocation.
 Interrupt Handling.Interrupt Handling.
 Other issues like kernelOther issues like kernel
size.size.
Types of RTOSTypes of RTOS
Commercial RTOSsCommercial RTOSs
 VxWorksVxWorks
 QNXQNX
 MicroC/OS-IIMicroC/OS-II
 RTLinuxRTLinux
 Windows CE ( www.microsoft.com)Windows CE ( www.microsoft.com)
VxWorksVxWorks
 This is from Wind River (This is from Wind River (www.windriver.comwww.windriver.com).).
 One of the most popular real time operatingOne of the most popular real time operating
systemsystem
 This has been used in the Mars pathfinderThis has been used in the Mars pathfinder
 It supports a number of processors includingIt supports a number of processors including
Power Pc, Intel strong ARM,ARM,HitachiPower Pc, Intel strong ARM,ARM,Hitachi
SuperH, Motorola ColdFire etc…SuperH, Motorola ColdFire etc…
 It supports multiple scheduling algorithm andIt supports multiple scheduling algorithm and
also priority inheritancealso priority inheritance
RTLinuxRTLinux
 This OS was developed by FSM Labs(This OS was developed by FSM Labs(
www.fsmlabs.comwww.fsmlabs.com) and available in two versions) and available in two versions
RTLinux Pro and RTLinuxFree.RTLinux Pro and RTLinuxFree.
 The RTLinux Pro is the priced edition andThe RTLinux Pro is the priced edition and
RTLinux Free is the free open source release.RTLinux Free is the free open source release.
 RTLinux is a hard real-time operating systemRTLinux is a hard real-time operating system
with support for many processors such aswith support for many processors such as
x86,Pentium,PowerPC,ARM,Fujitsu,MIPS andx86,Pentium,PowerPC,ARM,Fujitsu,MIPS and
AlphaAlpha
 It does not support priority inheritance.It does not support priority inheritance.
Windows CEWindows CE
 Windows CE (also known officially as WindowsWindows CE (also known officially as Windows
Embedded Compact and sometimesEmbedded Compact and sometimes
abbreviated WinCE) is an operating systemabbreviated WinCE) is an operating system
developed by Microsoft for minimalisticdeveloped by Microsoft for minimalistic
computers and embedded systems.computers and embedded systems.
 Windows CE is optimized for devices that haveWindows CE is optimized for devices that have
minimal storage—a Windows CE kernel mayminimal storage—a Windows CE kernel may
run in under a megabyte of memoryrun in under a megabyte of memory
Programming languages UsedProgramming languages Used
 C is most widely used in RTOS programmingC is most widely used in RTOS programming
 C++ and Ada are the next more popular for largeC++ and Ada are the next more popular for large
projects.projects.
 Assembly languages for increasing efficiency andAssembly languages for increasing efficiency and
reusing the previous codereusing the previous code
 Java may also be a choice for some applicationsJava may also be a choice for some applications
REFERENCESREFERENCES
 Modern Operating Sytems-Modern Operating Sytems- Andrew S. Tanenbaum (PHI)Andrew S. Tanenbaum (PHI)
 Operating Systems –W. Stallings (PHI)Operating Systems –W. Stallings (PHI)
 Operating system Concepts-Avi Silberschatz & PeterOperating system Concepts-Avi Silberschatz & Peter
Baer Galvin.Baer Galvin.
 Operating Systems-D. M. Dhamdhere- TMHOperating Systems-D. M. Dhamdhere- TMH

Os rtos.ppt

  • 1.
    Introduction toIntroduction to OperatingsystemsOperating systems & RTOS& RTOS
  • 2.
    Prologue … A computeris a complex system with many resources like CPU, I/O devices, disk, memory etc… For any common user it is always a confusion about the using of the resources effectively. Because, unless otherwise the system is user-friendly, the user cannot use the computers effectively.
  • 3.
    So we alwaysrequire a system software which can take care of all the hardware complexities and shoulder the responsibility of resource allocation such that the user can work with the computer more effectively. This was realised by the people very long back and they tried to develop a software to shield the programmers from the complexity of the hardware.
  • 4.
    The result is,a layer of software on the top of the hardware, to manage all parts of the system and present the user with an interface or “Virtual machine” that is easier to understand the program. This layer of the software has become our so-called OPERATING SYSTEM.
  • 5.
    Now Lets answerthe questionNow Lets answer the question What is an Operating System?What is an Operating System?
  • 6.
    A more formaldefinition!A more formal definition! OS is “A collection of software modules to assist programmers in enhancing the system efficiency , flexibility and robustness. Or “Operating system is a piece of software which controls all the computer’s resources and provides the base upon which the application programs can be written”
  • 7.
    From the userpoint of view OS is “ An extended machine (virtual)” and From the systems view point “It is a resource manager”.
  • 8.
    So,Where your OSsits in your System?So,Where your OS sits in your System? compilers databases word processors CPU memory I/O devices
  • 9.
    Evolution of OSEvolutionof OS  Actually Prof.E.W.Dijsktra is considered as theActually Prof.E.W.Dijsktra is considered as the father offather of Operating system.Operating system.
  • 10.
    OS ComponentsOS Components Kernel: Core components of the OSKernel: Core components of the OS  Process scheduler :Process scheduler :  Determines when and for long each process executesDetermines when and for long each process executes  Memory manager :Memory manager :  Determines when and how memory is allocated to processesDetermines when and how memory is allocated to processes  Decides what to do when main memory is fullDecides what to do when main memory is full  File system :File system :  Organizes named collections of data in persistent storageOrganizes named collections of data in persistent storage  Networking :Networking :  Enables processes to communicate with one anotherEnables processes to communicate with one another
  • 11.
    The primary functionsof anThe primary functions of an operating systemoperating system  Multiplexing the processor(s)Multiplexing the processor(s)  Scheduling the processesScheduling the processes  Coordinating interaction among processes,interprocessCoordinating interaction among processes,interprocess communication and Synchronization.communication and Synchronization.  Managing the system resources(I/O,memory,data files)Managing the system resources(I/O,memory,data files)  Enforcing acess control and protectionEnforcing acess control and protection  Maintaining the system integrity and performing errorMaintaining the system integrity and performing error recoveryrecovery  Providing an interface to the usersProviding an interface to the users
  • 12.
    TYPES OF OPERATINGSYSTEMSTYPES OF OPERATING SYSTEMS There are three types of Operating systems basedThere are three types of Operating systems based on their applicationon their application • Stand-Alone Operating systemStand-Alone Operating system • Network Operating systemsNetwork Operating systems • Embedded Operating systemsEmbedded Operating systems
  • 13.
    Stand-Alone Operating systemStand-AloneOperating system  It is a complete operating system that worksIt is a complete operating system that works on a desktop or notebook computer.on a desktop or notebook computer. Examples of stand-alone operating systems are:Examples of stand-alone operating systems are:  DOSDOS  Windows 2000 professionalWindows 2000 professional  Mac OS XMac OS X
  • 14.
    Network Operating systemsNetworkOperating systems  It is an operating system that provides extensiveIt is an operating system that provides extensive support for computer networks. A networksupport for computer networks. A network operating system typically resides on a server.operating system typically resides on a server. Examples of a network Operating system are:Examples of a network Operating system are:  Windows 2000 serverWindows 2000 server  UnixUnix  LinuxLinux  SolarisSolaris
  • 15.
    Embedded Operating systemEmbeddedOperating system  You can find this operating system on handheldYou can find this operating system on handheld computers and small devices. It resides on acomputers and small devices. It resides on a ROM chip. Examples of embedded operatingROM chip. Examples of embedded operating systems are :systems are : o Windows CEWindows CE o Pocket PC 2002Pocket PC 2002 o Palm OSPalm OS
  • 23.
    REAL- TIME OPERATINGREAL-TIME OPERATING SYSTEM (RTOS) :SYSTEM (RTOS) :  ““The ability of the operating system toThe ability of the operating system to provide a required level of service in aprovide a required level of service in a bounded response time”.bounded response time”. OrOr  The Real time operating system is anThe Real time operating system is an operating system that make it suitable foroperating system that make it suitable for building real time computing applicationsbuilding real time computing applications also known as real timealso known as real time systems(RTS).systems(RTS).
  • 24.
    What is areal time system(RTS)?What is a real time system(RTS)? A RTS is a system where correctness ofA RTS is a system where correctness of computing depends not only on the correctnesscomputing depends not only on the correctness of the logical result of the computation but alsoof the logical result of the computation but also on the result of delivery time. In a well designedon the result of delivery time. In a well designed RTS each individual dead line should be met.RTS each individual dead line should be met. But in practice it is not possible and also costlyBut in practice it is not possible and also costly to achieve this requirement. So, people classifiedto achieve this requirement. So, people classified the real time systems in to the following types.the real time systems in to the following types.
  • 25.
    Hard Real timeHardReal time:: Here missing an individual deadline results inHere missing an individual deadline results in catastrophic failure of the system which alsocatastrophic failure of the system which also causes a great financial loss .causes a great financial loss . The examples for Hard real time systems areThe examples for Hard real time systems are::  Air traffic controlAir traffic control  Nuclear power plant controlNuclear power plant control
  • 26.
    Firm Real timeFirmReal time In this, missing a deadline results inIn this, missing a deadline results in unacceptable quality reduction. Technicallyunacceptable quality reduction. Technically there is no difference with hard Real time, butthere is no difference with hard Real time, but economically the disaster risk is limited.economically the disaster risk is limited. Examples for Firm real time are :Examples for Firm real time are : o Failure of Ignition of a automobileFailure of Ignition of a automobile o Failure of opening of a safeFailure of opening of a safe
  • 27.
    Soft real timeSoftreal time:: Here the dead line may not be fulfilled and can beHere the dead line may not be fulfilled and can be recovered from. The reduction in system qualityrecovered from. The reduction in system quality and performance is at an acceptable level.and performance is at an acceptable level. Examples of Soft real time systems :Examples of Soft real time systems :  Multimedia transmission and receptionMultimedia transmission and reception  Networking, telecom (Mobile) networksNetworking, telecom (Mobile) networks  websites and serviceswebsites and services  Computer gamesComputer games
  • 28.
    Components of anRTOSComponents of an RTOS  Process (task) managementProcess (task) management  SchedulerScheduler  Synchronization mechanismSynchronization mechanism  Interprocess communication (IPC)Interprocess communication (IPC)  SemaphoresSemaphores  Memory managementMemory management  Interrupt service mechanismInterrupt service mechanism  I/O management , H.A.LayerI/O management , H.A.Layer  Development EnvironmentsDevelopment Environments  Communication subsystems (Option)Communication subsystems (Option)  Board Support Packages (BSP)Board Support Packages (BSP)
  • 29.
    Features of RTOS’sFeaturesof RTOS’s  PredictabilityPredictability  TimelinessTimeliness  ReliabilityReliability  Fault tolerantFault tolerant  Efficiency of SystemEfficiency of System ComponentsComponents  Resource Allocation.Resource Allocation.  Interrupt Handling.Interrupt Handling.  Other issues like kernelOther issues like kernel size.size.
  • 30.
    Types of RTOSTypesof RTOS Commercial RTOSsCommercial RTOSs  VxWorksVxWorks  QNXQNX  MicroC/OS-IIMicroC/OS-II  RTLinuxRTLinux  Windows CE ( www.microsoft.com)Windows CE ( www.microsoft.com)
  • 31.
    VxWorksVxWorks  This isfrom Wind River (This is from Wind River (www.windriver.comwww.windriver.com).).  One of the most popular real time operatingOne of the most popular real time operating systemsystem  This has been used in the Mars pathfinderThis has been used in the Mars pathfinder  It supports a number of processors includingIt supports a number of processors including Power Pc, Intel strong ARM,ARM,HitachiPower Pc, Intel strong ARM,ARM,Hitachi SuperH, Motorola ColdFire etc…SuperH, Motorola ColdFire etc…  It supports multiple scheduling algorithm andIt supports multiple scheduling algorithm and also priority inheritancealso priority inheritance
  • 32.
    RTLinuxRTLinux  This OSwas developed by FSM Labs(This OS was developed by FSM Labs( www.fsmlabs.comwww.fsmlabs.com) and available in two versions) and available in two versions RTLinux Pro and RTLinuxFree.RTLinux Pro and RTLinuxFree.  The RTLinux Pro is the priced edition andThe RTLinux Pro is the priced edition and RTLinux Free is the free open source release.RTLinux Free is the free open source release.  RTLinux is a hard real-time operating systemRTLinux is a hard real-time operating system with support for many processors such aswith support for many processors such as x86,Pentium,PowerPC,ARM,Fujitsu,MIPS andx86,Pentium,PowerPC,ARM,Fujitsu,MIPS and AlphaAlpha  It does not support priority inheritance.It does not support priority inheritance.
  • 33.
    Windows CEWindows CE Windows CE (also known officially as WindowsWindows CE (also known officially as Windows Embedded Compact and sometimesEmbedded Compact and sometimes abbreviated WinCE) is an operating systemabbreviated WinCE) is an operating system developed by Microsoft for minimalisticdeveloped by Microsoft for minimalistic computers and embedded systems.computers and embedded systems.  Windows CE is optimized for devices that haveWindows CE is optimized for devices that have minimal storage—a Windows CE kernel mayminimal storage—a Windows CE kernel may run in under a megabyte of memoryrun in under a megabyte of memory
  • 34.
    Programming languages UsedProgramminglanguages Used  C is most widely used in RTOS programmingC is most widely used in RTOS programming  C++ and Ada are the next more popular for largeC++ and Ada are the next more popular for large projects.projects.  Assembly languages for increasing efficiency andAssembly languages for increasing efficiency and reusing the previous codereusing the previous code  Java may also be a choice for some applicationsJava may also be a choice for some applications
  • 35.
    REFERENCESREFERENCES  Modern OperatingSytems-Modern Operating Sytems- Andrew S. Tanenbaum (PHI)Andrew S. Tanenbaum (PHI)  Operating Systems –W. Stallings (PHI)Operating Systems –W. Stallings (PHI)  Operating system Concepts-Avi Silberschatz & PeterOperating system Concepts-Avi Silberschatz & Peter Baer Galvin.Baer Galvin.  Operating Systems-D. M. Dhamdhere- TMHOperating Systems-D. M. Dhamdhere- TMH