Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.

Similar presentations


Presentation on theme: "Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating."— Presentation transcript:

1 Unit - I Real Time Operating System

2 Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating Systems

3 Operating System Concepts : Component of an Operating System : Processor Management Memory Management Primary Secondary Cache Virtual File Management I/O Management Multiprogramming Protection and Security Network Management

4 Kernel Architecture (UNIX) : Library hardware File Subsystem character block Hardware control Buffer Cache system call interface Device driver Inter process communication Scheduler Memory Management Process Control Subsystem User program User level kernel level User level kernel level

5 Monolithic Kernel : User Mode Kernel Mode

6 Micro Kernel : User Mode Kernel Mode

7 Hybrid Kernel : User Mode Kernel Mode

8 Types of kernel : Monolithic Kernel One single program that contains all of the code performing kernel operations. Less software involved hence faster execution. Less code generally means less bugs. Single error need recompilation of whole kernel functionalities. Microkernel Only core kernel functionalities are together all other functions of are written in modules. Maintenance is generally easier. Rapid development time as new addition doesn’t need to disrupt kernel.

9 Operating System Concepts : Process States New Ready Running Blocked Exit Process Control Block PID State Register status Scheduling information Pointers to memory I/O resource information Multitasking CPU and IO Bound Tasks Scheduling Algorithms

10 Operating System Concepts : Threads Common address space Individual stack and registers Interrupt Handling Save current context Determine identity of interrupt Switch to new context Start execution of interrupt Inter-Process Communication Shared Memory Message Passing Semaphores Message Pipes Transfer Protocol Blocking Sender, Blocking Receiver Non-blocking sender, Blocking Receiver Remote Procedure Call Interrupt Latency

11 Operating System Concepts : Critical Section Race Condition Producer Consumer Reader Writer Problems Deadlock Necessary conditions Prevention Avoidance Detect and Recover

12 Real-Time Tasks Time constrained tasks Useful only if output generated within deadline Terms: Release/Ready Time Scheduling Time Completion Time Burst/Run Time Deadline Tardiness: When completion time > deadline Completion time - Deadline Laxity: Time the task can wait without missing deadline Deadline – Completion time

13 Types of Real-Time Tasks : Hard Real-time task Must condition C <= D Air traffic control Vehicle subsystems control Nuclear power plant control Soft Real-time Task If C > D then penalty is associated with delay in results. Multimedia transmission and reception Networking, telecom/cellular networks Web sites and services Computer games Firm Real Task

14 Real-Time Systems : Periodic Task Executes regularly after fixed intervals Aperiodic Task Jobs arriving at irregular intervals Soft deadlines have time constraints either for deadlines or start Sporadic Task Aperiodic tasks with hard deadlines Pre-emptible Non-preemptible Tasks

15 Real-Time Operating Systems : Simpler embedded systems use superloop-based approach. Complex embedded systems require dedicated OS Smart phones Abstraction layer between hardware and application layer. Task management Inter Task Communication and Synchronization Dynamic Memory Allocation Device I/O supervisor Timers

16 Real-Time Scheduling : Off-Line Scheduling / Pre-Run Time Scheduling : Total tasks, Deadlines, Release time, Execution time all must be known Inflexible Optimal for systems where jobs are fixed. Online Scheduling : Static Priority Preemptive Non-preemptive Dynamic Priority Priority can be changed at runtime Planning Based Best Effort

17 Classes of Real-Time Scheduling Algorithms Static Priority Non- Preemptive Preemptive Dynamic planning-based Feasibility determined at run time Guarantees execution of accepted tasks Dynamic best effort No feasibility analysis is performed. All hard real time tasks’ deadlines are met. Aborts any started process whose deadline is missed.

18 Rate Monotonic Scheduling: Assigns priorities to tasks on the basis of their time periods Highest-priority task is the one with the shortest period Sufficient but not necessary condition Static Priority with preemption C i / P i ≤ n(2 1/n - 1) Task SizeBound 11 20.828 30.780 40.757

19 Earliest Deadline First : Dynamic Priority Allocation Priority changes at runtime Highest priority to task with nearest deadline Can be used for tasks where RM fails. Overhead for implementation.

20 Two Tasks

21 Periodic Scheduling

22 Problem: Static Priority TasksPriorityPeriodCPU Burst T1172 T22174 T33248 Draw the Gantt-chart for scheduling these tasks. Assume the all jobs have same release time Schedule the process to meet their deadline Without Pre-emption With Pre-emption Note: Deadline of task is the time when its next burst arrive

23 Example CPU utilization for the set of task: LHS : 2/7 + 4/17 + 8/24 = 0.812 RHS : = 3 X (2 1/3 -1)= 3 x.26 =.78 LHS> RHS :RM does not get satisfied But the task still might get schedulable by RM technique TasksPeriod (T)CPU Burst(C) T172 T2174 T3248

24 Problem 1 TasksPeriod (P or T)CPU Burst(C) T1154 T2122 T3205 Find out whether above problem is solvable using Rate Monotonic Scheduling.

25 Problem 2 TasksPeriodCPU BurstRelease Time T1310 T21031 T31543 Find out whether above problem is solvable using Rate Monotonic Scheduling.

26 Example TasksPeriodCPU Bursts T141 T262 T394 Solve using Rate Monotonic EDF

27 Example TasksPeriodCPU Bursts T1105 T2122 T3153 T4246 Is it possible to solve above set of tasks using EDF

28 Qualities of good RTOS Performance: Must be capable of meeting the requirements of application Reliability: System should not fail. “Mean Time between Failure” should be very high. Compactness: Size of RTOS should be as small as possible. (Ported to embedded systems mostly with limited memory) Scalability: Modularity in OS design. Can be scaled up or down.


Download ppt "Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating."

Similar presentations


Ads by Google