Tao Yang, UCSB CS 240B’03 Unix Scheduling Multilevel feedback queues –128 priority queues (value: 0-127) –Round Robin per priority queue Every scheduling.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Multiple Processor Systems
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
CPU Scheduling CS 416: Operating Systems Design, Spring 2001
1 Multiprocessor and Real-Time Scheduling Chapter 10.
OS Fall ’ 02 Processes Operating Systems Fall 2002.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
Multiprocessor and Real-Time Scheduling Chapter 10.
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
1 Scheduling in Representative Operating Systems.
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Informationsteknologi Tuesday, October 9, 2007Computer Systems/Operating Systems - Class 141 Today’s class Scheduling.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Phones OFF Please Processes Parminder Singh Kang Home:
Chapter 10 Multiprocessor and Real-Time Scheduling
Multiprocessor and Real-Time Scheduling
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Main Job: Assign processes to be executed by the processor(s) and processes to be loaded in main.
CPU Scheduling - Multicore. Reading Silberschatz et al: Chapter 5.5.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Lottery Scheduling: Flexible Proportional-Share Resource Management Sim YounSeok C. A. Waldspurger and W. E. Weihl.
1 Scheduling Processes. 2 Processes Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
Chapter 10 Multiprocessor and Real-Time Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Chapter 5 – CPU Scheduling (Pgs 183 – 218). CPU Scheduling  Goal: To get as much done as possible  How: By never letting the CPU sit "idle" and not.
Chapter 10 Multiprocessor and Real-Time Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Multiprocessor and Real-Time Scheduling Chapter 10.
Multiprocessor and Real-Time Scheduling
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
1 Multiprocessor and Real-Time Scheduling Chapter 10 Real-Time scheduling will be covered in SYSC3303.
1 Multiprocessor Scheduling Module 3.1 For a good summary on multiprocessor and real-time scheduling, visit:
ICOM Noack Scheduling For Distributed Systems Classification – degree of coupling Classification – granularity Local vs centralized scheduling Methods.
CPU Scheduling CS 6560: Operating Systems Design.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
CS333 Intro to Operating Systems Jonathan Walpole.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Page 1 2P13 Week 1. Page 2 Page 3 Page 4 Page 5.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Processes and threads.
Operating Systems (CS 340 D)
Processes and Threads Processes and their scheduling
Process Management Presented By Aditya Gupta Assistant Professor
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Uniprocessor Scheduling
Lottery Scheduling: Flexible Proportional-Share Resource Management
Operating Systems (CS 340 D)
Department of Computer Science University of California, Santa Barbara
OverView of Scheduling
Process & its States Lecture 5.
Chapter 9 Uniprocessor Scheduling
Multiprocessor and Real-Time Scheduling
CS703 – Advanced Operating Systems
CS703 - Advanced Operating Systems
Concurrency and Threading: CPU Scheduling
Department of Computer Science University of California, Santa Barbara
Uniprocessor Scheduling
Presentation transcript:

Tao Yang, UCSB CS 240B’03 Unix Scheduling Multilevel feedback queues –128 priority queues (value: 0-127) –Round Robin per priority queue Every scheduling event the scheduler picks the lowest priority non-empty queue and runs jobs in round-robin Scheduling events (when to schedule): –Clock interrupt –Process does a system call –Process gives up CPU,e.g. to do I/O

Tao Yang, UCSB CS 240B’03 UNIX Scheduling All processes assigned a baseline priority based on the type and current execution status: –swapper 0 –waiting for disk20 –waiting for lock35 –user-mode execution50 At scheduling events, all process’s priorities are adjusted:

Tao Yang, UCSB CS 240B’03 Multiprocessor Scheduling Targeted applications: Single-process jobs. Multi-process jobs. Multi-threaded jobs. Multiprogrammed vs. dedicated: running several applications concurrently? Granularity of parallelism. Scheduling policy?

Tao Yang, UCSB CS 240B’03 Granularity of Parallelism Independent parallelism: independent processes. No need to synchronize. Coarse-grained parallelism: relatively independent processes with occasional synchronization. Medium-grained parallelism. E.g. multi-threads which sync frequently. Fine-grained parallelism: synchronization every few instructions.

Tao Yang, UCSB CS 240B’03 Scheduling Challenges in Multiprogrammed Environments Why multiprogramming? –Improve system utilization Applications with independent tasks or coarse grained parallelism. –Regular OS scheduling policy Applications with medium grained parallelism –Special scheduling policy is needed. E.g. Consider a set of cooperative threads collectively.

Tao Yang, UCSB CS 240B’03 Assigning Processes to Processors Master/slave approach: Single scheduler. One processor is dedicated for processor assignment –Good: Centralized decision making –But: single point of failure. Not scalable. Peer assignment: OS can run any processor. Each processor does self- scheduling.

Tao Yang, UCSB CS 240B’03 Scheduler Organization in Peer Assignment Single global ready queue with locks. CPUs schedule jobs from this queue. –Use FCFS or other scheduling policies. –Limited scalability, but reasonable. One ready queue per CPU. Each CPU schedules its processes. –Static process assignment: cache friendly (Affinity), but difficult to balance load –Dynamic assignment with job stealing. may need process migration.

Tao Yang, UCSB CS 240B’03 Self Scheduling vs. Gang Scheduling Self-scheduling (load sharing): Pool of threads, pool of processors. –Better utilization –Cooperative threads may not run in parallel. Gang-scheduling (co-scheduling): Schedule related threads/processes at once on different CPUs. –Maximum concurrency for parallel applications. –Minimize intra-task communication latency. –More resource waste.

Tao Yang, UCSB CS 240B’03 Other Issues Time sharing and space sharing: –Space sharing: Should processors be statically or dynamically divided among applications? –Time sharing: should a processor be multiprogrammed? Resource allocation: –How many processors should be assigned to a process (a user job)? How can the OS know about the resource requirement of a job (process). In Solaris, a user needs to declare threads to be scheduled in a system scope. –Should the resource allocation be dynamically adjusted? A job may not utilize all processors assigned.

Tao Yang, UCSB CS 240B’03 Lottery Scheduling for Resource Share Allocation Carl A. Waldspurger and William E. Weihl. Lottery Scheduling: Flexible Proportional-Share Resource Management. In OSDI’94 Probabilistic approach for proportional resource sharing. –Assign a number of “lottery tickets” to each process. –The OS selects “winning ticket” randomly. –Tickets are transferable to among processes for share adjustment. –The # of tickets a process owns represents the percentage of its share.