SlideShare a Scribd company logo
Submitted By Sugapriyan.G II M.C.A REAL TIME OPERATING SYSTEM
Definition- Real Time Operating System A real-time operating system (RTOS) is an  operating system  that guarantees a certain capability within a specified time constraint.  It is a  multitasking   operating system  intended for  real-time  applications. Such applications include  embedded systems  ,industrial  robots , spacecraft, industrial control and scientific research equipment.
An RTOS must respond in a timely manner to changes, but that does not necessarily mean that an RTOS can handle a large throughput of data.  Sometimes an RTOS will even need to drop data to ensure that it meets its strict deadlines.  An RTOS may be either event-driven or time-sharing.  An  event-driven RTOS  is a system that changes state only in response to an incoming event. A  time-sharing RTOS  is a system that changes state as a function of time
Architecture of Real Time Operating System Two basic designs exist: Event-driven (priority scheduling) designs switch tasks only when an event of higher priority needs service, called pre-emptive priority.  Time-sharing designs switch tasks on a clock interrupt, and on events, called  round robin .  Time-sharing designs switch tasks more often than is strictly needed, but give smoother, more deterministic  multitasking , giving the illusion that a process or user has sole use of a machine.
Scheduling In typical designs, a task has three states:  1) running, 2) ready, 3) blocked. Most tasks are blocked, most of the time. Only one task per CPU is running. In simpler systems, the ready list is usually short, two or three tasks at most.  The real key is designing the scheduler. Usually the data structure of the ready list in the scheduler is designed to minimize the worst-case length of time spent in the scheduler's critical section, during which preemption is inhibited and in some cases, all interrupts are disabled. But, the choice of data structure depends also on the maximum number of tasks that can be on the ready list.
Algorithms Used in RTOS Some commonly used RTOS scheduling algorithms are: Cooperative scheduling  Round-robin scheduling   Preemptive scheduling   Fixed priority pre-emptive scheduling , an implementation of  preemptive time slicing   Fixed-Priority Scheduling with Deferred Preemption  Fixed-Priority Non-preemptive Scheduling  Critical section preemptive scheduling  Static time scheduling
Background  Real-time systems are not necessarily fast (fast is a relative term), however there is a bounded latency on the time required to complete certain tasks.  In general, real-time systems must be able to respond predictably to unpredictable events, meet completion deadlines of particular tasks, and process multiple tasks at once.  There are two flavors of real-time systems, depending on the degree of failure if the system does not meet a deadline.
Description Of Real Time Operating System There are additional fundamental aspects of RTOS design.  One is the ability of a particular process to communicate with another process (formally called interprocess communication or IPC).  This allows separate applications to interact with each other and share the same data.  The concept of IPC introduces another important operating system aspect, preventing a process from changing data while another process is using the data.
Advantages:- Simple implementation Low overhead Very predictable Disadvantages:- Can’t handle sporadic events Everything must operate in lockstep Code must be scheduled manually
ALGORITHM EVALUATION: For the smart usage of CPU out system has to select the correct algorithm. It include the following 2 criteria’s Maximum CPU utilization. Maximum throughput Some of the different methods are Deterministic Modeling Queueing Models Simulations Implementation
Deterministic Modeling: This method takes a particular predetermined workload and defines the performance of each algorithm for that workload. Queueing Models: Each server has a queue of waiting processes. Knowing the arrival rates and service rates for computing CPU utilization,average queue length,average waiting time and so on. The formula n = lamda * W Where,   n = avg queue length   lamda = avg arrival rate for new process in queue   W = avg waiting time in queue   This is called as Little’s formula. Simulations:   It involves programming a model of the computer system.
It has variable representing a clock;  as this variable’s value is increased, the simulator modifies the system state to reflect the activities of the devices, the process and the scheduler. And the data indicating algorithm performance are gathered and printed. Implementation: The only accurate way to evaluate a scheduling algorithm is to code it, put it in the OS and see how it works.
Process Scheduling Models: A process is an abstraction that supports running programs A process is the basic unit of execution in an operating system Different processes may run several instances of the same program At a minimum, process execution requires following resources: Memory to contain the program code and data A set of CPU registers to support execution
Process Life Cycle Processes are always either executing, waiting to execute or waiting for an event to occur
 
References http://en.wikibooks.org/wiki/Embedded_Systems/Real-Time_Operating_Systems www.onesmartclick.com/ rtos / rtos .html   http://searchdatacenter.techtarget.com/sDefinition/0,,sid80_gci213667,00.html
Thank You

More Related Content

Real time os(suga)

  • 1. Submitted By Sugapriyan.G II M.C.A REAL TIME OPERATING SYSTEM
  • 2. Definition- Real Time Operating System A real-time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint. It is a multitasking operating system intended for real-time applications. Such applications include embedded systems ,industrial robots , spacecraft, industrial control and scientific research equipment.
  • 3. An RTOS must respond in a timely manner to changes, but that does not necessarily mean that an RTOS can handle a large throughput of data. Sometimes an RTOS will even need to drop data to ensure that it meets its strict deadlines. An RTOS may be either event-driven or time-sharing. An event-driven RTOS is a system that changes state only in response to an incoming event. A time-sharing RTOS is a system that changes state as a function of time
  • 4. Architecture of Real Time Operating System Two basic designs exist: Event-driven (priority scheduling) designs switch tasks only when an event of higher priority needs service, called pre-emptive priority. Time-sharing designs switch tasks on a clock interrupt, and on events, called round robin . Time-sharing designs switch tasks more often than is strictly needed, but give smoother, more deterministic multitasking , giving the illusion that a process or user has sole use of a machine.
  • 5. Scheduling In typical designs, a task has three states: 1) running, 2) ready, 3) blocked. Most tasks are blocked, most of the time. Only one task per CPU is running. In simpler systems, the ready list is usually short, two or three tasks at most. The real key is designing the scheduler. Usually the data structure of the ready list in the scheduler is designed to minimize the worst-case length of time spent in the scheduler's critical section, during which preemption is inhibited and in some cases, all interrupts are disabled. But, the choice of data structure depends also on the maximum number of tasks that can be on the ready list.
  • 6. Algorithms Used in RTOS Some commonly used RTOS scheduling algorithms are: Cooperative scheduling Round-robin scheduling Preemptive scheduling Fixed priority pre-emptive scheduling , an implementation of preemptive time slicing Fixed-Priority Scheduling with Deferred Preemption Fixed-Priority Non-preemptive Scheduling Critical section preemptive scheduling Static time scheduling
  • 7. Background Real-time systems are not necessarily fast (fast is a relative term), however there is a bounded latency on the time required to complete certain tasks. In general, real-time systems must be able to respond predictably to unpredictable events, meet completion deadlines of particular tasks, and process multiple tasks at once. There are two flavors of real-time systems, depending on the degree of failure if the system does not meet a deadline.
  • 8. Description Of Real Time Operating System There are additional fundamental aspects of RTOS design. One is the ability of a particular process to communicate with another process (formally called interprocess communication or IPC). This allows separate applications to interact with each other and share the same data. The concept of IPC introduces another important operating system aspect, preventing a process from changing data while another process is using the data.
  • 9. Advantages:- Simple implementation Low overhead Very predictable Disadvantages:- Can’t handle sporadic events Everything must operate in lockstep Code must be scheduled manually
  • 10. ALGORITHM EVALUATION: For the smart usage of CPU out system has to select the correct algorithm. It include the following 2 criteria’s Maximum CPU utilization. Maximum throughput Some of the different methods are Deterministic Modeling Queueing Models Simulations Implementation
  • 11. Deterministic Modeling: This method takes a particular predetermined workload and defines the performance of each algorithm for that workload. Queueing Models: Each server has a queue of waiting processes. Knowing the arrival rates and service rates for computing CPU utilization,average queue length,average waiting time and so on. The formula n = lamda * W Where, n = avg queue length lamda = avg arrival rate for new process in queue W = avg waiting time in queue This is called as Little’s formula. Simulations: It involves programming a model of the computer system.
  • 12. It has variable representing a clock; as this variable’s value is increased, the simulator modifies the system state to reflect the activities of the devices, the process and the scheduler. And the data indicating algorithm performance are gathered and printed. Implementation: The only accurate way to evaluate a scheduling algorithm is to code it, put it in the OS and see how it works.
  • 13. Process Scheduling Models: A process is an abstraction that supports running programs A process is the basic unit of execution in an operating system Different processes may run several instances of the same program At a minimum, process execution requires following resources: Memory to contain the program code and data A set of CPU registers to support execution
  • 14. Process Life Cycle Processes are always either executing, waiting to execute or waiting for an event to occur
  • 15.  
  • 16. References http://en.wikibooks.org/wiki/Embedded_Systems/Real-Time_Operating_Systems www.onesmartclick.com/ rtos / rtos .html http://searchdatacenter.techtarget.com/sDefinition/0,,sid80_gci213667,00.html