210 likes | 433 Views
OS Scheduling & RTOS. Group no. 2 Presented to : Eng.Ahmed Hassan Sunday, March 04,2012. Scope. Operating system (OS) Examples of Operating system RTOS Soft versus Hard RTOS Operating System Scheduling Types of operating system scheduling Scheduling algorithms.
E N D
OS Scheduling & RTOS Group no.2 Presented to : Eng.Ahmed Hassan Sunday, March 04,2012
Scope • Operating system (OS) • Examples of Operating system • RTOS • Soft versus Hard RTOS • Operating System Scheduling • Types of operating system scheduling • Scheduling algorithms
Operating System • A program that controls the execution of application programs • An interface between applications and hardware
Operating System handles • Memory Addressing & Management • Interrupt & Exception Handling • Process & Task Management • Process Scheduling & Synchronization • File System • Timing
Examples of Operating Systems • RTOS – Real-Time Operating System • Single-user, Single-task: example PalmOS • Single-user, Multi-task: MS Windows and MacOS • Multi-user, Multi-task: UNIX
What is RTOS • A real-time operating system (RTOS) • It is an operating system (OS) intended to serve real-time application requests. • It is part of program (or source code) that was written for manage the CPU usability of microcontroller and it help to improve the efficiency of CPU in managing the tasks or process.
What is RTOS (cont.) • valued more for how quickly it can respond than for the amount of work it can perform in a given period of time. • Real-time operating systems themselves have two varieties, soft real-time systems and hard real-time systems.
Soft vs. Hard RTOS • In a soft real-time system, tasks are completed as fast as possible without having to be completed within a specified timeframe. • In a hard real-time operating system however, not only tasks must be completed within the specified timeframe, but they must also be completed correctly.
Operating System Scheduling • Scheduling is the method by which threads, processes or data flows are given access to system resources.
Operating System Scheduling(cont.) • The need for a scheduling algorithm arises from the requirement for most modern systems to perform • multitasking (execute more than one process at a time) and, • multiplexing(transmit multiple flows simultaneously).
The scheduler is concerned with • Throughput:- number of processes that complete their execution per time unit. • Waiting Time:- equal CPU time to each process. • Turnaround:- total time between submission of a process and its completion. • Response Time:- amount of time it takes from when a request was submitted.
How Scheduling manage task execution • A task, also referred to as a thread, is an independent section of a program complete with its own stack and CPU register space. • Each task is assigned a priority, and is always placed in one of dormant, ready, running, waiting.
How Scheduling manage tasks execution (cont.) • A task is ready when it is available for execution but its priority is less than the current task priority of the system. • Consequently, a task is running when its current priority is met and the CPU starts to execute it. • A task is considered in wait mode when it is waiting for a resource to become available
Types of OS scheduling • Long-term scheduling • Medium-term scheduling • Short-term scheduling
Scheduling Algorithms • These are algorithms used for distributing resources among parties which simultaneously and asynchronously request them.
Scheduling Algorithms(cont.) • First in first out • also known “First Come First served (FCFS) “ • Shortest remaining time or (SJF) • Fixed priority pre-emptive scheduling • Round-robin scheduling • Multilevel queue scheduling