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

Size: px
Start display at page:

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

Transcription

1 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)

2 1. About the authors 1.1. Kristoffer Eriksson Kristoffer Eriksson is a student at Linköping University. He studies Computer Science and Engineering. Kristoffer can be reached via krier843@student.liu.se 1.2. Philip Frising Philip Frising is a student at Linköping University. He studies Computer Science and Engineering. Philip can be reached via phifr311@student.liu.se 2(15)

3 2. Abstract This report is a comparison between the soft real-time scheduling in Solaris 10 and the Linux kernel The report first present the systems and their schedulers, and then tries to compare them. In conclusion the both schedulers are very similar in many ways. The scope of this report is unfortunately not enough to make a realistic choice between them. However the report might still be interesting as an introduction to the internals of the two schedulers. 3(15)

4 Table of Contents 1. About the authors Kristoffer Eriksson Philip Frising Abstract Introduction Linux scheduler Priority levels Run queues Real-time scheduling policies SCHED_FIFO SCHED_RR Preemptive kernel System calls Solaris scheduler Priority levels Global priorities Class specific priorities Priority inversion Dispatch queue Real-time scheduling policies The Real-Time Class Preemptive kernel System calls Comparison of Linux and Solaris Priority levels Scheduling algorithms Real-time scheduling policies Preemptive kernel System calls Conclusion References Books Internet Source code (15)

5 3. Introduction The aim of this report is to compare soft real-time CPU scheduling in Linux version with Solaris version 10. The report will look at priority levels, run queue data structures, scheduling algorithms and policies, preemption and real-time related system calls, in Linux and Solaris A soft real-time system is supposed to make certain computations in a given time. However there is no guarantee that this actually will happen. Soft real-time systems are used in contexts where the realtime constraint need not be absolute. For example a soft real-time system might be used in a live audio-video system where a missed deadline may result in loss of quality but the system can still continue to operate. First soft-real time scheduling in Linux and Solaris is investigated in chapter 4 and 5 respectively. After that Linux and Solaris is compared in chapter 6. The report ends with a conclusion in chapter 7. 5(15)

6 4. Linux scheduler All information in this chapter is based on [Love] unless else stated. The Linux kernel is run on many different systems with handhelds, desktop computers and supercomputers as examples. On embedded systems responsiveness is more important than throughput, while on a supercomputer the situation is vice versa. This fact makes it particular hard to design the scheduler since it's supposed to work well on any type of targeting system. If the Linux scheduler would be improved for embedded systems then it would probably perform worse on a supercomputer. The 2.6 series of the Linux kernel introduced a completely new scheduler called Ο(1) scheduler. The Ο(1) scheduler is designed to work well many kinds of systems including real-time systems. The 2.6 series also introduced better real-time support with kernel preemption and improved synchronisation. Linux makes no difference between processes and thread when it comes to scheduling. Processes and threads are abstracted to tasks. Tasks can be created to share data like threads, to not share any data as processes or something in between. The scheduler schedules tasks and don't care about what type of task it is. The Linux kernel is improved rapidly. This report is based on the version of the Linux kernel. However, most of the report is valid for the whole 2.6 series 4.1. Priority levels Linux uses 140 priority levels that range from zero to 139. The highest priority that a task can have is 0 and the lowest is 139. The first 100 levels are used for real-time tasks, that is from zero to 99. The next 40 levels from 100 to 139 is used for standard tasks. The well known nice values maps on the 40 levels for standard tasks. Linux uses nice values from -20 to 19 as most other UNIX systems. A task with a high nice value say 19 is nicer to other tasks that have lower nice values Run queues Each CPU in a Linux 2.6 system has two priority arrays. At a given time one of the arrays is used to represent the active run queue while the other array represents the expired run queue. Two pointers are used to control which one of the arrays that are used as the active respectively the expired priority array. The priority arrays are data structures that contains three data types: the number of tasks active tasks [unsigned int] a bitmap [array of words to form at least 140 bits] an array of lists containing task [array of 140 lists] The first data structure is quite obvious, it stores the number of active tasks in the priority array. The second structure is much more exciting. The bitmap has one bit for each priority level. If a bit is on then there is a task in the corresponding list queue. The third data structure is an array of lists with runnable tasks. The array has 140 elements and each element maps onto the priority levels. So for example at index 115 there is a list with all tasks that have the priority 115. The scheduler will always choose the task with the highest priority in the active priority array first. That means that the scheduler will try to find the task with the lowest numerical priority value. 6(15)

7 So why is there a bitmap? Wouldn't it be enough to just look at the array of lists? Linux uses the bitmap to make the search for the next runnable task as fast as possible. Finding the first marked bit is a extremely fast operation and is supported by many architectures. Since the number of priority levels is fixed the search for the first bit is performed in constant time. That means that the search time can never exceed a certain level no matter how many tasks there are in the priority array. The best case is of course when the first bit for priority zero is marked and the worst case is when only the bit for priority 139 is marked. When the first marked bit is found the scheduler looks in the corresponding place in the array of lists with runnable tasks. The scheduler then knows the pointer to the list that contains the runnable tasks with the highest priority in the active priority array. The first task in the list is then scheduled for running. When a task has used up its time slice it will normally be inserted into the expired priority array. However real-time tasks and highly interactive tasks will be reinserted into the active priority array. When a task is reinserted in a priority it is added to the end of the list at the given priority level. When all tasks has used up their time slices and the active priority array is empty the active priority array is swapped with the expired array. This is simply done by swapping the pointers to the active and expired arrays. So after this is done the old expired priority array is the new active array and vice versa. The arrays can also be swapped without all tasks having used up their time slices. Tasks that sleeps are not in the priority arrays. Therefore the active priority can get empty without all tasks have used up their time slices. So the priority arrays are swapped when the active array is empty Real-time scheduling policies As already stated the first 100 priority levels are reserved for real-time tasks. These tasks will always be chosen before any other task. In fact the the real-time tasks will also preempt any other task with a lower priority. Linux offers four different scheduling policies. Two of those are for real-time tasks and are called SCHED_FIFO and SCHED_RR. The third policy is called SCHED_NORMAL and is only used for non real-time tasks. There is also a fourth policy called SCHED_BATCH for batch tasks. Let's look into the real-time scheduling policies SCHED_FIFO and SCHED_RR. [sched.h] SCHED_FIFO SCHED_FIFO is the simplest algorithm. For a given list of runnable task it simply starts by scheduling the first task and waits for it to finish or sleep. Then it schedules the second one, waits for it to finish or sleep, and so on. A task has no time slice and will run either until it finishes, until it sleeps, or until it's preempted by task with higher priority. A SCHED_FIFO task will preempt any other task that has a lower priority and will run as long as it wish or until it gets preempted SCHED_RR SCHED_RR is very similar to the SCHED_FIFO algorithm. It simply just uses time slices as well. All runnable tasks on the same priority levels are scheduled as the SCHED_FIFO tasks, but will only run until they have consumed their time slice or until they are preempted by a higher priority task. Tasks at the same priority level are scheduled round-robin. So when all tasks have consumed their time slices they will get new once and start all over if they are runnable. That means that a task with a lower priority can never be run until a SCHED_RR task has either finished or yield. This ensures that real-time tasks will always run before any other tasks. 7(15)

8 The time slices for tasks that is scheduled with the SCHED_RR policy is based on the priority of the task. Higher priority means higher time slice. [sched.c] 4.4. Preemptive kernel Much work during the development of the 2.6-series kernel has been focused on making the Linux kernel preemptive when running in kernel-space. The Linux kernel has as most modern operative systems for long been able to preempt tasks in user-space. It's not possible to preempt the kernel in any time. Some parts of the kernel code has to run in one shot. That is when the kernel is holding some kind of lock. A kernel being preemptive is an important feature for real-time systems. The big advantage with a preemptive kernel is of course less latency. The kernel can preempt a normal task even in kernel mode in favour of a real-time task. So when a real-time task get runnable the scheduler can preempt another task with lower priority that is executing kernel code System calls Linux developers use the shorter name syscall instead of system call. In table 1 all real-time related scheduling syscalls are shown and explained. Syscall Action sched_setscheduler() sched_getscheduler() sched_setparam() sched_getparam() sched_get_priority_max() sched_get_priority_min() sched_rr_get_interval() sched_yield() Table 1: Real-time related scheduling syscalls This syscall sets a tasks scheduling policy. For real-time tasks SCHED_FIFO and SCHED_RR are available. SCHED_NORMAL or SCHED_BATCH is used for any other task. Use this syscall to check a tasks scheduling policy. This syscall is used to set a tasks real-time priority. The possible priority range is zero to 99. Get the real-time priority for a task. These syscalls are used to get the min and max priority for a real-time task. The default min is zero and the default max is 99. However these settings can easily be modified in the schedulers header file. This syscall is used to get the time slice of a task. If the scheduling policy is SCHED_FIFO then the return value will be zero since that represent a infinite long time slice. For all tasks with other policies the return value will be greater than zero. Use this syscall to temporarily yield the CPU. Information sources for syscalls are both [Love] and [sched.h] 8(15)

9 5. Solaris scheduler All information in this chapter is based on [Sun] unless else stated. SunOS 5.10, or Solaris 10 as it s brand name is, is a soft real-time operating system released by the Sun corporation. Most of the then current source code was released in 2005 under an open source licence under the community project opensolaris.org and the source and binaries can be downloaded freely from their site, Sun has also said that future releases of SunOS will be derived from the progress made by opensolaris. This report however will try to focus on the scheduler that is used by the operating system and in particular the real-time support given by that scheduler. SunOS has supported real-time processes since its release and has a fully preemptive core. The scheduler works not on the processes themselves but rather the threads which are contained in LWP:s, light weight processes. From now on when the word process is used associated with the Solaris kernel it refers to a LWP unless otherwise specified Priority levels Global priorities The system has got global priorities ranging from zero to 169 in which certain ranges are allocated for special process types. The SunOS kernel ranges the high level properties to be most critical Hardware interrupts Real-time processes 0 99 Other time-share and system processes The highest priorities are given to hardware interrupts which cannot be controlled by software. The other priorities are given to user processes and the highest are given to real-time processes. As long as there is a real-time process ready to run the other user processes will not be allowed to run, unless some priority inversion is active (see section about priority inversion). The other 100 process levels are given to normal time-sharing and system processes Class specific priorities Apart from the global priorities each process is given by the user not a direct mapping to the global priorities but a class specific value which is then mapped to a global priority. The time-share processes are given values in the range -20 to 20 which correspond to the global priorities zero to 40, with temporary assignments as high as 99. The RT-processes are given priorities ranging from zero to 59 which are mapped to 100 to 159 in the global priorities list. The kernel s class independent code runs the process with the highest global priority on the queue. 9(15)

10 Priority inversion In some situation a high priority process might be forced to wait for a lower priority process in order to continue execution. This situation must be resolved by the scheduler to prevent deadlocks, this is referred to as priority inversion. In the SunOS kernel a process that is blocking another process with higher priority will inherit that process priority while the block is active Dispatch queue The SunOS kernel keeps a dispatch queue for each processor which contains the processes to be dispatched to that processor. When a new process is allocated to a process, from a state of sleep or if it was just created, the process is inserted into the dispatch queue at a point depending on its priority. If a process is placed first in the queue and it has a higher priority than the current running process the current process will be preempted for the new process Real-time scheduling policies The scheduler sorts process into one of six priority classes, which decides with what policy that process, or thread, will be scheduled. The six classes are: the real-time class the system class the interactive class (IA) the fixed-priority class (FX) the fair-share class (FSS) the time-sharing class (TS) However this report will only focus on the real-time class and it s scheduling policies The Real-Time Class The real-time class handles the processes that has been classified as real-time and will use a policy that tries to uphold the constraints usually associated with real-time processes. Each process is scheduled according to a static priority which each process is given at initiation by the user and which it also passes on to any eventual children. The scheduler will always give the runnable real-time process with the highest priority control of the CPU (or a CPU in case of a multi-core system). The real-time scheduler can be set to operate with a FIFO-strategy or a Round-Robin strategy depending on the users needs. The FIFO-strategy lets the process with highest priority run until it s finished or if it yields itself, it will however still preempt the current process if a higher priority becomes runnable. The round-robin strategy uses a process specific time-quantum to decide how long a process can run, and it will run until that time-quantum runs out or if it yields or finishes. But just as in the FIFO-strategy it will still preempt the current process if a higher priority process becomes runnable. The time-quantum is dependent on the priority of the process. The higher priority the smaller time-quantum. 10(15)

11 5.4. Preemptive kernel In order to guarantee response time the Solaris kernel will preempt any process if a higher priority real-time process becomes dispatchable. This means the current process will be immediately switched out through a context switch for the new process. This is a basic feature required to support a realtime system System calls In order to control the processes the user uses a number of system calls to get info and set parameters associated with the scheduler and the processes. priocntl() Syscall sched_setparam() sched_getparam() sched_get_priority_max() sched_get_priority_min() sched_rr_get_interval() sched_yield() Table 2: Real-time related system calls Action The syscall that controls scheduling parameters of processes and classes. Sets the parameters of a given process. Gets the parameters of a given process. Returns the maximum value for the specified policy. Returns the minimum value for the specified policy. Takes a process id and an interval and sets the time-quantum of the specified process to that interval. Forces the running thread to relinquish the processor until the process again becomes scheduled. 11(15)

12 6. Comparison of Linux and Solaris Linux and Solaris are very similar in many ways as they both implement standards that are common to UNIX systems. There are still some slight differences between the systems that will be presented in this chapter Priority levels The main difference in priorities in the two systems is the fact that Solaris considers gives the high priority processes a high numerical priority value while the Linux give tasks with a high priority a low numerical priority value. Linux also allocates 100 priority levels for real-time tasks while Solaris chooses to allocate 60. This means that Linux give the user more power to differentiate between real-time processes than Solaris. However the priority levels is purely a design decision and doesn t really affect the systems performance unless the user has more real-time processes than the OS allocates levels for. Although most of the priority levels can be configured in both the systems Scheduling algorithms Somehow the critical criteria for a real-time system is how fast it responds when a real-time process wants the CPU and therefore it might be interesting to compare the performance of the scheduling algorithms. The Linux scheduler uses a simple and effective algorithm to obtain a O(1) complexity. Unfortunately there isn t very much reliable information available free either on the Internet in it s whole or in through official SunOS channels on the internals of the scheduler algorithm. From what we gathered it uses a priority queue and it presumably runs with the same complexity as the Linux kernel. Given this we can at least say we are certain that both the schedulers are suited for running real-time applications in a useful way. The complexity of a scheduling algorithms doesn't necessarily define how well a scheduler performs in a real-time system. For example if a system has no more than five processes running a O(n) algorithm may be faster than a O(1) since n is small. So, it isn't really the complexity that determines the speed of the scheduler when there is a small number of processes running. However if a system has many processes running which of only few are real-time the complexity of the scheduling algorithm will highly influence the speed of the scheduler. To really compare the scheduling algorithms it would be necessary to perform extensive testing on both system running on the same hardware. Unfortunately that is beyond the scope of this investigation Real-time scheduling policies The scheduling policies in Linux and Solaris are very similar. They both implement the POSIX standard real-time process scheduling policies FIFO and round-robin. However when using the roundrobin policy Linux gives largest time slice to the process with the highest priority while Solaris give the largest time slice to the process with the lowest priority. 12(15)

13 6.4. Preemptive kernel Both Linux and Solaris are preemptable in kernel space. In Linux there is some code that can't be preempted in kernel space. However, this report has not manages to present whether Linux or Solaris is the most preemptable in kernel space System calls Linux and Solaris supports almost the same system calls, again because they implement common standards. This makes it easier to port applications between the two systems. 13(15)

14 7. Conclusion In conclusion the both systems are very similar and features the same functionality when it comes to scheduling of real-time processes. So trying to choose between them based on the results of this report is difficult and we would recommend that one would investigate other aspects of the two systems before making a decision or testing the schedulers in real life. 14(15)

15 8. References 8.1. Books [Love] Love, Robert (2005). Linux Kernel Development. Second edition. Indianapolis, Indiana, USA: Novell press Internet [Sun] Programming Interfaces Guide [www] < Retrieved 16 th November Source code [sched.h] linux /include/linux/sched.h. [sched.c] linux /kernel/sched.c 15(15)

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

Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling

Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling outline Definition the Unix SVR4 Definition the OpenSolaris Definition the Illumos Scheduling review Unix SVR4 Scheduling SVR4 priority

More information

High level scheduling: Medium level scheduling: Low level scheduling. Scheduling 0 : Levels

High level scheduling: Medium level scheduling: Low level scheduling. Scheduling 0 : Levels Scheduling 0 : Levels High level scheduling: Deciding whether another process can run is process table full? user process limit reached? load to swap space or memory? Medium level scheduling: Balancing

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

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

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke CSCI-GA.2250-001 Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke frankeh@cs.nyu.edu Processes Vs Threads The unit of dispatching is referred to as a thread or lightweight

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

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

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

SHORT REFRESHER ON SCHEDULING. What is scheduler?

SHORT REFRESHER ON SCHEDULING. What is scheduler? SHORT REFRESHER ON SCHEDULING What is scheduler? Overview of Processes and Threads Programs and Processes Threads Scheduling CPU and I/O-bound Threads Context Switching Linux Processes/Threads Programs

More information

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections ) CPU Scheduling CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections 6.7.2 6.8) 1 Contents Why Scheduling? Basic Concepts of Scheduling Scheduling Criteria A Basic Scheduling

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

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13 PROCESS SCHEDULING II CS124 Operating Systems Fall 2017-2018, Lecture 13 2 Real-Time Systems Increasingly common to have systems with real-time scheduling requirements Real-time systems are driven by specific

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

W4118: advanced scheduling

W4118: advanced scheduling W4118: advanced scheduling Instructor: Junfeng Yang References: Modern Operating Systems (3 rd edition), Operating Systems Concepts (8 th edition), previous W4118, and OS at MIT, Stanford, and UWisc Outline

More information

238P: Operating Systems. Lecture 14: Process scheduling

238P: Operating Systems. Lecture 14: Process scheduling 238P: Operating Systems Lecture 14: Process scheduling This lecture is heavily based on the material developed by Don Porter Anton Burtsev November, 2017 Cooperative vs preemptive What is cooperative multitasking?

More information

Real-Time Operating Systems Issues. Realtime Scheduling in SunOS 5.0

Real-Time Operating Systems Issues. Realtime Scheduling in SunOS 5.0 Real-Time Operating Systems Issues Example of a real-time capable OS: Solaris. S. Khanna, M. Sebree, J.Zolnowsky. Realtime Scheduling in SunOS 5.0. USENIX - Winter 92. Problems with the design of general-purpose

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

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

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

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

LECTURE 3:CPU SCHEDULING

LECTURE 3:CPU SCHEDULING LECTURE 3:CPU SCHEDULING 1 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation 2 Objectives

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

RT extensions/applications of general-purpose OSs

RT extensions/applications of general-purpose OSs EECS 571 Principles of Real-Time Embedded Systems Lecture Note #15: RT extensions/applications of general-purpose OSs General-Purpose OSs for Real-Time Why? (as discussed before) App timing requirements

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

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

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

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

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

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 326: Operating Systems. CPU Scheduling. Lecture 6

CS 326: Operating Systems. CPU Scheduling. Lecture 6 CS 326: Operating Systems CPU Scheduling Lecture 6 Today s Schedule Agenda? Context Switches and Interrupts Basic Scheduling Algorithms Scheduling with I/O Symmetric multiprocessing 2/7/18 CS 326: Operating

More information

Chapter 6: CPU Scheduling

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

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling 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

Ch 4 : CPU scheduling

Ch 4 : CPU scheduling Ch 4 : CPU scheduling It's the basis of multiprogramming operating systems. By switching the CPU among processes, the operating system can make the computer more productive In a single-processor system,

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

Chapter 5 CPU scheduling

Chapter 5 CPU scheduling Chapter 5 CPU scheduling Contents Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling

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

SFO The Linux Kernel Scheduler. Viresh Kumar (PMWG)

SFO The Linux Kernel Scheduler. Viresh Kumar (PMWG) SFO17-421 The Linux Kernel Scheduler Viresh Kumar (PMWG) Topics CPU Scheduler The O(1) scheduler Current scheduler design Scheduling classes schedule() Scheduling classes and policies Sched class: STOP

More information

Class average is Undergraduates are performing better. Working with low-level microcontroller timers

Class average is Undergraduates are performing better. Working with low-level microcontroller timers Student feedback Low grades of the midterm exam Class average is 86.16 Undergraduates are performing better Cheat sheet on the final exam? You will be allowed to bring one page of cheat sheet to the final

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

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

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

Scheduling - Overview

Scheduling - Overview Scheduling - Overview Quick review of textbook scheduling Linux 2.4 scheduler implementation overview Linux 2.4 scheduler code Modified Linux 2.4 scheduler Linux 2.6 scheduler comments Possible Goals of

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

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

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

PROCESS SCHEDULING Operating Systems Design Euiseong Seo

PROCESS SCHEDULING Operating Systems Design Euiseong Seo PROCESS SCHEDULING 2017 Operating Systems Design Euiseong Seo (euiseong@skku.edu) Histogram of CPU Burst Cycles Alternating Sequence of CPU and IO Processor Scheduling Selects from among the processes

More information

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts CS307 Basic Concepts Maximize CPU utilization obtained with multiprogramming CPU Scheduling CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution

More information

Operating Systems CS 323 Ms. Ines Abbes

Operating Systems CS 323 Ms. Ines Abbes Taibah University College of Community of Badr Computer Science Department Operating Systems CS71/CS72 جامعة طيبة كلية المجتمع ببدر قسم علوم الحاسب مقرر: نظم التشغيل Operating Systems CS 323 Ms. Ines Abbes

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

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling scheduling: share CPU among processes scheduling should: be fair all processes must be similarly affected no indefinite postponement aging as a possible solution adjust priorities based on waiting time

More information

Operating Systems Unit 3

Operating Systems Unit 3 Unit 3 CPU Scheduling Algorithms Structure 3.1 Introduction Objectives 3.2 Basic Concepts of Scheduling. CPU-I/O Burst Cycle. CPU Scheduler. Preemptive/non preemptive scheduling. Dispatcher Scheduling

More information

Process management. Scheduling

Process management. Scheduling Process management Scheduling Points of scheduler invocation (recap) User Kernel Return from system call Process Schedule Return from interrupt handler Timer interrupts to ensure OS control Return from

More information

CPU Scheduling (1) CPU Scheduling (Topic 3) CPU Scheduling (2) CPU Scheduling (3) Resources fall into two classes:

CPU Scheduling (1) CPU Scheduling (Topic 3) CPU Scheduling (2) CPU Scheduling (3) Resources fall into two classes: CPU Scheduling (Topic 3) 홍성수 서울대학교공과대학전기공학부 Real-Time Operating Systems Laboratory CPU Scheduling (1) Resources fall into two classes: Preemptible: Can take resource away, use it for something else, then

More information

Scheduling, part 2. Don Porter CSE 506

Scheduling, part 2. Don Porter CSE 506 Scheduling, part 2 Don Porter CSE 506 Logical Diagram Binary Memory Formats Allocators Threads Today s Lecture Switching System to CPU Calls RCU scheduling File System Networking Sync User Kernel Memory

More information

Computer Systems Laboratory Sungkyunkwan University

Computer Systems Laboratory Sungkyunkwan University CPU Scheduling Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics General scheduling concepts Scheduling algorithms Case studies Linux

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #5 After A.S.Tanenbaum, Modern Operating Systems, 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD General information GENERAL INFORMATION Cooperating processes

More information

Scheduling Mar. 19, 2018

Scheduling Mar. 19, 2018 15-410...Everything old is new again... Scheduling Mar. 19, 2018 Dave Eckhardt Brian Railing Roger Dannenberg 1 Outline Chapter 5 (or Chapter 7): Scheduling Scheduling-people/textbook terminology note

More information

Titolo presentazione. Scheduling. sottotitolo A.Y Milano, XX mese 20XX ACSO Tutoring MSc Eng. Michele Zanella

Titolo presentazione. Scheduling. sottotitolo A.Y Milano, XX mese 20XX ACSO Tutoring MSc Eng. Michele Zanella Titolo presentazione Scheduling sottotitolo A.Y. 2017-18 Milano, XX mese 20XX ACSO Tutoring MSc Eng. Michele Zanella Process Scheduling Goals: Multiprogramming: having some process running at all times,

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

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

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

COSC243 Part 2: Operating Systems

COSC243 Part 2: Operating Systems COSC243 Part 2: Operating Systems Lecture 17: CPU Scheduling Zhiyi Huang Dept. of Computer Science, University of Otago Zhiyi Huang (Otago) COSC243 Lecture 17 1 / 30 Overview Last lecture: Cooperating

More information

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009 CS211: Programming and Operating Systems Lecture 17: Threads and Scheduling Thursday, 05 Nov 2009 CS211 Lecture 17: Threads and Scheduling 1/22 Today 1 Introduction to threads Advantages of threads 2 User

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

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

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

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

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

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

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Process Scheduling. Copyright : University of Illinois CS 241 Staff Process Scheduling Copyright : University of Illinois CS 241 Staff 1 Process Scheduling Deciding which process/thread should occupy the resource (CPU, disk, etc) CPU I want to play Whose turn is it? Process

More information

MASTER'S THESIS. Proportional and Sporadic Scheduling in Real-Time Operating Systems. Mikael Bertlin. Luleå University of Technology

MASTER'S THESIS. Proportional and Sporadic Scheduling in Real-Time Operating Systems. Mikael Bertlin. Luleå University of Technology MASTER'S THESIS 2008:061 CIV Proportional and Sporadic Scheduling in Real-Time Operating Systems Mikael Bertlin Luleå University of Technology MSc Programmes in Engineering Computer Science and Engineering

More information

Linux Scheduler. OS 323 (Spring 2013)

Linux Scheduler. OS 323 (Spring 2013) Linux Scheduler OS 323 (Spring 2013) Process states CPU scheduler Makes the computer more productive by switching the CPU among processes CPU scheduling may take place when a process: 1. Switches from

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

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying

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

Scheduling II. Today. Next Time. ! Proportional-share scheduling! Multilevel-feedback queue! Multiprocessor scheduling. !

Scheduling II. Today. Next Time. ! Proportional-share scheduling! Multilevel-feedback queue! Multiprocessor scheduling. ! Scheduling II Today! Proportional-share scheduling! Multilevel-feedback queue! Multiprocessor scheduling Next Time! Memory management Scheduling with multiple goals! What if you want both good turnaround

More information

Recap. Run to completion in order of arrival Pros: simple, low overhead, good for batch jobs Cons: short jobs can stuck behind the long ones

Recap. Run to completion in order of arrival Pros: simple, low overhead, good for batch jobs Cons: short jobs can stuck behind the long ones Recap First-Come, First-Served (FCFS) Run to completion in order of arrival Pros: simple, low overhead, good for batch jobs Cons: short jobs can stuck behind the long ones Round-Robin (RR) FCFS with preemption.

More information

Scheduling. The Basics

Scheduling. The Basics The Basics refers to a set of policies and mechanisms to control the order of work to be performed by a computer system. Of all the resources in a computer system that are scheduled before use, the CPU

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

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

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

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

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

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

Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux Daniel Svärd dansv077@student.liu.se Freddie Åström freas157@student.liu.se November 19, 2006 Abstract This report tries

More information

ò mm_struct represents an address space in kernel ò task represents a thread in the kernel ò A task points to 0 or 1 mm_structs

ò mm_struct represents an address space in kernel ò task represents a thread in the kernel ò A task points to 0 or 1 mm_structs Last time We went through the high-level theory of scheduling algorithms Scheduling Today: View into how Linux makes its scheduling decisions Don Porter CSE 306 Lecture goals Understand low-level building

More information

Scheduling. Don Porter CSE 306

Scheduling. Don Porter CSE 306 Scheduling Don Porter CSE 306 Last time ò We went through the high-level theory of scheduling algorithms ò Today: View into how Linux makes its scheduling decisions Lecture goals ò Understand low-level

More information

Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm

Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm PURPOSE Getting familiar with the Linux kernel source code. Understanding process scheduling and how different parameters

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

Process behavior. Categories of scheduling algorithms.

Process behavior. Categories of scheduling algorithms. Week 5 When a computer is multiprogrammed, it frequently has multiple processes competing for CPU at the same time. This situation occurs whenever two or more processes are simultaneously in the ready

More information

INF1060: Introduction to Operating Systems and Data Communication. Pål Halvorsen. Wednesday, September 29, 2010

INF1060: Introduction to Operating Systems and Data Communication. Pål Halvorsen. Wednesday, September 29, 2010 INF1060: Introduction to Operating Systems and Data Communication Pål Halvorsen Wednesday, September 29, 2010 Overview Processes primitives for creation and termination states context switches processes

More information

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms Operating System Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts Scheduling Criteria Scheduling Algorithms OS Process Review Multicore Programming Multithreading Models Thread Libraries Implicit

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

CPU Scheduling (Part II)

CPU Scheduling (Part II) CPU Scheduling (Part II) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) CPU Scheduling 1393/7/28 1 / 58 Motivation Amir H. Payberah

More information

Uniprocessor Scheduling

Uniprocessor Scheduling Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall CPU- and I/O-bound processes

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

Advanced Operating Systems (CS 202) Scheduling (1)

Advanced Operating Systems (CS 202) Scheduling (1) Advanced Operating Systems (CS 202) Scheduling (1) Today: CPU Scheduling 2 The Process The process is the OS abstraction for execution It is the unit of execution It is the unit of scheduling It is the

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

Concurrent Programming Synchronisation. CISTER Summer Internship 2017

Concurrent Programming Synchronisation. CISTER Summer Internship 2017 1 Concurrent Programming Synchronisation CISTER Summer Internship 2017 Luís Nogueira lmn@isep.ipp.pt 2 Introduction Multitasking Concept of overlapping the computation of a program with another one Central

More information