SlideShare a Scribd company logo
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

PPTX
FreeRTOS basics (Real time Operating System)
PPTX
FreeRTOS
PPTX
Rtos concepts
PDF
Introduction to FreeRTOS
 
PPTX
Real Time OS For Embedded Systems
PDF
Unit 4 Real Time Operating System
PPTX
Embedded networking
PPT
RT linux
FreeRTOS basics (Real time Operating System)
FreeRTOS
Rtos concepts
Introduction to FreeRTOS
 
Real Time OS For Embedded Systems
Unit 4 Real Time Operating System
Embedded networking
RT linux

What's hot (20)

PPT
Design of embedded systems
PPT
Real Time Operating system (RTOS) - Embedded systems
PPT
Rtos Concepts
PDF
RTOS - Real Time Operating Systems
PPTX
Chapter 4 Embedded System: Application and Domain Specific
PPTX
Introduction to Embedded Systems
PPTX
Real time Operating System
PDF
Introduction to Software Defined Networking (SDN)
PPTX
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
PDF
ARM CORTEX M3 PPT
PPT
E.s unit 6
DOCX
Embedded System
DOCX
Hardware-Software Codesign
PDF
Introduction to Embedded Architecture
PPTX
WSN network architecture -Sensor Network Scenarios & Transceiver Design Consi...
PPTX
How to choose an RTOS?
PDF
PPT
Real Time Systems & RTOS
PDF
Building Blocks for IoT Devices
PDF
Real Time Systems
Design of embedded systems
Real Time Operating system (RTOS) - Embedded systems
Rtos Concepts
RTOS - Real Time Operating Systems
Chapter 4 Embedded System: Application and Domain Specific
Introduction to Embedded Systems
Real time Operating System
Introduction to Software Defined Networking (SDN)
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
ARM CORTEX M3 PPT
E.s unit 6
Embedded System
Hardware-Software Codesign
Introduction to Embedded Architecture
WSN network architecture -Sensor Network Scenarios & Transceiver Design Consi...
How to choose an RTOS?
Real Time Systems & RTOS
Building Blocks for IoT Devices
Real Time Systems
Ad

Similar to RTOS Basic Concepts (20)

PPT
Os Concepts
PPTX
Entreprenuership notes module 3 notes.pptx
PPT
PPT
PPTX
Rtos by shibu
PPT
21-Classification of Real time system-12-02-2025.ppt
PDF
PDF
rtosbyshibu-131026100746-phpapp01.pdf
PDF
Welcome to International Journal of Engineering Research and Development (IJERD)
PPTX
Embedded os
PPTX
Embtjhofigkjgzyuibchvjkheddejfjhgjhjgkmd system-3.pptx
PPTX
RTOS [Autosaved].pptx
PPTX
Real Time Operating Systems, Dynamic Precision: Exploring the Realm of Real-...
PPTX
REAL TIME OPERATING SYSTEM
PPT
PPT
1230 Rtf Final
PDF
Rtos slides
PPTX
RTOS_Keywords_with basic Definitions.pptx
PPTX
Real Time Operating Systems Basic Definitions
PPTX
Real time operating system which explains scheduling algorithms
Os Concepts
Entreprenuership notes module 3 notes.pptx
Rtos by shibu
21-Classification of Real time system-12-02-2025.ppt
rtosbyshibu-131026100746-phpapp01.pdf
Welcome to International Journal of Engineering Research and Development (IJERD)
Embedded os
Embtjhofigkjgzyuibchvjkheddejfjhgjhjgkmd system-3.pptx
RTOS [Autosaved].pptx
Real Time Operating Systems, Dynamic Precision: Exploring the Realm of Real-...
REAL TIME OPERATING SYSTEM
1230 Rtf Final
Rtos slides
RTOS_Keywords_with basic Definitions.pptx
Real Time Operating Systems Basic Definitions
Real time operating system which explains scheduling algorithms
Ad

More from Pantech ProLabs India Pvt Ltd (20)

PDF
Registration process
PPTX
Choosing the right processor for embedded system design
PPT
Brain Computer Interface
PPTX
Electric Vehicle Design using Matlab
PPTX
Image processing application
PPTX
Internet of Things using Raspberry Pi
PPTX
Internet of Things Using Arduino
PPTX
Brain controlled robot
PPTX
Brain Computer Interface-Webinar
PPTX
Development of Deep Learning Architecture
PPTX
Gate driver design and inductance fabrication
PPTX
Brainsense -Brain computer Interface
PPT
Median filter Implementation using TMS320C6745
PPT
Introduction to Code Composer Studio 4
PPT
Waveform Generation Using TMS320C6745 DSP
PPT
Interfacing UART with tms320C6745
PPT
Switch & LED using TMS320C6745 DSP
PPT
Led blinking using TMS320C6745
PPT
Introduction to tms320c6745 dsp
Registration process
Choosing the right processor for embedded system design
Brain Computer Interface
Electric Vehicle Design using Matlab
Image processing application
Internet of Things using Raspberry Pi
Internet of Things Using Arduino
Brain controlled robot
Brain Computer Interface-Webinar
Development of Deep Learning Architecture
Gate driver design and inductance fabrication
Brainsense -Brain computer Interface
Median filter Implementation using TMS320C6745
Introduction to Code Composer Studio 4
Waveform Generation Using TMS320C6745 DSP
Interfacing UART with tms320C6745
Switch & LED using TMS320C6745 DSP
Led blinking using TMS320C6745
Introduction to tms320c6745 dsp

Recently uploaded (20)

PDF
Business Ethics Teaching Materials for college
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Pre independence Education in Inndia.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Insiders guide to clinical Medicine.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Business Ethics Teaching Materials for college
Supply Chain Operations Speaking Notes -ICLT Program
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
FourierSeries-QuestionsWithAnswers(Part-A).pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Institutional Correction lecture only . . .
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pre independence Education in Inndia.pdf
Classroom Observation Tools for Teachers
Insiders guide to clinical Medicine.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025

RTOS Basic 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

  • #34: 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.
  • #35: 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.