Outline. Chapter 5: Process Scheduling Yean Fu Wen Nov. 24, Basic Concepts Scheduling Criteria Scheduling Algorithms
|
|
- Cory Ramsey
- 7 years ago
- Views:
Transcription
1 Chapter 5: Process Scheduling Yean Fu Wen Nov. 24, 2009 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS, SJF, Priority, RR, MQ, MFQ Thread Scheduling Multiple Processor Scheduling Operating System Examples Algorithm Evaluation 16:58 2 1
2 Basic Concepts The objective of multiprogramming is to have some processes running at all times maximize CPU utilization make the computer more productive CPU scheduling is the basis of multiprogramming OSs almost all computer resources are scheduled before use CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution CPU burst I/O wait I/O burst 16:58 3 Basic Concepts (cont.) CPU burst distribution measuring the durations of CPU bursts various greatly from process (computer) to process (computer) characterized as exponential or hyperexponential the distribution can be important in the selection of CPU scheduling algorithm 16:58 4 2
3 CPU Scheduler (Short term Scheduler) The CPU scheduler selects from the processes in memory that are ready to execute, and allocates the CPU to one of them ready queue can be a FIFO queue, a priority queue, a tree the records in the queue are PCBs CPU scheduling decisions may take place when a process: 1. switches from running to waiting state (e.g., I/O request) 2.switches from running to ready state (e.g., interrupt) 3.switches from waiting to ready 4.terminates Scheduling only under 1 and 4 is nonpreemptive (cooperative) the process keeps CPU until it terminates or switches to the waiting state does not require the special hardware (e.g., timer) e.g., Windows 3.x, the previous systems of Mac OS X All other scheduling is preemptive unfortunately, introduces some problems e.g., data sharing, kernel design, interrupt handlers 16:58 5 Dispatcher Dispatcher module gives control of the CPU to the process selected by the short term scheduler; this module involves: switching context switching to user mode jumping to the proper location in the user program to restart that program Dispatch latency time it takes for the dispatcher to stop one process and start another running should be as fast as possible 16:58 6 3
4 Scheduling Criteria Criteria for comparing CPU scheduling algorithms: CPU utilization keep the CPU as busy as possible in a real system, 40% ~ 90% Throughput # of processes that are completed per time unit Turnaround time amount of time to execute a particular process the period from new state to terminated state Waiting time amount of time a process has been waiting in the ready queue usually, each various scheduling algorithm affects only the waiting time Response time amount of time it takes from the submission of a request until the first response is produced not until output the whole response (this is the turnaround time) this criterion is more meaningful in an interactive system 16:58 7 Scheduling Criteria (cont.) Optimization Criteria Max CPU utilization Max throughput Min turnaround time Min waiting time Min response time for interactive systems, it is more important to minimize the variance in the response time than to minimize the average response time 16:58 8 4
5 First Come, First Served (FCFS) Scheduling Process Burst Time P 1 24 P 2 3 P 3 3 Suppose that the processes arrive in the order: P 1, P 2, P 3 The Gantt Chart for the schedule is: P 1 P 2 P wait 0 milliseconds wait 24 milliseconds wait 27 milliseconds The average waiting time is ( )/3 = 17 milliseconds 16:58 9 FCFS Scheduling (cont.) Suppose that the processes arrive in the order: P 2, P 3, P 1 The Gantt chart for the schedule is: P 2 P 3 P wait 0 milliseconds wait 3 milliseconds wait 6 milliseconds The average waiting time is (6+0+3)/3 = 3 milliseconds Much better than previous case Convoy effect short processes behind long process e.g., the 1 st case lower CPU and device utilization The scheduler is nonpreemptive (releasing CPU until termination or waiting I/O) implemented with a FIFO queue 16:
6 Shortest Job First (SJF) Scheduling Associate with each process the length of its next CPU burst and use these lengths to schedule the process with the shortest time = shortest next CPU burst algorithm if two processes have the same shortest bursts, FCFS scheduling is used Two schemes: nonpreemptive once CPU given to the process it cannot be preempted until completes its CPU burst preemptive if a new process arrives with CPU burst length less than remaining i time of current executing process, preempt. This scheme is know as the Shortest Remaining Time First (SRTF) scheduling SJF is optimal gives minimum average waiting time for a given set of processes 16:58 11 SJF Scheduling (cont.) Example of non preemptive SJF Process Burst Time P 1,P 2,P 3,P 4 P 1 6 P 2 8 P 3 7 P P 4 P 1 P 3 P Average waiting time = ( )/4 = 7 NOTE: using FCFS scheduling, the average waiting time = P 1,P 2,P 3,P 4 P 1 P 2 P 3 P :
7 SJF Scheduling (cont.) Example of preemptive SJF P 1 P 2 P 3 P 4 Process Arrival Time Burst Time P P P P P 2 P 1 P 4 P P 1 Average waiting time = ((10 1)+0+(17 2)+(5 3))/4 = 6.5 NOTE: using nonpreemptive SJF, the average waiting time = (0+(8 1)+(17 2)+(12 3))/4 = 7.75 P 1 P 2 P 3 P 4 P 2 P 4 P 1 P :58 13 SJF Scheduling (cont.) Determining length of next CPU burst Can only estimate the length Can be done by using the length of previous CPU bursts, using exponential averaging 1. τ n = the previous predicted value for n th CPU burst (the past history) 2. t n = actual length of n th CPU burst (the most recent information) 3. τ n+1 = predicted value for the next CPU burst 4. α, 0 α 1 (the relative weight of the recent and past history) 5. define: τ n+1 = αt n + (1-α)τ n τ0 is a constant or overall system average p.157 i=0 i=1 t 16:58 1 = α = 1/2 τ 0 = 10 (the defaulted predicted value for t 0 ) t 0 = 6 (measured) τ 1 = ½(t 1 )+ ½(τ 0 ) = 8 (the predicted value for t 1 ) 7
8 SJF Scheduling (cont.) The SJF scheduling algorithm is optimal!! It gives the minimum average waiting time for a given set of processes. Why? Moving a short process before a long one decreases the waiting time of the short process more than it increases the waiting time of the long process. But how can we obtain the length of the next CPU burst?? It is impossible to do so However, we can try our best to predict the length. We expect that the next CPU burst will be similar in length to the previous ones. And pick the process with the shortest predicted CPU burst. ( 1 α ). τ n = α t + τ + 1 n n [0,1], control the relative weight of recent and past history in prediction The predicted value for the bext CPU burst The length of the nth CPU burst The last prediction 16:58 15 Priority Scheduling A priority number (integer) is associated with each process usually, low numbers are used to represent high priority the number can be defined internally: based on measurable quantity within the system externally: based on criteria outside OS, e.g., importance, user type SJF is a special case of priority scheduling priority is the inverse of the predicted next CPU burst time The CPU is allocated to the process with the highest priority Preemptive nonpreemptive Problem Starvation low priority processes may never execute e.g., amazing IBM 7094 Solution Aging as time progresses increase the priority of the process 16:
9 Round Robin (RR) Scheduling RR scheduling is designed especially for time sharing systems similar to FCFS, but each process gets a small unit of CPU time named time quantum (time slice) usually milliseconds after this time has elapsed, the process is preempted and added to the end of the ready queue the scheduler picks the next process from the (FIFO) ready queue If there are n processes in the ready queue and the time quantum is q No process waits more than (n-1)q time units. Example of RR with time quantum = 4 Process Arrival Time Burst Time P P P P 1 P 2 P 3 P 1 P 1 P 1 P 1 P Average waiting time = (6+4+7)/3 = :58 17 Round Robin Scheduling (cont.) Turnaround time varies with the time quantum q large equal to FCFS q small q must be large with respect to context switch, otherwise overhead is too high based on special hardware, extremely small time quantum is possible, the RR is called processor sharing that each process has its own (slower/virtual) CPU Typically, higher average turnaround than SJF, but better response time Guideline: 80% of the CPU bursts should be shorter than the time quantum 16:
10 Multilevel Queue Ready queue is partitioned into separate queues: foreground (for interactive processes) background (for batch processes) Each queue has its own scheduling algorithm foreground RR background FCFS Scheduling must be done among the queues Fixed priority ypreemptive p scheduling; (i.e., serve all from foreground then from background). Possibility of starvation. Time slice each queue gets a certain amount of CPU time which it can schedule among its processes; i.e., 80% to foreground in RR 20% to background in FCFS 16:58 19 Multilevel Feedback Queue A process can move between the various queues demoting a process uses too much CPU time, it ll be moved to a lower priority yqueue updating a process waiting too long in a lower priority queue may be moved to a higher priority queue MFQ is the most general CPU scheduling algorithm aging can be implemented this way Multilevel feedback queue scheduler defined by the following parameters: number of queues scheduling algorithms for each queue method used to determine when to upgrade a process method used to determine when to demote a process method used to determine which queue a process will enter (when that process needs service) 16:
11 Multilevel Feedback Queue Example of multilevel feedback queue with three queues: Q 0 RR with time quantum 8 ms. Q 1 RR with time quantum 16 ms. Q 2 FCFS Scheduling A new job enters queue Q 0 which is served with RR. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q 1. At Q 1, job is again served with RR and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q 2. 16:58 21 Thread Scheduling Thread scheduling kernel level threads scheduled by the OS user level threads managed by the thread library (controlled by the programmer) to run on a CPU, the user level thread must be mapped to an associated kernel level thread Process contention scope (PCS) competition for CPU takes place among threads belonging to the same process Local Scheduling the thread library decides which user level thread to put onto an available LWP tpicall typically, according to priority (set by the programmer) preemption mode NOTE: it does not mean that the thread is actually running on a CPU to run on a CPU, the mapped kernel thread (LWP) must also be scheduled (by SCS) 16:
12 Thread Scheduling (cont.) System contention scope (SCS) competition for CPU takes place among all (kernel) threads in the system Global Scheduling the kernel decides which kernel thread to run next systems using 1 to 1 model (e.g., XP, Linux) schedule threads using only SCS Pthread scheduling API pthread_attr_setscope(pthread_attr_t *attr, int scope) pthread_attr_getscope(pthread_attr_t *attr, int *scope) PCS: scope = PTHREAD_SCOPE_PROCESS SCS: scope = PTHREAD_SCOPE_SYSTEM NOTE: Pthread in Linux and Mac OS X systems allows only PTHREAD_SCOPE_SYSTEM 16:58 23 #include <pthread.h> #include <stdio.h> #define NUM THREADS 5 int main(int argc, char *argv[]) { int i; pthread t tid[num THREADS]; pthread attr t attr; /* get the default attributes */ pthread attr init(&attr); /* set the scheduling algorithm to PROCESS or SYSTEM */ pthread attr setscope(&attr, PTHREAD SCOPE SYSTEM); /* set the scheduling policy - FIFO, RT, or OTHER */ pthread attr setschedpolicy(&attr, SCHED OTHER); /* create the threads */ for (i = 0; i < NUM THREADS; i++) pthread create(&tid[i],&attr,runner,null); /* now join on each thread */ for (i = 0; i < NUM THREADS; i++) pthread join(tid[i], NULL); } /* Each thread will begin control in this function */ void *runner(void *param) { printf("i am a thread\n"); pthread exit(0); 16:58 } 24 12
13 Multiple Processor Scheduling When multiple CPUs are available CPU scheduling are more complex load sharing becomes possible Homogeneous: the processors are identical in terms of their functionality Approaches to multiprocessor scheduling Asymmetric multiprocessing a single processor handles all scheduling decisions, I/O processing the master server other processors execute only user code Symmetric multiprocessing (SMP) each processor is self scheduling the scheduler must ensure that two processors do not choose the same process from the ready queue all modern OSs support SMP 16:58 25 Multiple Processor Scheduling (cont.) Processor affinity most SMP systems try to keep a process running on the same processor e.g., eg if a process migrates to a new processor, the content of cache memory (for the old processor) must be invalidated the data re populates the cache for the new processor two possible forms soft affinity: the scheduler does not guarantee affinity hard affinity: (Linux) provides system calls to keep the process always on the same processor Load balancing keeping the workload evenly distributed across all processors in SMP needed on systems where each processor has its own private ready queue most modern OSs supporting SMP belong to this type counteracting the benefits of processor affinity 16:
14 Multiple Processor Scheduling (cont.) Load balancing (cont.) two general approaches push migration: a specific task periodically checks each processor s load and moves process from overloaded to less busy processors pull migration: an idle processor actively pulls a waiting (ready) task from a busy processor Symmetric multithreading (SMT) providing multiple logical processors to run threads concurrently each logical processor has its own architecture state (i.e., general purpose registers, machine state registers ) interrupts are handled by the logical processor on the same physical CPU, all logical l processors share ALU, cache, bus called hyperthreading (HT) technology on Intel CPUs SMT is provide in hardware, not software but the performance may be improved if OS/scheduler is aware of SMT 16:58 27 Multicore Processors Recent trend to place multiple processor cores on same physical chip Faster and consume less power Multiple threads per core also growing Takes advantage of memory stall to make progress on another thread while memory retrieve happens Multithreaded Multicore System 16:
15 Operating System Examples Solaris scheduling Windows XP scheduling Linux scheduling does not distinguish between processes and threads task 16:58 29 Example: Solaris Scheduling 4 pre defined classes of scheduling real time system time sharing interactive each class has a set of priorities and scheduling algorithm the scheduler converts the class specific priorities into global priorities and selects the highest priority thread to run 16:58 (ms.) The dispatch table for interactive and timesharing threads including 60 priority levels: a bigger number a higher priority a higher priority has a smaller time slice the number within time quantum expired and return from sleep is the new priority (number) for redispatching the thread 30 15
16 Example: Solaris Scheduling Time sharing the default class of a process multilevel feedback queue 16: Example: Windows XP Scheduling Windows XP scheduler called dispatcher a priority based, preemptive scheduling algo. using a 32 level l priority i scheme 16~32: real time class the thread priority is fixed 1~15: variable priority class containing 5 classes the priority of thread can be changed within the class each class has 7 relative priorities the NORMAL relative priority is the base priority for each class when a thread s time quantum runs out, its priority is lowered when a variable priority thread returns from waiting queue, the dispatcher boosts its priority depending on what the thread was waiting for tending to give good response times to interactive threads 16:
17 Example: Linux Scheduling Linux scheduler (after version 2.5) preemptive and priority based lower (nice) value indicates higher priority higher priority task has longer quantum running in constant time (O(1)) supporting for SMP each processor has its own runqueue and schedules itself independently providing processor affinity load balancing fairness and support for interactive tasks Runqueue data structure active array: containing tasks with time remaining in their time slices expired array: containing expired tasks before moving a (dynamic priority) task from active to expired array, its new priority and corresponding time slice must be re calculated (refer to the next page) 16:58 if the active array is empty, two arrays are exchanged 33 Example: Linux Scheduling (cont.) Real time scheduling POSIX.1b compliant static priority is assigned its priority is unchanged while the task is moved from active to expired array Dynamic priority task scheduling the priority number is called nice value the task is more interactive has longer sleep time (for I/O) the new nice value = the old nice value - 5 higher h priority if the task is CPU bound has shorter sleep time the new nice value = the old nice value + 5 lower priority 16:
18 Algorithm Evaluation How do we select a CPU scheduling algorithm for a particular system? first of all, defining fii the criteria. i e.g., maximizing CPU utilization under the constraint that the max response time is 1 sec. then we evaluate the algorithms under consideration Possible evaluation methods (also suitable for network, system performance ) Deterministic modeling Queuing models Simulations Implementation 16:58 35 Evaluation: Deterministic Modeling Deterministic modeling one type of analytic evaluation takes tk a particular predetermined dt d workload and defines the performance of each algorithm for that workload simple and fast FCFS algorithm: its answers apply only to those cases over a set of examples, it may indicate trends the average waiting time = ( )/5 = 28 ms. nonpreemptive SJF scheduling: 16:58 Process Burst Time P 1 10 P 2 29 P 3 3 P 4 7 P 5 12 the average waiting time = ( )/5 = 13 ms. RR algorithm (time quantum=10 ms.): the average waiting time = ( )/5 = 23 ms. 18
19 Evaluation: Queueing Models The problem of deterministic modeling the processes that are run vary from day to day no static information Queuing model is based on mathematical formulas describing the system behavior the distribution of CPU and I/O bursts for processes in a system the arrival time distribution of new processes computing the average throughput, utilization, waiting time Example: Little s formula n = the average queue length n = λ x W λ= the arrival rate for new processes it ti The limitations of queuing analysis W = the average waiting time the classes of algo. and distributions that can be handled are limited the mathematics may be too complicated to work with it s necessary to make many assumptions, which may not be accurate queueing models are often only approximations of real systems 16:58 37 Evaluation: Simulations To get more accurate evaluation can be expensive more computer time more detailed simulation more accurate result trace tapes require large amounts of storage space Running simulation involves a model of the computer system including a clock variable software data structures input data distribution drivendriven mathematically empirically trace tapes statistic output 16:
20 Evaluation: Implementation The difficulty with this approach high cost coding the algorithm modifying the OS to support it handling the reaction of the users to a constantly changing the system the environment will change since the new scheduler the programmer may adjust the behavior of processes to gain more benefit from the new scheduler 16:
CPU Scheduling Outline
CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different
More informationObjectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling
Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms Chapter 5: Process Scheduling To discuss evaluation criteria for selecting the CPUscheduling algorithm for a particular
More informationChapter 5 Process Scheduling
Chapter 5 Process Scheduling CPU Scheduling Objective: Basic Scheduling Concepts CPU Scheduling Algorithms Why Multiprogramming? Maximize CPU/Resources Utilization (Based on Some Criteria) CPU Scheduling
More informationChapter 5: CPU Scheduling. Operating System Concepts 8 th Edition
Chapter 5: CPU Scheduling Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating
More informationObjectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts
Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting
More informationCPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems
Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution
More informationCPU Scheduling. CPU Scheduling
CPU Scheduling Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling
More informationICS 143 - Principles of Operating Systems
ICS 143 - Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Note that some slides are adapted from course text slides 2008 Silberschatz. Some
More informationAnnouncements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading
Announcements Reading Chapter 5 Chapter 7 (Monday or Wednesday) Basic Concepts CPU I/O burst cycle Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution What are the
More informationScheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:
Scheduling Scheduling Scheduling levels Long-term scheduling. Selects which jobs shall be allowed to enter the system. Only used in batch systems. Medium-term scheduling. Performs swapin-swapout operations
More information4003-440/4003-713 Operating Systems I. Process Scheduling. Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu)
4003-440/4003-713 Operating Systems I Process Scheduling Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu) Review: Scheduling Policy Ideally, a scheduling policy should: Be: fair, predictable
More informationOperating System: Scheduling
Process Management Operating System: Scheduling OS maintains a data structure for each process called Process Control Block (PCB) Information associated with each PCB: Process state: e.g. ready, or waiting
More informationDeciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run
SFWR ENG 3BB4 Software Design 3 Concurrent System Design 2 SFWR ENG 3BB4 Software Design 3 Concurrent System Design 11.8 10 CPU Scheduling Chapter 11 CPU Scheduling Policies Deciding which process to run
More informationOPERATING SYSTEMS SCHEDULING
OPERATING SYSTEMS SCHEDULING Jerry Breecher 5: CPU- 1 CPU What Is In This Chapter? This chapter is about how to get a process attached to a processor. It centers around efficient algorithms that perform
More informationCPU Scheduling. Core Definitions
CPU Scheduling General rule keep the CPU busy; an idle CPU is a wasted CPU Major source of CPU idleness: I/O (or waiting for it) Many programs have a characteristic CPU I/O burst cycle alternating phases
More information2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput
Import Settings: Base Settings: Brownstone Default Highest Answer Letter: D Multiple Keywords in Same Paragraph: No Chapter: Chapter 5 Multiple Choice 1. Which of the following is true of cooperative scheduling?
More informationRoad Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.
Road Map Scheduling Dickinson College Computer Science 354 Spring 2010 Past: What an OS is, why we have them, what they do. Base hardware and support for operating systems Process Management Threads Present:
More informationCPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS
CPU SCHEDULING CPU SCHEDULING (CONT D) Aims to assign processes to be executed by the CPU in a way that meets system objectives such as response time, throughput, and processor efficiency Broken down into
More informationW4118 Operating Systems. Instructor: Junfeng Yang
W4118 Operating Systems Instructor: Junfeng Yang Outline Introduction to scheduling Scheduling algorithms 1 Direction within course Until now: interrupts, processes, threads, synchronization Mostly mechanisms
More informationProcess Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff
Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,
More informationOperating Systems. III. Scheduling. http://soc.eurecom.fr/os/
Operating Systems Institut Mines-Telecom III. Scheduling Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ Outline Basics of Scheduling Definitions Switching
More informationMain Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies
Scheduling Main Points Scheduling policy: what to do next, when there are multiple threads ready to run Or multiple packets to send, or web requests to serve, or Definitions response time, throughput,
More informationComp 204: Computer Systems and Their Implementation. Lecture 12: Scheduling Algorithms cont d
Comp 204: Computer Systems and Their Implementation Lecture 12: Scheduling Algorithms cont d 1 Today Scheduling continued Multilevel queues Examples Thread scheduling 2 Question A starvation-free job-scheduling
More informationCPU Scheduling. CSC 256/456 - Operating Systems Fall 2014. TA: Mohammad Hedayati
CPU Scheduling CSC 256/456 - Operating Systems Fall 2014 TA: Mohammad Hedayati Agenda Scheduling Policy Criteria Scheduling Policy Options (on Uniprocessor) Multiprocessor scheduling considerations CPU
More informationIntroduction. Scheduling. Types of scheduling. The basics
Introduction In multiprogramming systems, when there is more than one runable (i.e., ready), the operating system must decide which one to activate. The decision is made by the part of the operating system
More informationMultiprocessor Scheduling and Scheduling in Linux Kernel 2.6
Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6 Winter Term 2008 / 2009 Jun.-Prof. Dr. André Brinkmann Andre.Brinkmann@uni-paderborn.de Universität Paderborn PC² Agenda Multiprocessor and
More informationOperating Systems Lecture #6: Process Management
Lecture #6: Process Written by based on the lecture series of Dr. Dayou Li and the book Understanding 4th ed. by I.M.Flynn and A.McIver McHoes (2006) Department of Computer Science and Technology,., 2013
More informationPROCESS SCHEDULING ALGORITHMS: A REVIEW
Volume No, Special Issue No., May ISSN (online): -7 PROCESS SCHEDULING ALGORITHMS: A REVIEW Ekta, Satinder Student, C.R. College of Education, Hisar, Haryana, (India) Assistant Professor (Extn.), Govt.
More informationReal-Time Scheduling 1 / 39
Real-Time Scheduling 1 / 39 Multiple Real-Time Processes A runs every 30 msec; each time it needs 10 msec of CPU time B runs 25 times/sec for 15 msec C runs 20 times/sec for 5 msec For our equation, A
More informationOS OBJECTIVE QUESTIONS
OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1
More informationScheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum
Scheduling Yücel Saygın These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods
More informationProcess Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies
Chapter 7 Process Scheduling Process Scheduler Why do we even need to a process scheduler? In simplest form, CPU must be shared by > OS > Application In reality, [multiprogramming] > OS : many separate
More informationJob Scheduling Model
Scheduling 1 Job Scheduling Model problem scenario: a set of jobs needs to be executed using a single server, on which only one job at a time may run for theith job, we have an arrival timea i and a run
More informationOperating Systems Concepts: Chapter 7: Scheduling Strategies
Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/
More informationA Group based Time Quantum Round Robin Algorithm using Min-Max Spread Measure
A Group based Quantum Round Robin Algorithm using Min-Max Spread Measure Sanjaya Kumar Panda Department of CSE NIT, Rourkela Debasis Dash Department of CSE NIT, Rourkela Jitendra Kumar Rout Department
More informationProcessor Scheduling. Queues Recall OS maintains various queues
Processor Scheduling Chapters 9 and 10 of [OS4e], Chapter 6 of [OSC]: Queues Scheduling Criteria Cooperative versus Preemptive Scheduling Scheduling Algorithms Multi-level Queues Multiprocessor and Real-Time
More informationScheduling 0 : Levels. High level scheduling: Medium level scheduling: Low level scheduling
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 informationW4118 Operating Systems. Instructor: Junfeng Yang
W4118 Operating Systems Instructor: Junfeng Yang Outline Advanced scheduling issues Multilevel queue scheduling Multiprocessor scheduling issues Real-time scheduling Scheduling in Linux Scheduling algorithm
More informationA Comparative Study of CPU Scheduling Algorithms
IJGIP Journal homepage: www.ifrsa.org A Comparative Study of CPU Scheduling Algorithms Neetu Goel Research Scholar,TEERTHANKER MAHAVEER UNIVERSITY Dr. R.B. Garg Professor Delhi School of Professional Studies
More informationò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?
Housekeeping Paper reading assigned for next Thursday Scheduling Lab 2 due next Friday Don Porter CSE 506 Lecture goals Undergrad review Understand low-level building blocks of a scheduler Understand competing
More informationOperating Systems, 6 th ed. Test Bank Chapter 7
True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one
More informationScheduling Algorithms
Scheduling Algorithms List Pros and Cons for each of the four scheduler types listed below. First In First Out (FIFO) Simplicity FIFO is very easy to implement. Less Overhead FIFO will allow the currently
More informationEECS 750: Advanced Operating Systems. 01/28 /2015 Heechul Yun
EECS 750: Advanced Operating Systems 01/28 /2015 Heechul Yun 1 Recap: Completely Fair Scheduler(CFS) Each task maintains its virtual time V i = E i 1 w i, where E is executed time, w is a weight Pick the
More informationCPU Scheduling 101. The CPU scheduler makes a sequence of moves that determines the interleaving of threads.
CPU Scheduling CPU Scheduling 101 The CPU scheduler makes a sequence of moves that determines the interleaving of threads. Programs use synchronization to prevent bad moves. but otherwise scheduling choices
More informationCHAPTER 1 INTRODUCTION
1 CHAPTER 1 INTRODUCTION 1.1 MOTIVATION OF RESEARCH Multicore processors have two or more execution cores (processors) implemented on a single chip having their own set of execution and architectural recourses.
More informationOperating System Tutorial
Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection
More informationMulti-core architectures. Jernej Barbic 15-213, Spring 2007 May 3, 2007
Multi-core architectures Jernej Barbic 15-213, Spring 2007 May 3, 2007 1 Single-core computer 2 Single-core CPU chip the single core 3 Multi-core architectures This lecture is about a new trend in computer
More informationLinux scheduler history. We will be talking about the O(1) scheduler
CPU Scheduling Linux scheduler history We will be talking about the O(1) scheduler SMP Support in 2.4 and 2.6 versions 2.4 Kernel 2.6 Kernel CPU1 CPU2 CPU3 CPU1 CPU2 CPU3 Linux Scheduling 3 scheduling
More informationAnalysis and Comparison of CPU Scheduling Algorithms
Analysis and Comparison of CPU Scheduling Algorithms Pushpraj Singh 1, Vinod Singh 2, Anjani Pandey 3 1,2,3 Assistant Professor, VITS Engineering College Satna (MP), India Abstract Scheduling is a fundamental
More informationOperatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings
Operatin g Systems: Internals and Design Principle s Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Bear in mind,
More informationLinux Process Scheduling Policy
Lecture Overview Introduction to Linux process scheduling Policy versus algorithm Linux overall process scheduling objectives Timesharing Dynamic priority Favor I/O-bound process Linux scheduling algorithm
More informationChapter 2: OS Overview
Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:
More informationCPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.
CPU Scheduling The scheduler is the component of the kernel that selects which process to run next. The scheduler (or process scheduler, as it is sometimes called) can be viewed as the code that divides
More informationReal-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No. # 26 Real - Time POSIX. (Contd.) Ok Good morning, so let us get
More informationPerformance Comparison of RTOS
Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile
More informationOverview of Presentation. (Greek to English dictionary) Different systems have different goals. What should CPU scheduling optimize?
Overview of Presentation (Greek to English dictionary) introduction to : elements, purpose, goals, metrics lambda request arrival rate (e.g. 200/second) non-preemptive first-come-first-served, shortest-job-next
More informationA Review on Load Balancing In Cloud Computing 1
www.ijecs.in International Journal Of Engineering And Computer Science ISSN:2319-7242 Volume 4 Issue 6 June 2015, Page No. 12333-12339 A Review on Load Balancing In Cloud Computing 1 Peenaz Pathak, 2 Er.Kamna
More informationKonzepte von Betriebssystem-Komponenten. Linux Scheduler. Valderine Kom Kenmegne Valderinek@hotmail.com. Proseminar KVBK Linux Scheduler Valderine Kom
Konzepte von Betriebssystem-Komponenten Linux Scheduler Kenmegne Valderinek@hotmail.com 1 Contents: 1. Introduction 2. Scheduler Policy in Operating System 2.1 Scheduling Objectives 2.2 Some Scheduling
More informationLinux O(1) CPU Scheduler. Amit Gud amit (dot) gud (at) veritas (dot) com http://amitgud.tk
Linux O(1) CPU Scheduler Amit Gud amit (dot) gud (at) veritas (dot) com http://amitgud.tk April 27, 2005 Agenda CPU scheduler basics CPU scheduler algorithms overview Linux CPU scheduler goals What is
More information10.04.2008. Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details
Thomas Fahrig Senior Developer Hypervisor Team Hypervisor Architecture Terminology Goals Basics Details Scheduling Interval External Interrupt Handling Reserves, Weights and Caps Context Switch Waiting
More informationMulti-core Programming System Overview
Multi-core Programming System Overview Based on slides from Intel Software College and Multi-Core Programming increasing performance through software multi-threading by Shameem Akhter and Jason Roberts,
More informationChapter 5 Linux Load Balancing Mechanisms
Chapter 5 Linux Load Balancing Mechanisms Load balancing mechanisms in multiprocessor systems have two compatible objectives. One is to prevent processors from being idle while others processors still
More informationOperating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015
Operating Systems 05. Threads Paul Krzyzanowski Rutgers University Spring 2015 February 9, 2015 2014-2015 Paul Krzyzanowski 1 Thread of execution Single sequence of instructions Pointed to by the program
More informationLecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses
Overview of Real-Time Scheduling Embedded Real-Time Software Lecture 3 Lecture Outline Overview of real-time scheduling algorithms Clock-driven Weighted round-robin Priority-driven Dynamic vs. static Deadline
More information159.735. Final Report. Cluster Scheduling. Submitted by: Priti Lohani 04244354
159.735 Final Report Cluster Scheduling Submitted by: Priti Lohani 04244354 1 Table of contents: 159.735... 1 Final Report... 1 Cluster Scheduling... 1 Table of contents:... 2 1. Introduction:... 3 1.1
More informationReal-Time Scheduling (Part 1) (Working Draft) Real-Time System Example
Real-Time Scheduling (Part 1) (Working Draft) Insup Lee Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania www.cis.upenn.edu/~lee/ CIS 41,
More informationThis tutorial will take you through step by step approach while learning Operating System concepts.
About the Tutorial An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component
More informationREDUCING TIME: SCHEDULING JOB. Nisha Yadav, Nikita Chhillar, Neha jaiswal
Journal Of Harmonized Research (JOHR) Journal Of Harmonized Research in Engineering 1(2), 2013, 45-53 ISSN 2347 7393 Original Research Article REDUCING TIME: SCHEDULING JOB Nisha Yadav, Nikita Chhillar,
More informationChapter 19: Real-Time Systems. Overview of Real-Time Systems. Objectives. System Characteristics. Features of Real-Time Systems
Chapter 19: Real-Time Systems System Characteristics Features of Real-Time Systems Chapter 19: Real-Time Systems Implementing Real-Time Operating Systems Real-Time CPU Scheduling VxWorks 5.x 19.2 Silberschatz,
More informationProcess Scheduling II
Process Scheduling II COMS W4118 Prof. Kaustubh R. Joshi krj@cs.columbia.edu hdp://www.cs.columbia.edu/~krj/os References: OperaWng Systems Concepts (9e), Linux Kernel Development, previous W4118s Copyright
More informationReadings for this topic: Silberschatz/Galvin/Gagne Chapter 5
77 16 CPU Scheduling Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5 Until now you have heard about processes and memory. From now on you ll hear about resources, the things operated upon
More informationOperating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:
Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the
More informationCS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study
CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what
More informationCS414 SP 2007 Assignment 1
CS414 SP 2007 Assignment 1 Due Feb. 07 at 11:59pm Submit your assignment using CMS 1. Which of the following should NOT be allowed in user mode? Briefly explain. a) Disable all interrupts. b) Read the
More informationTechnical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.
Overview Concepts of Mobile Operating Systems Lecture 11 Concepts of Mobile Operating Systems Mobile Business I (WS 2007/08) Prof Dr Kai Rannenberg Chair of Mobile Business and Multilateral Security Johann
More informationCS4410 - Fall 2008 Homework 2 Solution Due September 23, 11:59PM
CS4410 - Fall 2008 Homework 2 Solution Due September 23, 11:59PM Q1. Explain what goes wrong in the following version of Dekker s Algorithm: CSEnter(int i) inside[i] = true; while(inside[j]) inside[i]
More informationThreads Scheduling on Linux Operating Systems
Threads Scheduling on Linux Operating Systems Igli Tafa 1, Stavri Thomollari 2, Julian Fejzaj 3 Polytechnic University of Tirana, Faculty of Information Technology 1,2 University of Tirana, Faculty of
More informationLoad-Balancing for a Real-Time System Based on Asymmetric Multi-Processing
LIFL Report # 2004-06 Load-Balancing for a Real-Time System Based on Asymmetric Multi-Processing Éric PIEL Eric.Piel@lifl.fr Philippe MARQUET Philippe.Marquet@lifl.fr Julien SOULA Julien.Soula@lifl.fr
More informationLinux Process Scheduling. sched.c. schedule() scheduler_tick() hooks. try_to_wake_up() ... CFS CPU 0 CPU 1 CPU 2 CPU 3
Linux Process Scheduling sched.c schedule() scheduler_tick() try_to_wake_up() hooks RT CPU 0 CPU 1 CFS CPU 2 CPU 3 Linux Process Scheduling 1. Task Classification 2. Scheduler Skeleton 3. Completely Fair
More informationTasks Schedule Analysis in RTAI/Linux-GPL
Tasks Schedule Analysis in RTAI/Linux-GPL Claudio Aciti and Nelson Acosta INTIA - Depto de Computación y Sistemas - Facultad de Ciencias Exactas Universidad Nacional del Centro de la Provincia de Buenos
More informationAn Implementation Of Multiprocessor Linux
An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than
More informationModule 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1
Module 8 Industrial Embedded and Communication Systems Version 2 EE IIT, Kharagpur 1 Lesson 37 Real-Time Operating Systems: Introduction and Process Management Version 2 EE IIT, Kharagpur 2 Instructional
More informationTask Scheduling for Multicore Embedded Devices
Embedded Linux Conference 2013 Task Scheduling for Multicore Embedded Devices 2013. 02. 22. Gap-Joo Na (funkygap@etri.re.kr) Contents 2 What is multicore?? 1. Multicore trends 2. New Architectures 3. Software
More informationReady Time Observations
VMWARE PERFORMANCE STUDY VMware ESX Server 3 Ready Time Observations VMware ESX Server is a thin software layer designed to multiplex hardware resources efficiently among virtual machines running unmodified
More information3 - Introduction to Operating Systems
3 - Introduction to Operating Systems Mark Handley What is an Operating System? An OS is a program that: manages the computer hardware. provides the basis on which application programs can be built and
More informationA Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems
A Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems Ishwari Singh Rajput Department of Computer Science and Engineering Amity School of Engineering and Technology, Amity University,
More informationThe Truth Behind IBM AIX LPAR Performance
The Truth Behind IBM AIX LPAR Performance Yann Guernion, VP Technology EMEA HEADQUARTERS AMERICAS HEADQUARTERS Tour Franklin 92042 Paris La Défense Cedex France +33 [0] 1 47 73 12 12 info@orsyp.com www.orsyp.com
More informationTypes Of Operating Systems
Types Of Operating Systems Date 10/01/2004 1/24/2004 Operating Systems 1 Brief history of OS design In the beginning OSes were runtime libraries The OS was just code you linked with your program and loaded
More informationChapter 1: Introduction. What is an Operating System?
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real -Time Systems Handheld Systems Computing Environments
More informationCompletely Fair Scheduler and its tuning 1
Completely Fair Scheduler and its tuning 1 Jacek Kobus and Rafał Szklarski 1 Introduction The introduction of a new, the so called completely fair scheduler (CFS) to the Linux kernel 2.6.23 (October 2007)
More informationMultilevel Load Balancing in NUMA Computers
FACULDADE DE INFORMÁTICA PUCRS - Brazil http://www.pucrs.br/inf/pos/ Multilevel Load Balancing in NUMA Computers M. Corrêa, R. Chanin, A. Sales, R. Scheer, A. Zorzo Technical Report Series Number 049 July,
More informationCHAPTER 15: Operating Systems: An Overview
CHAPTER 15: Operating Systems: An Overview The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint
More informationReal-Time Operating Systems for MPSoCs
Real-Time Operating Systems for MPSoCs Hiroyuki Tomiyama Graduate School of Information Science Nagoya University http://member.acm.org/~hiroyuki MPSoC 2009 1 Contributors Hiroaki Takada Director and Professor
More informationA LECTURE NOTE ON CSC 322 OPERATING SYSTEM I DR. S. A. SODIYA
A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I BY DR. S. A. SODIYA 1 SECTION ONE 1.0 INTRODUCTION TO OPERATING SYSTEMS 1.1 DEFINITIONS OF OPERATING SYSTEMS An operating system (commonly abbreviated OS and
More informationHyperThreading Support in VMware ESX Server 2.1
HyperThreading Support in VMware ESX Server 2.1 Summary VMware ESX Server 2.1 now fully supports Intel s new Hyper-Threading Technology (HT). This paper explains the changes that an administrator can expect
More informationWeb Server Software Architectures
Web Server Software Architectures Author: Daniel A. Menascé Presenter: Noshaba Bakht Web Site performance and scalability 1.workload characteristics. 2.security mechanisms. 3. Web cluster architectures.
More informationModular Real-Time Linux
Modular Real-Time Linux Shinpei Kato Department of Information and Computer Science, Keio University 3-14-1 Hiyoshi, Kohoku, Yokohama, Japan shinpei@ny.ics.keio.ac.jp Nobuyuki Yamasaki Department of Information
More informationLecture 3 Theoretical Foundations of RTOS
CENG 383 Real-Time Systems Lecture 3 Theoretical Foundations of RTOS Asst. Prof. Tolga Ayav, Ph.D. Department of Computer Engineering Task States Executing Ready Suspended (or blocked) Dormant (or sleeping)
More informationSyllabus MCA-404 Operating System - II
Syllabus MCA-404 - II Review of basic concepts of operating system, threads; inter process communications, CPU scheduling criteria, CPU scheduling algorithms, process synchronization concepts, critical
More informationAsymmetric Scheduling and Load Balancing for Real-Time on Linux SMP
Asymmetric Scheduling and Load Balancing for Real-Time on Linux SMP Éric Piel, Philippe Marquet, Julien Soula, and Jean-Luc Dekeyser {Eric.Piel,Philippe.Marquet,Julien.Soula,Jean-Luc.Dekeyser}@lifl.fr
More information