SlideShare a Scribd company logo
1 of 37
REAL TIME OPERATING
   SYSTEM (RTOS) CONCEPTS


Pantech Prolabs India Pvt Ltd
What is Real Time?
 1) Real time is a level of responsiveness that a user senses
as sufficiently immediate or that enables the computer to
keep up with some external process.
2) Real time describes a human rather than machine sense of
time.
3) It is the class of computers systems that interacts with the
external world in a time frame defined by the external world.
4) It is the system in which the correctness of the
computations not only depends upon the logical correctness
of the computation but also upon the time at which the
result is produced.
5) If the timing constraints of the system are not met system
failure is said to have occurred.
There are two aspects related to timeliness :
    1) Objective : The degree to which an entity (application, system, thread) operates in
    real time has acceptable timeliness properties according to timeliness specification.

    2) Means To that Objective: Achieving an acceptable degree of timeliness may or may
    not involve the second aspect of real time computing.(Real time resource management)
What is RTOS?
1)  A real time operating system (RTOS) is an operating system that guarantees a certain
    capability within a specified time constraint.
2) An OS is a system program that provides an interface between application programs and
    the computer system (hardware)
3) The applications where dependability that a certain task will finish before a particular
    deadline is just as obtaining the correct results.
4) Besides meeting deadlines RTOS must also be able to respond predictably to unpredictable
    events and process multiple events concurrently.
5) A system application/computer/operating system operates in real
time to the degree that those of its actions which have time
constraints are performed with acceptable timeliness.

6) A system is real time the degree that it employs real time resource
management. The resources are explicitly managed for the purpose of
operating in real time.

7) The system operating in real time needs an appropriate balance of
real time resource management & hardware resource capacity.
OS Basics
  Four main tasks of OS
      Process Management

          Process creation

          Process loading

          Process execution control

          Interaction of the process with signal
          events
          Process monitoring

          CPU allocation

          Process termination
OS Basics
     Inter-process Communication
         Synchronization and coordination

         Deadlock detection

         Process Protection

         Data Exchange Mechanisms

     Memory Management

         Services for file creation, deletion,
          reposition and protection
     Input / Output Management

         Handles requests and release subroutines
          for a variety of peripherals and read, write
          and reposition programs
Types Of RTOS

1) Hard Real Time Systems:
a) If it has a hard deadline for the completion of an action meaning
that the deadline must always be met, otherwise the task has failed.

b) This types of systems deployed in embedded safety-critical
systems in which missed deadline can be catastrophic.

c) Examples: aircraft , train, car, missile and nuclear reactor control
systems.
2) Soft Real Time Systems :

a) Soft real time by default as “Not Hard Real Time.”

b) Missing some deadlines by some amount under some circumstances may be acceptable
rather than failure.

c) In this systems there is usually a rising cost associated with lateness.

d) Soft real time means systems which have reduced constraints on “lateness” but still
must operate very quickly and repeatable.
Architecture of RTOS
The basic architecture of multitasking RTOS includes
a) Program interface b) The Kernel c)Device Drivers
d) Optional service modules

1) The Kernel provides an interrupt handler, task scheduler ,
resource sharing flags and memory management.

2) Primary function : To process interrupts that external and internal
events cause.

3) Scheduler :That sets up the order of execution of your application
code.
Command Interpreter Graphics Interface

              Posit and Unix Graphics Programming Interface

                Kernal Services                                     Networking

  Interrupt         Memory
                                     Scheduling                    Network File
  Dispatch        Management                                                      Graphics
                                                                     System
                                                        ANSI
                                                                     Remote       Support
                                                      Compliant
 Logic and                           Real Time                      Procedure      Library
                                                          C
character I/O     Interposes           Clock                           Calls
                                                       Library
                Communication
   File             Support
                                      Loader
Management                                                            Streams


                                         Device Drivers
     Disc            Miscellaneous          Network               Parallel        Serial
Requirement for Good RTOS

1) Multitasking Capabilities: A RT application is divided into multiple
tasks. The separation into tasks helps to keep the CPU busy.

2) Short Interrupt Latency :
Interrupt Latency = Hardware delay to get interrupt signal to the
processor + time to complete the current instruction + time executing
system code in preparation for transferring execution to the devices
interrupt handler.

3) Fast Context Switch : The time between the OS recognizing that the
awaited event has arrived and the beginning of the waiting task is called
context switch time(dispatch latency).This switching time should be
minimum.
4) Control Of Memory Management :an OS should provide way for task
to lock its code and data into real memory so that it can guarantee
predictable response to a interrupt.

5) Proper scheduling : OS must provide facility to schedule properly
time constrained tasks.

6) Fine granularity Timer Services : Millisecond resolution is bare
minimum . Microseconds resolution is required in some cases.

7) Rich set of Inter Task Communication Mechanism :
 Message queues, shared memory ,
 Synchronization –Semaphores, event flags
Fundamental RTOS capabilities :

a) RTOS vendor must provide worst case execution times for all times
for all OS routines.

b) RTOS must include scheduling and resource sharing algorithms that
enables deterministic behavior.

c) Effective RTOS must also be able to handle preemptive scheduling.
It enables high priority tasks to execute without being blocked by
lower priority tasks.
RTOS Concepts
1) Scheduling and Dispatching :
a) Scheduling is the creation of a schedule Ie. A ordered list specifying
how contending accesses to one or more sequentially reusable
resources will be granted.

b) A schedule is some criteria such as timeliness.

c) Dispatching is granting access to the currently most eligible
contending entity.

d) Eligibility is the entities position in a schedule or in the absence of
schedule , other eligibility parameters such as priority and deadline.
e) More commonly RTOS/OS they can be used for dispatching from a
heap of unscheduled contending entities (highest priority or earliest
deadline) this is called dispatching rule.

2) Schedulable and Non-Schedulable Entities : A computing system has
a mixture has schedulable & Non-schedulable entities.
a) Schedulable Entities : Threads, tasks, processes in application and
system s/w are scheduled by scheduler.

b) Non-Schedulable Entities: Interrupt handlers,OS commands, packet
level N/W communication services ,OS scheduler. They execute
continuously , periodically or in response to events, their timeliness is
the responsibility of the system design and implementation not of the
scheduler.
3) Timeliness Specification : There are two levels
a) For Individual Entities : Schedulable ones such as threads ,non
schedulable ones such as interrupt routines.
b) For sets of Entities : For sets of entities have collective timeliness
specification.

4) Schedulable Entity Timeliness Specifications
a) First level of timeliness specification for a schedulable entity
(thread) is that it may have one or more completion time
constraints(deadlines).
b) Second level of timeliness specification is that currently unable
set of such threads is scheduled such that to optimize collective
timeliness.ie.to meet all deadlines.
5) Completion Time Constraint : It is predicate which applies to some portion(frequently all) of
a threads locus of execution, that portion is called the time constraints scope. It is the part of
the logic of the application.

6) Deadline : It is the completion time constraint which specifies the timeliness of the threads
transit through the deadline scope whether the threads execution point reaches the end of the
scope before the deadline time has occurred ie.whether the deadline is met.
7) Hard Deadline: It is completion time constraint ie.the threads
execution point reaches the end of the deadline scope before the
deadline time occurs, then time constrained portion of threads
execution is timely otherwise that portion is not timely.

8) Soft Deadline: It is completion time constraint ie.the threads
execution point reaches the end of the deadline scope before the
deadline time occurs, then time constrained portion of threads
execution is more timely otherwise that portion is less timely.

9) Soft Time Constraint :
a) It is any relationship between the time when the threads execution
point reaches the end of the that time constraints scope and the utility
to the system of when it does so.
b) A thread for which there is no relationship between the timing of its
execution and its utility to the system is a non real-time system.
10) Non-schedulable Entity Timeliness Specifications :
   a) The completion time constraints of non-schedulable entities
   are Hard & soft upper bounds on their execution
   latencies(duration) which correspond to hard and soft deadlines
   of schedulable entities.

  11) Upper Bound: An upper bound is completion time constraint.
  It specifies the timeliness of Non-schedulable entity’s execution
  point reaches the end of the scope before the upper bound time
  has occurred in which case the upper bound is satisfied.
a) Hard Upper Bound : Non-schedulable entity’s execution point
reaches the end of the upper bound scope before the upper bound time
occurs. Time constrained portion of the entity’s execution is timely,
otherwise the portion is not timely.

b) Soft Upper Bound : Non-schedulable entity’s execution point reaches
the end of the upper bound scope before the upper bound time occurs.
Time constrained portion of the entity’s execution is more timely,
otherwise the portion is less timely.
12) Predictability :
a) It is to the degree that is known in advance.
b) Determinism : the property is known exactly in advance.
c) Maximum Entropy : Nothing at all is known in advance about the property.

13) Predictability of Timeliness Optimality :
a) It’s the performance of the system of whole. ie.meet all deadlines , minimize the number of
missed deadlines.
b) The predictability of collective timeliness optimality, rather than predictability of each
individual threads completion with respect to its own time constraint.
14) Hard Real Time :
a) Case where for schedulable entities some time constraints are hard deadlines.
b)Timeliness component of scheduling criterion is always meet all hard deadlines.
c)For non-schedulable entities some upper bounds are hard, system has designed &
implemented so that all hard upper bounds are always satisfied.

15) Soft Real Time :
a) Time constraints are soft such as classical lateness function.
b) Any scheduling criteria may be used such as minimizing the no. of missed deadlines.
Features Of RTOS
1) Multitasking : There are two ways to achieve Multitasking
to share CPU time between two or more tasks.

A) Pre-emptive Multitasking :
a) An external tick interrupt ,interrupts task at an
indeterminate point and passes control to kernel program.
b) The kernel will save the state of the interrupted task ad
then determine which task it should run next.
c) The Kernel restore the state of task and pass control of the
CPU to that task.
d) Task will continue to run until it is interrupted by next
external tick interrupt or voluntarily gives up allotted time
slice.
Preemptive Kernel
B) Non-preemptive Multitasking :

a) In Non-preemptive multitasking a task is designed to relinquish
control of the CPU to the kernel at regular intervals.

b) To the implementation of non-preemptive multitasking is the use
of a message queue.

c) The kernal manages the message queue which is essentially a
queue of message numbers & small amount of data.

.
Non Preemptive Kernel
2) Process thread can be prioritized :
a) A OS schedules threads/or processes based on their relative priorities.
b) Processes are forced to relinquish the processor if a higher priority process becomes ready to
run.
c) Highest priority unable process will be executing on the system at all times

3) Sufficient number of interrupt levels :
a) Advantage of interrupt threads is that they permit the OS to be more responsive to the
devices it services.
b) ISR typically disable other interrupts while executing using interrupt threads permits
interrupts to be responded to at more regular intervals
Task Management

  The main function of tasks within a Real-Time Multitasking
  Executive is the time-critical processing of external or
  internal events

     Task States
     Task Switching
Task States
Process Scheduling Types
     Types of Scheduling Policies
        Deadline driven – ideal but not available

        Cooperative – relies on current process to give up

         the CPU
        Pre-emptive priority scheduling – higher priority

         tasks may interrupt lower priority tasks
            Static – priorities are set before the system
             begins execution
            Dynamic – priorities can be redefined at run
             time
Process Scheduling Types
           Many priorities levels in a RTOS is better to
            have for complex systems with many threads
              At least 128 levels
              A different priority level can be set for each
               task or thread
       Round Robin – give each task an equal share of the
        processor
           Implemented when all tasks or threads have the
            same priority level
           May be implemented within a priority range
Real time Applications Used Today:

1) Military : For gathering data from a wide variety of real
time sensors (satellite, air,surface,subsurface) and delivering
it to analysis capabilities and weapon systems

2) Telecommunications: Real Time access to information
from vast array of devices including computers,set top
boxes,PDAs,Pagers and wireless phones.

3) Aviation: Improved real time capabilities will increase
safety and efficiency by identifying dangerous situations and
enabling flexible routing to relieve congestion and prevent
collisions.
4)Automotive : Commuters will receive real time data , GPS location information and
operational data via ground stations and satellites , thus routing the driver around
accidents , roadwork or traffic congestion in real time.

5) Scientific : For monitoring and instrument control.eg.seismic information is
increasingly distributed on a vast scale ,enabling scientist to verify even small scale
nuclear detonations as well as helping smaller remote countries prepare for weather and
seismic disasters.
For more details
  www.pantechsolutions.net
  http://www.slideshare.net/pantechsolutions
  http://www.scribd.net/pantechsolutions
  http://www.youtube.net/pantechsolutions
© 2008 Pantech Solutions™ | All rights reserved |
           www.panetchsolutions.net
© 2008 Pantech Solutions™ | All
        rights reserved

More Related Content

What's hot

RTOS for Embedded System Design
RTOS for Embedded System DesignRTOS for Embedded System Design
RTOS for Embedded System Designanand hd
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system designMukesh Bansal
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded SystemsSudhanshu Janwadkar
 
Arm modes
Arm modesArm modes
Arm modesabhi165
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notesDr.YNM
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processorRAMPRAKASHT1
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architectureZakaria Gomaa
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systemscoolmirza143
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating SystemDr. Pankaj Zope
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOSVishwa Mohan
 

What's hot (20)

RTOS for Embedded System Design
RTOS for Embedded System DesignRTOS for Embedded System Design
RTOS for Embedded System Design
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Arm modes
Arm modesArm modes
Arm modes
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
 
Vx works RTOS
Vx works RTOSVx works RTOS
Vx works RTOS
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
How to choose an RTOS?
How to choose an RTOS?How to choose an RTOS?
How to choose an RTOS?
 
Ethernet
EthernetEthernet
Ethernet
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Memory management
Memory managementMemory management
Memory management
 
Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
 

Similar to RTOS-Real Time Operating System Concepts

Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating SystemsPawandeep Kaur
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsWayne Jones Jnr
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Gaurav Kakade
 
Enea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Software AB
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYreginamutio48
 
Factors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxFactors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxZain Abid
 
Device Drivers
Device DriversDevice Drivers
Device DriversSuhas S R
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.pptrahul km
 
What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?IntervalZero
 
What is operating system
What is operating systemWhat is operating system
What is operating systemvmahesmca
 
What is operating system
What is operating systemWhat is operating system
What is operating systemvmahesmca
 

Similar to RTOS-Real Time Operating System Concepts (20)

Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Os Concepts
Os ConceptsOs Concepts
Os Concepts
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
UNIT V PPT.ppt
UNIT V PPT.pptUNIT V PPT.ppt
UNIT V PPT.ppt
 
RTOS
RTOSRTOS
RTOS
 
Embedded os
Embedded osEmbedded os
Embedded os
 
Rtos 2
Rtos 2Rtos 2
Rtos 2
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)
 
Enea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux Whitepaper
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
 
Factors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxFactors Affecting the System Safety || Linux
Factors Affecting the System Safety || Linux
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.ppt
 
Unit v
Unit vUnit v
Unit v
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?
 
What is operating system
What is operating systemWhat is operating system
What is operating system
 
What is operating system
What is operating systemWhat is operating system
What is operating system
 

More from Pantech ProLabs India Pvt Ltd

Choosing the right processor for embedded system design
Choosing the right processor for embedded system designChoosing the right processor for embedded system design
Choosing the right processor for embedded system designPantech ProLabs India Pvt Ltd
 

More from Pantech ProLabs India Pvt Ltd (20)

Registration process
Registration processRegistration process
Registration process
 
Choosing the right processor for embedded system design
Choosing the right processor for embedded system designChoosing the right processor for embedded system design
Choosing the right processor for embedded system design
 
Brain Computer Interface
Brain Computer InterfaceBrain Computer Interface
Brain Computer Interface
 
Electric Vehicle Design using Matlab
Electric Vehicle Design using MatlabElectric Vehicle Design using Matlab
Electric Vehicle Design using Matlab
 
Image processing application
Image processing applicationImage processing application
Image processing application
 
Internet of Things using Raspberry Pi
Internet of Things using Raspberry PiInternet of Things using Raspberry Pi
Internet of Things using Raspberry Pi
 
Internet of Things Using Arduino
Internet of Things Using ArduinoInternet of Things Using Arduino
Internet of Things Using Arduino
 
Brain controlled robot
Brain controlled robotBrain controlled robot
Brain controlled robot
 
Brain Computer Interface-Webinar
Brain Computer Interface-WebinarBrain Computer Interface-Webinar
Brain Computer Interface-Webinar
 
Development of Deep Learning Architecture
Development of Deep Learning ArchitectureDevelopment of Deep Learning Architecture
Development of Deep Learning Architecture
 
Future of AI
Future of AIFuture of AI
Future of AI
 
Gate driver design and inductance fabrication
Gate driver design and inductance fabricationGate driver design and inductance fabrication
Gate driver design and inductance fabrication
 
Brainsense -Brain computer Interface
Brainsense -Brain computer InterfaceBrainsense -Brain computer Interface
Brainsense -Brain computer Interface
 
Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 
Waveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSPWaveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSP
 
Interfacing UART with tms320C6745
Interfacing UART with tms320C6745Interfacing UART with tms320C6745
Interfacing UART with tms320C6745
 
Switch & LED using TMS320C6745 DSP
Switch & LED using TMS320C6745 DSPSwitch & LED using TMS320C6745 DSP
Switch & LED using TMS320C6745 DSP
 
Led blinking using TMS320C6745
Led blinking using TMS320C6745Led blinking using TMS320C6745
Led blinking using TMS320C6745
 
Introduction to tms320c6745 dsp
Introduction to tms320c6745 dspIntroduction to tms320c6745 dsp
Introduction to tms320c6745 dsp
 

Recently uploaded

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 

RTOS-Real Time Operating System Concepts

  • 1. REAL TIME OPERATING SYSTEM (RTOS) CONCEPTS Pantech Prolabs India Pvt Ltd
  • 2. What is Real Time? 1) Real time is a level of responsiveness that a user senses as sufficiently immediate or that enables the computer to keep up with some external process. 2) Real time describes a human rather than machine sense of time. 3) It is the class of computers systems that interacts with the external world in a time frame defined by the external world. 4) It is the system in which the correctness of the computations not only depends upon the logical correctness of the computation but also upon the time at which the result is produced. 5) If the timing constraints of the system are not met system failure is said to have occurred.
  • 3. There are two aspects related to timeliness : 1) Objective : The degree to which an entity (application, system, thread) operates in real time has acceptable timeliness properties according to timeliness specification. 2) Means To that Objective: Achieving an acceptable degree of timeliness may or may not involve the second aspect of real time computing.(Real time resource management)
  • 4. What is RTOS? 1) A real time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint. 2) An OS is a system program that provides an interface between application programs and the computer system (hardware) 3) The applications where dependability that a certain task will finish before a particular deadline is just as obtaining the correct results. 4) Besides meeting deadlines RTOS must also be able to respond predictably to unpredictable events and process multiple events concurrently.
  • 5. 5) A system application/computer/operating system operates in real time to the degree that those of its actions which have time constraints are performed with acceptable timeliness. 6) A system is real time the degree that it employs real time resource management. The resources are explicitly managed for the purpose of operating in real time. 7) The system operating in real time needs an appropriate balance of real time resource management & hardware resource capacity.
  • 6. OS Basics Four main tasks of OS  Process Management  Process creation  Process loading  Process execution control  Interaction of the process with signal events  Process monitoring  CPU allocation  Process termination
  • 7. OS Basics  Inter-process Communication  Synchronization and coordination  Deadlock detection  Process Protection  Data Exchange Mechanisms  Memory Management  Services for file creation, deletion, reposition and protection  Input / Output Management  Handles requests and release subroutines for a variety of peripherals and read, write and reposition programs
  • 8. Types Of RTOS 1) Hard Real Time Systems: a) If it has a hard deadline for the completion of an action meaning that the deadline must always be met, otherwise the task has failed. b) This types of systems deployed in embedded safety-critical systems in which missed deadline can be catastrophic. c) Examples: aircraft , train, car, missile and nuclear reactor control systems.
  • 9. 2) Soft Real Time Systems : a) Soft real time by default as “Not Hard Real Time.” b) Missing some deadlines by some amount under some circumstances may be acceptable rather than failure. c) In this systems there is usually a rising cost associated with lateness. d) Soft real time means systems which have reduced constraints on “lateness” but still must operate very quickly and repeatable.
  • 10. Architecture of RTOS The basic architecture of multitasking RTOS includes a) Program interface b) The Kernel c)Device Drivers d) Optional service modules 1) The Kernel provides an interrupt handler, task scheduler , resource sharing flags and memory management. 2) Primary function : To process interrupts that external and internal events cause. 3) Scheduler :That sets up the order of execution of your application code.
  • 11. Command Interpreter Graphics Interface Posit and Unix Graphics Programming Interface Kernal Services Networking Interrupt Memory Scheduling Network File Dispatch Management Graphics System ANSI Remote Support Compliant Logic and Real Time Procedure Library C character I/O Interposes Clock Calls Library Communication File Support Loader Management Streams Device Drivers Disc Miscellaneous Network Parallel Serial
  • 12. Requirement for Good RTOS 1) Multitasking Capabilities: A RT application is divided into multiple tasks. The separation into tasks helps to keep the CPU busy. 2) Short Interrupt Latency : Interrupt Latency = Hardware delay to get interrupt signal to the processor + time to complete the current instruction + time executing system code in preparation for transferring execution to the devices interrupt handler. 3) Fast Context Switch : The time between the OS recognizing that the awaited event has arrived and the beginning of the waiting task is called context switch time(dispatch latency).This switching time should be minimum.
  • 13. 4) Control Of Memory Management :an OS should provide way for task to lock its code and data into real memory so that it can guarantee predictable response to a interrupt. 5) Proper scheduling : OS must provide facility to schedule properly time constrained tasks. 6) Fine granularity Timer Services : Millisecond resolution is bare minimum . Microseconds resolution is required in some cases. 7) Rich set of Inter Task Communication Mechanism : Message queues, shared memory , Synchronization –Semaphores, event flags
  • 14. Fundamental RTOS capabilities : a) RTOS vendor must provide worst case execution times for all times for all OS routines. b) RTOS must include scheduling and resource sharing algorithms that enables deterministic behavior. c) Effective RTOS must also be able to handle preemptive scheduling. It enables high priority tasks to execute without being blocked by lower priority tasks.
  • 15. RTOS Concepts 1) Scheduling and Dispatching : a) Scheduling is the creation of a schedule Ie. A ordered list specifying how contending accesses to one or more sequentially reusable resources will be granted. b) A schedule is some criteria such as timeliness. c) Dispatching is granting access to the currently most eligible contending entity. d) Eligibility is the entities position in a schedule or in the absence of schedule , other eligibility parameters such as priority and deadline.
  • 16. e) More commonly RTOS/OS they can be used for dispatching from a heap of unscheduled contending entities (highest priority or earliest deadline) this is called dispatching rule. 2) Schedulable and Non-Schedulable Entities : A computing system has a mixture has schedulable & Non-schedulable entities. a) Schedulable Entities : Threads, tasks, processes in application and system s/w are scheduled by scheduler. b) Non-Schedulable Entities: Interrupt handlers,OS commands, packet level N/W communication services ,OS scheduler. They execute continuously , periodically or in response to events, their timeliness is the responsibility of the system design and implementation not of the scheduler.
  • 17. 3) Timeliness Specification : There are two levels a) For Individual Entities : Schedulable ones such as threads ,non schedulable ones such as interrupt routines. b) For sets of Entities : For sets of entities have collective timeliness specification. 4) Schedulable Entity Timeliness Specifications a) First level of timeliness specification for a schedulable entity (thread) is that it may have one or more completion time constraints(deadlines). b) Second level of timeliness specification is that currently unable set of such threads is scheduled such that to optimize collective timeliness.ie.to meet all deadlines.
  • 18. 5) Completion Time Constraint : It is predicate which applies to some portion(frequently all) of a threads locus of execution, that portion is called the time constraints scope. It is the part of the logic of the application. 6) Deadline : It is the completion time constraint which specifies the timeliness of the threads transit through the deadline scope whether the threads execution point reaches the end of the scope before the deadline time has occurred ie.whether the deadline is met.
  • 19. 7) Hard Deadline: It is completion time constraint ie.the threads execution point reaches the end of the deadline scope before the deadline time occurs, then time constrained portion of threads execution is timely otherwise that portion is not timely. 8) Soft Deadline: It is completion time constraint ie.the threads execution point reaches the end of the deadline scope before the deadline time occurs, then time constrained portion of threads execution is more timely otherwise that portion is less timely. 9) Soft Time Constraint : a) It is any relationship between the time when the threads execution point reaches the end of the that time constraints scope and the utility to the system of when it does so. b) A thread for which there is no relationship between the timing of its execution and its utility to the system is a non real-time system.
  • 20. 10) Non-schedulable Entity Timeliness Specifications : a) The completion time constraints of non-schedulable entities are Hard & soft upper bounds on their execution latencies(duration) which correspond to hard and soft deadlines of schedulable entities. 11) Upper Bound: An upper bound is completion time constraint. It specifies the timeliness of Non-schedulable entity’s execution point reaches the end of the scope before the upper bound time has occurred in which case the upper bound is satisfied.
  • 21. a) Hard Upper Bound : Non-schedulable entity’s execution point reaches the end of the upper bound scope before the upper bound time occurs. Time constrained portion of the entity’s execution is timely, otherwise the portion is not timely. b) Soft Upper Bound : Non-schedulable entity’s execution point reaches the end of the upper bound scope before the upper bound time occurs. Time constrained portion of the entity’s execution is more timely, otherwise the portion is less timely.
  • 22. 12) Predictability : a) It is to the degree that is known in advance. b) Determinism : the property is known exactly in advance. c) Maximum Entropy : Nothing at all is known in advance about the property. 13) Predictability of Timeliness Optimality : a) It’s the performance of the system of whole. ie.meet all deadlines , minimize the number of missed deadlines. b) The predictability of collective timeliness optimality, rather than predictability of each individual threads completion with respect to its own time constraint.
  • 23. 14) Hard Real Time : a) Case where for schedulable entities some time constraints are hard deadlines. b)Timeliness component of scheduling criterion is always meet all hard deadlines. c)For non-schedulable entities some upper bounds are hard, system has designed & implemented so that all hard upper bounds are always satisfied. 15) Soft Real Time : a) Time constraints are soft such as classical lateness function. b) Any scheduling criteria may be used such as minimizing the no. of missed deadlines.
  • 24. Features Of RTOS 1) Multitasking : There are two ways to achieve Multitasking to share CPU time between two or more tasks. A) Pre-emptive Multitasking : a) An external tick interrupt ,interrupts task at an indeterminate point and passes control to kernel program. b) The kernel will save the state of the interrupted task ad then determine which task it should run next. c) The Kernel restore the state of task and pass control of the CPU to that task. d) Task will continue to run until it is interrupted by next external tick interrupt or voluntarily gives up allotted time slice.
  • 26. B) Non-preemptive Multitasking : a) In Non-preemptive multitasking a task is designed to relinquish control of the CPU to the kernel at regular intervals. b) To the implementation of non-preemptive multitasking is the use of a message queue. c) The kernal manages the message queue which is essentially a queue of message numbers & small amount of data. .
  • 28. 2) Process thread can be prioritized : a) A OS schedules threads/or processes based on their relative priorities. b) Processes are forced to relinquish the processor if a higher priority process becomes ready to run. c) Highest priority unable process will be executing on the system at all times 3) Sufficient number of interrupt levels : a) Advantage of interrupt threads is that they permit the OS to be more responsive to the devices it services. b) ISR typically disable other interrupts while executing using interrupt threads permits interrupts to be responded to at more regular intervals
  • 29. Task Management The main function of tasks within a Real-Time Multitasking Executive is the time-critical processing of external or internal events  Task States  Task Switching
  • 31. Process Scheduling Types  Types of Scheduling Policies  Deadline driven – ideal but not available  Cooperative – relies on current process to give up the CPU  Pre-emptive priority scheduling – higher priority tasks may interrupt lower priority tasks  Static – priorities are set before the system begins execution  Dynamic – priorities can be redefined at run time
  • 32. Process Scheduling Types  Many priorities levels in a RTOS is better to have for complex systems with many threads At least 128 levels A different priority level can be set for each task or thread  Round Robin – give each task an equal share of the processor  Implemented when all tasks or threads have the same priority level  May be implemented within a priority range
  • 33. Real time Applications Used Today: 1) Military : For gathering data from a wide variety of real time sensors (satellite, air,surface,subsurface) and delivering it to analysis capabilities and weapon systems 2) Telecommunications: Real Time access to information from vast array of devices including computers,set top boxes,PDAs,Pagers and wireless phones. 3) Aviation: Improved real time capabilities will increase safety and efficiency by identifying dangerous situations and enabling flexible routing to relieve congestion and prevent collisions.
  • 34. 4)Automotive : Commuters will receive real time data , GPS location information and operational data via ground stations and satellites , thus routing the driver around accidents , roadwork or traffic congestion in real time. 5) Scientific : For monitoring and instrument control.eg.seismic information is increasingly distributed on a vast scale ,enabling scientist to verify even small scale nuclear detonations as well as helping smaller remote countries prepare for weather and seismic disasters.
  • 35. For more details  www.pantechsolutions.net  http://www.slideshare.net/pantechsolutions  http://www.scribd.net/pantechsolutions  http://www.youtube.net/pantechsolutions
  • 36. © 2008 Pantech Solutions™ | All rights reserved | www.panetchsolutions.net
  • 37. © 2008 Pantech Solutions™ | All rights reserved

Editor's Notes

  1. 1) Military : for gathering data from a wide variety of real time sensors (satellite,air,surface,subsurface) and delivering it to analysis capabilities and weapon systems 2) Telecommunications: Real Time access to information from vast array of devices including computers,set top boxes,PDAs,Pagers and wireless phones. 3) Aviation: Improved real time capabilities will increase safety and efficiency by identifying dangerous situations and enabling flexible routing to relieve congestion and prevent collisions.
  2. 4)Automotive : Commuters will receive real time data , GPS location information and operational data via ground stations and satellites , thus routing the driver around accidents , roadwork or traffic congestion in real time. 5) Scientific : For monitoring and instrument control.eg.seismic information is increasingly distributed on a vast scale ,enabling scientist to verify even small scale nuclear detonations as well as helping smaller remote countries prepare for weather and seismic disasters.