Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux

Size: px
Start display at page:

Download "Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux"

Transcription

1 Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux Daniel Svärd Freddie Åström November 19, 2006 Abstract This report tries to give an overview of the different scheduling algorithms that are used in RTLinux and QNX Neutrino. Both systems are hard realtime operating systems widely used in industrial applications. Algorithms are described, evaluated and then compared between the different systems. Information contained in this document can be considered as a basis for further investigation and development of scheduling algorithms based on these systems. QNX has more default choises for scheduling than RTLinux has. Its sporadic scheduling algorithm is very effective in systems with mixed periodic and aperiodic tasks. RTLinux on the other hand has access to more options with its modular organization. 1 Introduction The two real-time operating systems QNX and RTLinux are common operating systems used in industrial applications where hard deadlines are required. Meeting hard deadlines requires effective systems where scheduling is a crucial part. In this report we will investigate how these two operating systems have solved this problem and how they differ. The first part of the document identifies the problems of scheduling real-time tasks in an operating system; the second part describes how these problems are solved in QNX and RTLinux respectively; and the third part of the document discusses the differences between the two systems. 1

2 2 Scheduling Real-time operating systems differ very much from general purpose operating systems in terms of scheduling. Realtime operating systems run tasks that have fixed deadlines. These deadlines are important to be held - especially in hard real-time systems - since failing to do so might have catastrophic consequences. To guarantee that a task is run before its deadline, the system needs to service a task as soon as it requests the CPU. To accomplish this, the real-time system needs to have a priority-based scheduler. This means that all tasks are given priorities and based on those, the scheduler decides which task to run next. The scheduler also needs to be preemptive, meaning that it should be able to stop a task from running before it is finished and switch to another task. This strategy is used when a task with higher priority than the currently running task becomes availible to run. Since it has a higher priority it needs to be given the CPU, regardless of whether the current task is finished or not [1]. The preemptive strategy creates some problems with synchronization when shared resources are used. Consider three tasks with low, medium and high priorities respectively. The low task locks on a mutex for a shared resource. The high task then blocks on the mutex. The medium task will now preempt the low task preventing it from making progress and releasing the mutex. This will prevent the high task from running and it will probably miss its deadline. Methods for solving this problem is, however, out of the scope of this report, and will not be discussed further. Priority-based preemptive scheduling algorithms only ensures soft real-time functionality. To provide hard real-time functionality, the system must also guarantee that deadlines are met [1]. 3 QNX QNX Neutrino is designed to be a hard real-time operating system. An efficient task-management system is based on the idea that every part of the microkernel should be divided into small servers that can be controlled separately by a system operator. Different hard-real time systems have different models for structuring the kernel. QNX is mainly used in industrial applications such as telecommunications and medical instruments that need high reliability [2]. A convention for QNX is that a process can hold one or several tasks. Consider it as a shopping-bag: the bag (process) contains the groceries (threads or tasks). 3.1 The Microkernel In QNX Neutrino s case effort has mainly been focused on keeping the kernel structure as small as possible, non-critical system modules should be easy to replace. 7 The microkernel only includes CPU scheduling, interprocess communication, interrupt redirection and timers. Other crucial parts of the system management such as memory management and filesys- 2

3 tems are run as user processes in separate modules [3]. 3.2 Global Task Priority When the state of execution of a thread change, it is possible for the scheduler to make scheduling decisions. Context switch will occur when the current executing process is either blocked, yielded or pre-empted [1]. All threads use one of 64 priority levels where 63 is the highest and 0 is idle. For every level of priority there can be multiple threads waiting to be executed, note that it is only the first thread in the highest priority level that can be set to the Run state. After this thread has finished its execution or is pre-empted by the scheduler it is possible for other threads to receive execution time. Priority level can be decreased or increased by the scheduler to ensure that a thread never will starve. In this process the thread that just had its priority modified will be appended to the end of the new priority level queue [3]. It is only the kernel that can decide which priority level a thread should be given. This can happen in two ways. Either the kernel itself decides which priority a given thread should be given or a thread with higher priority level can request the kernel to give another priority level to a specific thread [3]. 3.3 Scheduling Algorithms There are mainly three different scheduling algorithms in QNX Neutrino, these are FIFO (First In First Out), RR (Round Robin) and Sporadic scheduling which are POSIX scheduling policies [4]. The first two algorithms are well known and will only be considered briefly. However the Sporadic scheduling algorithm will be further investigated FIFO and RR First-In First-Out also known as FCFS (First-Come First-Serverd) is an ordinary linear queue which will schedule the first task to enter the queue as readyto-run. Computation of a new task will start when the currently running task is either pre-empted by a task with higher priority or if it relinquish the cpu. Round Robin or RR is a FIFO with a few additional conditions. In QNX Neutrino s implementation the algorithm will schedule a new thread as ready-to-run when the current running thread either have finished its computations, is preempted or has consumed its time slice. Here a time slice has a length of 4 times the clock period Sporadic Scheduling This algorithm is mainly used when the system is known to have stochastic computation tasks or if it is suggested that the system will be affected by hardware issues causing irregular computation times for the same task [4]. The Sporadic scheduling algorithm gives the system the ability to handle aperiodic tasks [4]. The sporadic scheduler is a scheduler that uses predefined parameters for execution period, replenishment time, initial 3

4 time budget for a thread and priority for thread execution order. There is also a maximum amount of replenishments [3]. Execution time - Time that the thread has been holding the CPU. Replenishment period (T) - Time left for another thread to hold the CPU after the current thread is finished execution within the time budget (time period) that was given to the thread. Time budget (C) - Time given to a thread for execution. If thread is not finished within this period of time it is pre-empted, providing that there is another thread waiting to be run. Priority - Each thread is given a priority in the foreground, normal priority, and in the background the thread can be given low priority. Note that the priority of a given thread can oscillate between these different levels of priority. Time of replenishments - A result of many replenishments is that many context switches will occur which is time consuming. Therfore, the number of times a thread is replenished should be kept at a minimum. The times of replenishments is bounded by the system [3]. Figure 1. Example of sporadic scheduling with period T = 40 ms [3]. When a thread or task is given CPU-time its priority-level drops to lowpriority in the foreground. This ensures that if there is another thread with higher priority than the current one being executed it can pre-empt the current one and take hold of the CPU. The current thread can also be blocked. If this is the case then the thread that was pre-empted or blocked will have its previous priority reinstated. At the end of the replenishment period the thread will be given a new chance to take hold of the CPU. 3.4 Comparison of Scheduling Algorithms FIFO has the obvious disadvantage that if a task with a large computation time is scheduled to run it will probably hold the CPU to long. If this happens it will most likely cause other tasks behind it waiting to be run to not be able to meet their deadline. On the other hand FIFO is a sufficient algorithm for just a few tasks. Round Robin on the other hand is an extension of FIFO with a few conditions. If the time slice in RR is large enough or if the number of threads that is served is small enough RR will behave as the FIFO algorithm. Assume 4

5 we set the time slice for replenishment small enough it can cause the algorithm to make too many context switches causing the CPU to only be busy moving data around which is not desirable. Therefore the replenishment time must be set to adopt to the current applications running on the system. There is also a possibility for threads with higher priorities to preempt the currently running thread, which is not possible in FIFO. Sporadic Scheduling is similar to RR in many aspects but two of the major differences are the priority hierarchy and the way it deals with a large number of replenishments. It is not hard too realise that RR can cause a large number of replenishments causing a large system overhead, the Sporadic scheduling algorithm has an built in mechanism that ensures that the number of replenishment don t exceed a bounded system constant. As the number of replenishments is growing the algorithm automatically gives a larger time budget to the thread giving is a chance to finish its computation. The Sporadic algorithm is preferably used when the number of tasks that are processed is large. 3.5 Latency Latency time is very difficult to determine since it is strongly dependent on which architecture the system is run on. 4 RTLinux RTLinux is a soloution for running realtime tasks together with Linux. It is maintained by Victor Yodaiken at Finite State Machine Labs. It is not a try to implement real-time capabilities to the general purpose operating system Linux; since this would be very difficult considering that real-time system requirements often contradict requirements for general purpose systems [5]. Instead, RTLinux has its own core that is decoupled from the Linux kernel. The RTLinux core has the control over the hardware interrupts and provides an interrupt emulation layer for Linux. When Linux tries to disable the interrupts, RTLinux records it and returns to Linux, thus ensuring that Linux cannot actually disable interrupts. The Linux kernel is run as the idle task of the system, i.e., it runs when there is no other task that needs to use the CPU. This means that Linux cannot add latency to the system and enables the system to service real-time tasks, while also providing the system with all the general purpose operating system capabilities of Linux [6]. RTLinux follows the POSIX standard. This standard is not as comprehensive as the original POSIX standard, that contains many operations that would be impossible to implement in a system in need of a small footprint. The real-time tasks in RTLinux are therefore implemented as POSIX threads [7]. 4.1 Scheduling Algorithms RTLinux is a modular system, allowing components of it to be replaced by others. For example, the scheduler that is distributed with the system is a module. 5

6 If it does not suit the requirements for an application, there are other scheduling modules that might. RTLinux comes with a static priority scheduling module, that always runs the thread with the highest priority. There are also other contributed modules that support different scheduling algorithms, such as the earliest deadline first [6]. Although the earliest deadline first algorithm is not an official part of the system, it deserves to be mentioned here Priority Scheduling The default scheduler for RTLinux is a static priority scheduler. It ensures that the thread with the highest priority is run at all times. If a higher priority thread becomes runnable, the scheduler will preempt the currently running thread in favor for the higher priority one. This is known in the POSIX standard as FIFO scheduling. If two threads share the same priority 1, it is undefined which of them will take preference [9]. The scheduler contains a list of all the runnable threads in the system. Each time a new thread is about to be scheduled, the scheduler runs through the list and compares the threads priority values. The one with the highest priority in the list is then switched to [10]. The priority of a thread is set during its initialization through the thread s scheduling parameters structure. It is also possible to change the priority during the lifetime of the thread. This is useful for various synchronization protocols that work with priority inversion [9]. A drawback of this policy is that the timer clock needs to be reprogrammed at every timer interrupt. Depending on the underlaying architecture, this can be relatively time-consuming. Therefore, the scheduler also provides the possibility to make a thread periodic, in which case a thread will be scheduled to run at set intervals [6]. A periodic thread has to have its priority set in the same way as a nonperiodic thread. To set its period, it also has to call a function with arguments indicating the period as well as the first time it is to be executed [9] Earliest Deadline First The earliest deadline first module is not a complete replacement of the static priority module that comes with RTLinux. Instead it is an expansion of that module to support both the standard static priority algorithm and the dynamic priority earliest deadline first algorithm. Using the earliest deadline first algorithm, the scheduler will first go through the list of runnable threads searching for the thread with the highest priority level. If two threads share the same priority level, the thread with the closest deadline will be scheduled [11]. The only thing that the module changes in the scheduler code from the default module, is the comparison of only the priorites to the comparison of both priorities and deadlines. This is just a few lines of code, and the overhead is minimal. 1 As of RTLinux Version 3.1 there are one million priority levels availible [8]. 6

7 In addition, it adds a couple of functions for setting and getting deadlines to the scheduling API. These functions are used during the initialization of the thread at the same time as the priority is set. They can also be used later in the thread execution to change the deadline of the thread. There is nothing that says that the deadline of a thread has to be fixed. Because the earliest deadline first is a dynamic priority algorithm, the normal shared resource access protocol used by RTLinux cannot be used. The module thereby also includes another protocol called the Stack Resource Policy [11]. The description of that synchronization protocol is, however, out of the scope of this document. 4.2 Latency It is difficult to say much about task latency for a scheduler since it is very dependent on the underlaying architecture. For example, according to the RTLinuxPro Performance Datasheet [12] the worst case latency can differ from 13 to 104 microseconds on the x86 architecture, depending on the processor, motherboard and if the system uses Symmetrical Multi Processing (SMP) or not. 5 Discussion Developers from both RTLinux and QNX has given a great deal of thought to how to structure the kernel. Both systems have very small and lightwight kernels, only the most basic functions are implemented such as IPC and scheduling. RTlinux has one main scheduling algorithm implemented, FIFO, by default. Compare this to QX which has three by default. This is not necessarly a good thing, it makes the kernel larger, but on the other hand, QNX has a larger number of options for scheduling. Another big difference between the systems is that RTLinux treat all small separate modules for computation as different tasks which gives a very large number of priority levels. QNX has a different view of priority handling for scheduling. Their soloution means that there are processes and then tasks within each process. In other words the QNX developers has implemeded something similar to multilevel-queueing where each global priority has a sub-level containing a list of tasks with the same priority, which thereafter are scheduled accordingly. The obvious, and most interesting, is that RTLinux and QNX both have the FIFO scheduler implemented but using the algorithm very differently. RTLinux use it to schedlue tasks for the whole system while QNX only use it for a small number of tasks within each priority level at a global perspective. Remeber that both systems are under development and ecpecially RTLinux is very young considering that the global queue with priorities have about one million levels and for each time the system will find the task with the highest priority RTLinux will have to search throu the whole list and make one comparison between the current task with highest priority with the next in the list. This method of search 7

8 algorithm holds the CPU, in the worst case, for O(n) long time. As for dynamic priority algorithms, RTLinux provides the Earliest Deadline First (EDF) algorithm and QNX the Sporadic Scheduling algorithm. These two are very different in the way they work, but they both are used in situations when task run times are not fixed. The sporadic scheduling ensures that hard deadlines of periodic tasks are not missed because of aperiodic tasks. The sporadic scheduler makes this feature possible beacause of the replenishment method that EDF lacks. Consider a system with a missconfigured number of replinshement times and the consequences of it. If the amount of replenishments are too low it will cause the system to give low-priority threads with long execution times hold of the CPU too fast and too long time, causing threads with higher priority to not be able to be executed within their deadline, this is one example of a missconfigured system. An important advantage of the EDF is that it is theoretically optimal. That means that it is able to schedule its tasks to meet their deadlines while keeping the CPU utilization at 100%. The RTLinux implementation of the EDF algorithm is not entirely dynamic. It does not actually change the priorities of the tasks with regards to their deadline requirements. Instead, it only uses the deadline as a priority factor when two or more processes share the same priority level. However, if the system designer keeps all the tasks at the same priority level, the desired effect is attainable. Note that real-time operating systems very much depend on the configuration of the system conserning the environment it is supposed to operate within. A direct cause of the environment one must consider is the number of applications running concurrently and the amount of computations needed for every task. References [1] A. Silberschatz, G. Gagne, and P. B. Galvin, Operating System Concepts. John Wiley & Sons, Inc., seventh ed., [2] C. L. Wang, B. Yao, Y. Yang, and Z. Zhu, A Survey of Embedded Operating System. [3] QNX, Development Documentation. QNX Software Systems, docs/momentics621 docs/neutrino/ sys arch/kernel.html, [4] QNX, Maximizing Performance with SMP: Design Application to Run on Multiple, Tightly Coupled Processors. QNX Software Systems, [5] FSMLabs, Real-Time Programming in RTCore. Finite State Machine Labs Inc., August [6] V. Yodaiken, The RTLinux Manifesto. New Mexico Institute of Technology, November [7] V. Yodaiken, FSMLabs Lean POSIX for RTLinux. Finite State Machine Labs Inc.,

9 [8] M. Barbanov and V. Yodaiken, rtl sched.h line: 194, in RTLinux Version 3.1 Source Code. Finite State Machine Labs Inc., [9] M. Barbanov, Getting Started with RTLinux. Finite State Machine Labs Inc., [10] M. Barbanov and V. Yodaiken, rtl sched.c line: , in RTLinux Version 3.1 Source Code. Finite State Machine Labs Inc., [11] P. Balbastre and I. Ripoll, Integrated Dynamic Priority Scheduler for RTLinux. Universidad Politécnica de Valencia, [12] FSMLabs, RTLinuxPro Performance Datasheet. Finite State Machine Labs Inc.,

Comparison of scheduling in RTLinux and QNX. Andreas Lindqvist, Tommy Persson,

Comparison of scheduling in RTLinux and QNX. Andreas Lindqvist, Tommy Persson, Comparison of scheduling in RTLinux and QNX Andreas Lindqvist, andli299@student.liu.se Tommy Persson, tompe015@student.liu.se 19 November 2006 Abstract The purpose of this report was to learn more about

More information

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view Authors and Affiliation Oskar Hermansson and Stefan Holmer studying the third

More information

Comparison of scheduling in RTLinux and RT-Mach Fredrik Löfgren frelo305 Dan Persson danpe454

Comparison of scheduling in RTLinux and RT-Mach Fredrik Löfgren frelo305 Dan Persson danpe454 Comparison of scheduling in RTLinux and RT-Mach 2006-11-18 Fredrik Löfgren 840803-1915 frelo305 Dan Persson 840912-2515 danpe454 Abstract Real-time systems are getting more common the world these days.

More information

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition, Chapter 19: Real-Time Systems, Silberschatz, Galvin and Gagne 2009 Chapter 19: Real-Time Systems System Characteristics Features of Real-Time Systems Implementing Real-Time Operating Systems Real-Time

More information

Comparison of Real-Time Scheduling in VxWorks and RTLinux

Comparison of Real-Time Scheduling in VxWorks and RTLinux Comparison of Real-Time Scheduling in VxWorks and RTLinux TDDB72: Concurrent Programming, Operating Systems, and Real-Time Operating Systems Jacob Siverskog jacsi169@student.liu.se Marcus Stavström marst177@student.liu.se

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) CPU Scheduling Daniel Mosse (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

More information

Properties of Processes

Properties of Processes CPU Scheduling Properties of Processes CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution: CPU Scheduler Selects from among the processes that

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

LAST LECTURE ROUND-ROBIN 1 PRIORITIES. Performance of round-robin scheduling: Scheduling Algorithms: Slide 3. Slide 1. quantum=1:

LAST LECTURE ROUND-ROBIN 1 PRIORITIES. Performance of round-robin scheduling: Scheduling Algorithms: Slide 3. Slide 1. quantum=1: Slide LAST LETURE Scheduling Algorithms: FIFO Shortest job next Shortest remaining job next Highest Response Rate Next (HRRN) Slide 3 Performance of round-robin scheduling: Average waiting time: not optimal

More information

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3. OVERVIEW Last Week: Scheduling Algorithms Real-time systems Today: But if frequency of high priority task increases temporarily, system may encounter overload: Yet another real-time scheduling algorithm

More information

Multiprocessor and Real-Time Scheduling. Chapter 10

Multiprocessor and Real-Time Scheduling. Chapter 10 Multiprocessor and Real-Time Scheduling Chapter 10 1 Roadmap Multiprocessor Scheduling Real-Time Scheduling Linux Scheduling Unix SVR4 Scheduling Windows Scheduling Classifications of Multiprocessor Systems

More information

Multiprocessor and Real- Time Scheduling. Chapter 10

Multiprocessor and Real- Time Scheduling. Chapter 10 Multiprocessor and Real- Time Scheduling Chapter 10 Classifications of Multiprocessor Loosely coupled multiprocessor each processor has its own memory and I/O channels Functionally specialized processors

More information

Operating system concepts. Task scheduling

Operating system concepts. Task scheduling Operating system concepts Task scheduling Task scheduling (thread scheduling) Target of scheduling are ready tasks ACTIVE TASK BLOCKED TASKS PASSIVE TASKS READY TASKS Active task currently running on processor

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 10 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Chapter 6: CPU Scheduling Basic Concepts

More information

Process- Concept &Process Scheduling OPERATING SYSTEMS

Process- Concept &Process Scheduling OPERATING SYSTEMS OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne PROCESS MANAGEMENT Current day computer systems allow multiple

More information

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College CISC 7310X C05: CPU Scheduling Hui Chen Department of Computer & Information Science CUNY Brooklyn College 3/1/2018 CUNY Brooklyn College 1 Outline Recap & issues CPU Scheduling Concepts Goals and criteria

More information

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9 Implementing Scheduling Algorithms Real-Time and Embedded Systems (M) Lecture 9 Lecture Outline Implementing real time systems Key concepts and constraints System architectures: Cyclic executive Microkernel

More information

Scheduling in the Supermarket

Scheduling in the Supermarket Scheduling in the Supermarket Consider a line of people waiting in front of the checkout in the grocery store. In what order should the cashier process their purchases? Scheduling Criteria CPU utilization

More information

CPU Scheduling: Objectives

CPU Scheduling: Objectives CPU Scheduling: Objectives CPU scheduling, the basis for multiprogrammed operating systems CPU-scheduling algorithms Evaluation criteria for selecting a CPU-scheduling algorithm for a particular system

More information

8: Scheduling. Scheduling. Mark Handley

8: Scheduling. Scheduling. Mark Handley 8: Scheduling Mark Handley Scheduling On a multiprocessing system, more than one process may be available to run. The task of deciding which process to run next is called scheduling, and is performed by

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2019 Lecture 8 Scheduling Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ POSIX: Portable Operating

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Chapter 5: CPU Scheduling

More information

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [CPU SCHEDULING] Shrideep Pallickara Computer Science Colorado State University L14.1 Frequently asked questions from the previous class survey Turnstiles: Queue for threads blocked

More information

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou (  Zhejiang University Operating Systems (Fall/Winter 2018) CPU Scheduling Yajin Zhou (http://yajin.org) Zhejiang University Acknowledgement: some pages are based on the slides from Zhi Wang(fsu). Review Motivation to use threads

More information

NuttX Realtime Programming

NuttX Realtime Programming NuttX RTOS NuttX Realtime Programming Gregory Nutt Overview Interrupts Cooperative Scheduling Tasks Work Queues Realtime Schedulers Real Time == == Deterministic Response Latency Stimulus Response Deadline

More information

CSE 4/521 Introduction to Operating Systems

CSE 4/521 Introduction to Operating Systems CSE 4/521 Introduction to Operating Systems Lecture 9 CPU Scheduling II (Scheduling Algorithms, Thread Scheduling, Real-time CPU Scheduling) Summer 2018 Overview Objective: 1. To describe priority scheduling

More information

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 370: SYSTEM ARCHITECTURE & SOFTWARE [CPU SCHEDULING] Shrideep Pallickara Computer Science Colorado State University OpenMP compiler directives

More information

Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10

Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10 Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10 Kristoffer Eriksson Philip Frising Department of Computer and Information Science Linköping University 1(15) 1. About

More information

Chapter 5: CPU Scheduling. Operating System Concepts Essentials 8 th Edition

Chapter 5: CPU Scheduling. Operating System Concepts Essentials 8 th Edition Chapter 5: CPU Scheduling Silberschatz, Galvin and Gagne 2011 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating

More information

Practice Exercises 305

Practice Exercises 305 Practice Exercises 305 The FCFS algorithm is nonpreemptive; the RR algorithm is preemptive. The SJF and priority algorithms may be either preemptive or nonpreemptive. Multilevel queue algorithms allow

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 9 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 CPU Scheduling: Objectives CPU scheduling,

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 8 Threads and Scheduling Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ How many threads

More information

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!!

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!! OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! Processor Management Memory Management IO Management File Management Multiprogramming Protection and Security Network Management UNDERSTAND!!! IMPLEMENT!!!

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Learning Objectives Scheduling To understand the role of a scheduler in an operating system To understand the scheduling mechanism To understand scheduling strategies such as non-preemptive

More information

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) 1/32 CPU Scheduling The scheduling problem: - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) When do we make decision? 2/32 CPU Scheduling Scheduling decisions may take

More information

SMD149 - Operating Systems

SMD149 - Operating Systems SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program

More information

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-13: RT Linux

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-13: RT Linux REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux Lesson-13: RT Linux 1 1. RT Linux 2 RT Linux For real time tasks and predictable hard real time behaviour, an extension

More information

Operating System Concepts Ch. 5: Scheduling

Operating System Concepts Ch. 5: Scheduling Operating System Concepts Ch. 5: Scheduling Silberschatz, Galvin & Gagne Scheduling In a multi-programmed system, multiple processes may be loaded into memory at the same time. We need a procedure, or

More information

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling Uniprocessor Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Three level scheduling 2 1 Types of Scheduling 3 Long- and Medium-Term Schedulers Long-term scheduler Determines which programs

More information

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems Processes CS 475, Spring 2018 Concurrent & Distributed Systems Review: Abstractions 2 Review: Concurrency & Parallelism 4 different things: T1 T2 T3 T4 Concurrency: (1 processor) Time T1 T2 T3 T4 T1 T1

More information

Chapter 5: CPU Scheduling. Operating System Concepts 9 th Edit9on

Chapter 5: CPU Scheduling. Operating System Concepts 9 th Edit9on Chapter 5: CPU Scheduling Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling 1. Basic Concepts 2. Scheduling Criteria 3. Scheduling Algorithms 4. Thread

More information

Last Class: Processes

Last Class: Processes Last Class: Processes A process is the unit of execution. Processes are represented as Process Control Blocks in the OS PCBs contain process state, scheduling and memory management information, etc A process

More information

An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm

An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm Nirali A. Patel PG Student, Information Technology, L.D. College Of Engineering,Ahmedabad,India ABSTRACT In real-time embedded

More information

3. CPU Scheduling. Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn

3. CPU Scheduling. Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn 3. CPU Scheduling Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn S P O I L E R operating system CPU Scheduling 3 operating system CPU Scheduling 4 Long-short-medium Scheduler

More information

Operating Systems. Scheduling

Operating Systems. Scheduling Operating Systems Scheduling Process States Blocking operation Running Exit Terminated (initiate I/O, down on semaphore, etc.) Waiting Preempted Picked by scheduler Event arrived (I/O complete, semaphore

More information

CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM

CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM Maysoon A. Mohammed 1, 2, Mazlina Abdul Majid 1, Balsam A. Mustafa 1 and Rana Fareed Ghani 3 1 Faculty of Computer System &

More information

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 05 Lecture 18 CPU Scheduling Hello. In this lecture, we

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Scheduler Scheduling Scheduler allocates cpu(s) to threads and processes. This action is known as scheduling. The scheduler is a part of the process manager code that handles scheduling.

More information

Operating Systems. Process scheduling. Thomas Ropars.

Operating Systems. Process scheduling. Thomas Ropars. 1 Operating Systems Process scheduling Thomas Ropars thomas.ropars@univ-grenoble-alpes.fr 2018 References The content of these lectures is inspired by: The lecture notes of Renaud Lachaize. The lecture

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne Histogram of CPU-burst Times 6.2 Silberschatz, Galvin and Gagne Alternating Sequence of CPU And I/O Bursts 6.3 Silberschatz, Galvin and Gagne CPU

More information

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms Round Robin (RR) ACSC 271 Operating Systems Lecture 9: Scheduling Algorithms Each process gets a small unit of CPU time (time quantum), usually 10-100 milliseconds. After this time has elapsed, the process

More information

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM. Program #1 Announcements Is due at 9:00 AM on Thursday Program #0 Re-grade requests are due by Monday at 11:59:59 PM Reading Chapter 6 1 CPU Scheduling Manage CPU to achieve several objectives: maximize

More information

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) CPU Scheduling The scheduling problem: - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) When do we make decision? 1 / 31 CPU Scheduling new admitted interrupt exit terminated

More information

Course Syllabus. Operating Systems

Course Syllabus. Operating Systems Course Syllabus. Introduction - History; Views; Concepts; Structure 2. Process Management - Processes; State + Resources; Threads; Unix implementation of Processes 3. Scheduling Paradigms; Unix; Modeling

More information

Computer Systems Assignment 4: Scheduling and I/O

Computer Systems Assignment 4: Scheduling and I/O Autumn Term 018 Distributed Computing Computer Systems Assignment : Scheduling and I/O Assigned on: October 19, 018 1 Scheduling The following table describes tasks to be scheduled. The table contains

More information

Enriching Enea OSE for Better Predictability Support

Enriching Enea OSE for Better Predictability Support Enriching Enea OSE for Better Predictability Support Master of Science Thesis Naveed Ul Mustafa naveedum@kth.se Stockholm, August 2011 Examiner: Ingo Sander KTH ingo@kth.se Supervisor: Mehrdad Saadatmand

More information

Real-time operating systems and scheduling

Real-time operating systems and scheduling Real-time operating systems and scheduling Problem 21 Consider a real-time operating system (OS) that has a built-in preemptive scheduler. Each task has a unique priority and the lower the priority id,

More information

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria A Predictable RTOS Mantis Cheng Department of Computer Science University of Victoria Outline I. Analysis of Timeliness Requirements II. Analysis of IO Requirements III. Time in Scheduling IV. IO in Scheduling

More information

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System Abstract In this paper, we address the latency issue in RT- XEN virtual machines that are available in Xen 4.5. Despite the advantages of applying virtualization to systems, the default credit scheduler

More information

CSL373: Lecture 6 CPU Scheduling

CSL373: Lecture 6 CPU Scheduling CSL373: Lecture 6 CPU Scheduling First come first served (FCFS or FIFO) Simplest scheduling algorithm cpu cpu 0 0 Run jobs in order that they arrive Disadvantage: wait time depends on arrival order. Unfair

More information

CS3733: Operating Systems

CS3733: Operating Systems CS3733: Operating Systems Topics: Process (CPU) Scheduling (SGG 5.1-5.3, 6.7 and web notes) Instructor: Dr. Dakai Zhu 1 Updates and Q&A Homework-02: late submission allowed until Friday!! Submit on Blackboard

More information

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis Overview Real-time Systems D0003E Lecture 11: Priority inversion Burns/Wellings ch. 13 (except 13.12) Aperiodic tasks Response time analysis Blocking Priority inversion Priority inheritance Priority ceiling

More information

Scheduling. CSC400 - Operating Systems. 7: Scheduling. J. Sumey. one of the main tasks of an OS. the scheduler / dispatcher

Scheduling. CSC400 - Operating Systems. 7: Scheduling. J. Sumey. one of the main tasks of an OS. the scheduler / dispatcher CSC400 - Operating Systems 7: Scheduling J. Sumey Scheduling one of the main tasks of an OS the scheduler / dispatcher concerned with deciding which runnable process/thread should get the CPU next occurs

More information

Unit 3 : Process Management

Unit 3 : Process Management Unit : Process Management Processes are the most widely used units of computation in programming and systems, although object and threads are becoming more prominent in contemporary systems. Process management

More information

by Maria Lima Term Paper for Professor Barrymore Warren Mercy College Division of Mathematics and Computer Information Science

by Maria Lima Term Paper for Professor Barrymore Warren Mercy College Division of Mathematics and Computer Information Science by Maria Lima Term Paper for Professor Barrymore Warren Mercy College Division of Mathematics and Computer Information Science Table of Contents 1. Introduction...1 2. CPU Scheduling Overview...1 3. Processes

More information

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5) Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process

More information

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005 INF060: Introduction to Operating Systems and Data Communication Operating Systems: Processes & CPU Pål Halvorsen /9-005 Overview Processes primitives for creation and termination states context switches

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling COP 4610: Introduction to Operating Systems (Fall 2016) Chapter 5: CPU Scheduling Zhi Wang Florida State University Contents Basic concepts Scheduling criteria Scheduling algorithms Thread scheduling Multiple-processor

More information

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed) Announcements Program #1 Due 2/15 at 5:00 pm Reading Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed) 1 Scheduling criteria Per processor, or system oriented CPU utilization

More information

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter Lecture Topics Today: Advanced Scheduling (Stallings, chapter 10.1-10.4) Next: Deadlock (Stallings, chapter 6.1-6.6) 1 Announcements Exam #2 returned today Self-Study Exercise #10 Project #8 (due 11/16)

More information

CPU Scheduling Algorithms

CPU Scheduling Algorithms CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating Systems Concepts with Java, by Silberschatz, Galvin, and Gagne (2007).

More information

8th Slide Set Operating Systems

8th Slide Set Operating Systems Prof. Dr. Christian Baun 8th Slide Set Operating Systems Frankfurt University of Applied Sciences SS2016 1/56 8th Slide Set Operating Systems Prof. Dr. Christian Baun Frankfurt University of Applied Sciences

More information

Tasks. Task Implementation and management

Tasks. Task Implementation and management Tasks Task Implementation and management Tasks Vocab Absolute time - real world time Relative time - time referenced to some event Interval - any slice of time characterized by start & end times Duration

More information

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition, Chapter 5: CPU Scheduling Operating System Concepts 8 th Edition, Hanbat National Univ. Computer Eng. Dept. Y.J.Kim 2009 Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms

More information

Operating Systems ECE344. Ding Yuan

Operating Systems ECE344. Ding Yuan Operating Systems ECE344 Ding Yuan Announcement & Reminder Midterm exam Will grade them this Friday Will post the solution online before next lecture Will briefly go over the common mistakes next Monday

More information

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important? Learning Outcomes Scheduling Understand the role of the scheduler, and how its behaviour influences the performance of the system. Know the difference between I/O-bound and CPU-bound tasks, and how they

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation

More information

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system Real world exposed programs Programs written to interact with the real world, outside the computer Programs handle input and output of data in pace matching the real world processes Necessitates ability

More information

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory Commercial Real-time Operating Systems An Introduction Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory swamis@iastate.edu Outline Introduction RTOS Issues and functionalities LynxOS

More information

CS 318 Principles of Operating Systems

CS 318 Principles of Operating Systems CS 318 Principles of Operating Systems Fall 2018 Lecture 4: Scheduling Ryan Huang Slides adapted from David Mazières lectures Administrivia Lab 0 Due today Submit in Blackboard Lab 1 released Due in two

More information

Chapter 5: Process Scheduling

Chapter 5: Process Scheduling Chapter 5: Process Scheduling Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time CPU Scheduling Operating Systems

More information

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) CPU Scheduling The scheduling problem: - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) When do we make decision? 1 / 39 CPU Scheduling new admitted interrupt exit terminated

More information

A COMPARATIVE STUDY OF CPU SCHEDULING POLICIES IN OPERATING SYSTEMS

A COMPARATIVE STUDY OF CPU SCHEDULING POLICIES IN OPERATING SYSTEMS VSRD International Journal of Computer Science &Information Technology, Vol. IV Issue VII July 2014 / 119 e-issn : 2231-2471, p-issn : 2319-2224 VSRD International Journals : www.vsrdjournals.com REVIEW

More information

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date: Subject Name: OPERATING SYSTEMS Subject Code: 10EC65 Prepared By: Kala H S and Remya R Department: ECE Date: Unit 7 SCHEDULING TOPICS TO BE COVERED Preliminaries Non-preemptive scheduling policies Preemptive

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 9/9A Fall 0 008-0: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter : Operating Systems, Microkernels,

More information

Operating Systems: Quiz2 December 15, Class: No. Name:

Operating Systems: Quiz2 December 15, Class: No. Name: Operating Systems: Quiz2 December 15, 2006 Class: No. Name: Part I (30%) Multiple Choice Each of the following questions has only one correct answer. Fill the correct one in the blank in front of each

More information

Supplementary Materials on Multilevel Feedback Queue

Supplementary Materials on Multilevel Feedback Queue Supplementary Materials on Multilevel Feedback Queue Review Each job runs for the same amount of time. All jobs arrive at the same time. Once started, each job runs to completion. Performance is more important.

More information

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an

More information

Computer Science 4500 Operating Systems

Computer Science 4500 Operating Systems Computer Science 4500 Operating Systems Module 6 Process Scheduling Methods Updated: September 25, 2014 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 1 In This Module Batch and interactive workloads

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10

Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10 Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10 Lecture Outline Implementing priority scheduling: Tasks, threads and queues Building a priority scheduler Fixed priority scheduling

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various CPU-scheduling algorithms

More information

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS EECS 571 Principles of Real-Time Embedded Systems Lecture Note #10: More on Scheduling and Introduction of Real-Time OS Kang G. Shin EECS Department University of Michigan Mode Changes Changes in mission

More information

CSCE Operating Systems Scheduling. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Scheduling. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Scheduling Qiang Zeng, Ph.D. Fall 2018 Resource Allocation Graph describing the traffic jam CSCE 311 - Operating Systems 2 Conditions for Deadlock Mutual Exclusion Hold-and-Wait

More information

Analysis of the BFS Scheduler in FreeBSD

Analysis of the BFS Scheduler in FreeBSD CS2106R Final Report Analysis of the BFS Scheduler in FreeBSD By Vaarnan Drolia Department of Computer Science School of Computing National University of Singapore 2011/12 CS2106R Final Report Analysis

More information

Scheduling. Multiple levels of scheduling decisions. Classes of Schedulers. Scheduling Goals II: Fairness. Scheduling Goals I: Performance

Scheduling. Multiple levels of scheduling decisions. Classes of Schedulers. Scheduling Goals II: Fairness. Scheduling Goals I: Performance Scheduling CSE 451: Operating Systems Spring 2012 Module 10 Scheduling Ed Lazowska lazowska@cs.washington.edu Allen Center 570 In discussing processes and threads, we talked about context switching an

More information

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far. Midterm Exam Reviews ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far. Particular attentions on the following: System call, system kernel Thread/process, thread vs process

More information