IT320 OPERATING SYSTEM CONCEPTS Unit 6: Processor Scheduling September 2012 Kaplan University 1.

Slides:



Advertisements
Similar presentations
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling
Topic : Process Management Lecture By: Rupinder Kaur Lecturer IT, SRS Govt. Polytechnic College for Girls,Ludhiana.
Chapter 9 Uniprocessor Scheduling
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
Day 25 Uniprocessor scheduling. Algorithm: Selection function Selection function – which process among ready processes to select. w – time spent in system,
Chapter 3: CPU Scheduling
Chapter 9 Uniprocessor Scheduling
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.
Chapter 9 Uniprocessor Scheduling
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
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.
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.
Uniprocessor Scheduling
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
Chapter 4 Processor Management
Chapter 9 Uniprocessor Scheduling Spring, 2011 School of Computer Science & Engineering Chung-Ang University.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 6 CPU SCHEDULING.
Chapter 9 Uniprocessor Scheduling Seventh Edition By William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals.
Multiprocessor and Real-Time Scheduling Chapter 10.
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.
Operating System Chapter 9. Uniprocessor Scheduling
Uniprocessor Scheduling Chapter 9. Aim of Scheduling To improve: Response time: time it takes a system to react to a given input Turnaround Time (TAT)
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Minimize response time Maximize throughput Maximize processor efficiency.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Chapter 5 Processor Scheduling Introduction Processor (CPU) scheduling is the sharing of the processor(s) among the processes in the ready queue.
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.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Uniprocessor Scheduling
Operating System 9 UNIPROCESSOR SCHEDULING. TYPES OF PROCESSOR SCHEDULING.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
IT320 OPERATING SYSTEM CONCEPTS Unit 7: File Management July 2011 Kaplan University 1.
Unit 4: Processes, Threads & Deadlocks June 2012 Kaplan University 1.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 5a: CPU Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Chapter 2.2 : Process Scheduling
Chapter 6: CPU Scheduling
OverView of Scheduling
TDC 311 Process Scheduling.
Chapter 9 Uniprocessor Scheduling
Operating System 9 UNIPROCESSOR SCHEDULING
Multiprocessor and Real-Time Scheduling
Chapter 10 Multiprocessor and Real-Time Scheduling
Uniprocessor scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Presentation transcript:

IT320 OPERATING SYSTEM CONCEPTS Unit 6: Processor Scheduling September 2012 Kaplan University 1

Upcoming Topics Kaplan University 2  Unit 6: Processor Scheduling  Unit 7: File Management  Unit 8: Computer Security Risks & Data Protection  Unit 9: Distributing Computing and Networking  Unit 10: Final Project  Due Tuesday, October 30 by 11:59 pm ET

Unit 6 Overview Kaplan University 3  Readings  Discussion Questions  Review Unit 6 Assignments  NOTE: You have 2 assignments this week  Submit each to separate dropbox  Lecture on Processor Scheduling  Preview of Final Project

Unit 6: Reading & Assignments Kaplan University 4  Textbook Reading  Chapter 9 – Uniprocessor Scheduling  Chapter 10 – Multiprocessor & Real-Time Scheduling  Start with chapter summaries first!  Web Articles Reading  2 Discussion Questions  2 assignments – both papers

Unit 6 - Discussion Question 1 Kaplan University 5  Run the simulation found in the link below discuss your experience with the simulation, observations, and your thoughts on the different scheduling algorithms. Which is the most efficient and why?  Use the following URL for the running the simulations.  dex.html

Unit 6 – Discussion Question 2  You are the designer of a multi-core processor system.  Based on your knowledge of scheduling methods, which would you recommend for a highly multitasking system and why? Kaplan University 6

Unit 6: Assignment 1 Kaplan University 7  Compare the four processor scheduling algorithms:  First Come First Served (FCFS)  Round Robin (RR)  Shortest Process Next (SPN)  Shortest Remaining Time (SRT)  Write a 2-3 page paper defining all 4 algorithms and comparing each algorithm.  Provide an assessment as to when you should use each type of algorithm, or if some should never be used, and why.  You can use the results from the simulations to supplement your paper.

Unit 6: Writing Assignment 2 Kaplan University 8  The Rate Monotonic Scheduling (RMS) algorithm is said to resolve multitasking scheduling conflicts for periodic tasks.  Write a 1 page summary explaining how RMS works and how it resolves scheduling conflicts.

Unit 6: Grading Rubric Kaplan University 9  Assignment 1 (50 points possible)  15 pts – Explored the concept of Processor Scheduling  20 pts – Examined and compared scheduling algorithms, and provided assessment of when each algorithm should be used.  15 pts – Used APA format, included title page, cited references correctly, and at least 2 pages in length  Assignment 2 (20 points possible)  5 pts – Used APA format, included title page, cited references correctly, and at least 1 full page in length  10 pts – Included detailed description of RMS  5 pts – Demonstrated superior organization, is well ordered, logical and unified.

Chapter 9 – UniProcessor Scheduling 10 Kaplan University

Processor Scheduling Kaplan University 11  The purpose of processor scheduling is “to assign processes to be executed by the processor or processors over time, in a way that meets system objectives, such as response time, throughput, and processor efficiency” (Stallings, 2009, p. 406).

Scheduling Criteria (p. 411)  Turnaround Time  Response Time  Deadlines  Predictability  Throughput  Processor Utilization  Fairness  Enforcing Priorities  Balancing Resources 12 Kaplan University User OrientedSystem Oriented

Scheduling Policies Kaplan University 13  First Come, First Served (FCFS)  Round Robin  Shortest Process Next (SPN)  Shortest Remaining Time (SRT)  Highest Response Ratio Next  Feedback

Unit 6 Paper Kaplan University 14  Focus on these scheduling policies  First Come, First Served (FCFS) (same as FIFO)  Round Robin  Shortest Process Next (SPN)  Shortest Remaining Time (SRT)  Textbook, p. 413 ****  Simulations will help you visualize the process  Also review p. 415 (overview of all policies)

First-Come-First-Served  Each process joins the Ready queue  When the current process ceases to execute, the longest process in the Ready queue is selected

First-Come-First-Served  A short process may have to wait a very long time before it can execute  Favors CPU-bound processes  I/O processes have to wait until CPU-bound process completes

Round Robin  Uses preemption based on a clock  also known as time slicing, because each process is given a slice of time before being preempted.

Round Robin  Clock interrupt is generated at periodic intervals  When an interrupt occurs, the currently running process is placed in the ready queue  Next ready job is selected

Shortest Process Next  Nonpreemptive policy  Process with shortest expected processing time is selected next  Short process jumps ahead of longer processes

Shortest Process Next  Predictability of longer processes is reduced  If estimated time for process not correct, the operating system may abort it  Possibility of starvation for longer processes

Shortest Remaining Time  Preemptive version of shortest process next policy  Must estimate processing time and choose the shortest

Highest Response Ratio Next  Choose next process with the greatest ratio

Feedback Scheduling  Penalize jobs that have been running longer  Don’t know remaining time process needs to execute

Feedback Performance  Variations exist, simple version pre-empts periodically, similar to round robin  But can lead to starvation

Chapter 10: Multiprocessor Scheduling 26 Kaplan University

Multiprocessor Scheduling Kaplan University 27  What do I mean by “multiprocessor”?  Can you name some chip examples?

Multiprocessor Scheduling Kaplan University 28  Multiprocessors can be classified as one of following:  Loosely coupled or distributed multiprocessor, (also known as cluster) (Chapter 16)  Functionally, specialized processors (Chapter 11)  Tightly coupled multiprocessors (Chapter 10)

Scheduling Design Issues  Scheduling on a multiprocessor involves three interrelated issues: 1. Assignment of processes to processors 2. Use of multiprogramming on individual processors 3. Actual dispatching of a process  The approach taken will depend on the degree of granularity of applications and the number of processors available

Assignment of Processes to Processors  Assuming all processors are equal, it is simplest to treat processors as a pooled resource and assign process to processors on demand.  Should the assignment be static or dynamic though?

Static Assignment  Permanently assign process to a processor  Dedicate short-term queue for each processor  Less overhead  Allows the use of ‘group’ or ‘gang’ scheduling (see later)  But may leave a processor idle, while others have a backlog  Solution: use a common queue

Dynamic Assignment  Threads are moved for a queue for one processor to a queue for another processor

Process Scheduling  Usually processes are not dedicated to processors  A single queue is used for all processes  Or multiple queues are used for priorities  All queues feed to the common pool of processors  Specific scheduling discipline is important with two or more processors than with one

Thread Scheduling  Threads execute separate from the rest of the process  An application can be a set of threads that cooperate and execute concurrently in the same address space  Dramatic gains in performance are possible in multi- processor systems  Compared to running in uniprocessor systems

Multiprocessor Approaches Kaplan University 35  Load Sharing  Global queue of threads  Each processor selects threads when idle  Gang Scheduling  Set of related threads is scheduled to run on a set of processors at the same time

Multiprocessor Approaches Kaplan University 36  Dedicated Processor Assignment  Opposite of load-sharing  Each program is allocated number of processes equal to threads  Dynamic Scheduling  Number of threads in process can be altered during execution

Rate Monotonic Scheduling  Rate Monotonic Scheduling (RMS)  RMS assigns priorities to tasks Highest priority is task with shortest time to complete Second highest priority is with second shortest time  Chapter 10 – pp Kaplan University 37

Additional Reading Sources Kaplan University 38  Intel.com  systems-issues/  ore-family.htm

RMS Web Reading  Introduction to Rate Monotonic Scheduling Monotonic-Scheduling  What Every Engineer needs to know about Rate Monotonic Scheduling: A Tutorial (focus on first several pages of this article & ignore formulas)  Scheduling Algorithms Kaplan University 39

Preview – Final Project 40 Kaplan University

Final Project Kaplan University 41  Due Tuesday, October 30  Final Project is worth 100 points  Write a 5-10 page essay explaining how a mainstream modern (Linux or Windows) Operating System is designed to integrate all components of the operating system.  At least 3 outside references  Include topics on the next page

Final Project Kaplan University 42  The following list of topics is a starting point for your essay. You may include other topics if you feel they are important.  Processes and threads  Memory management  Scheduling (Including deadlock prevention)  File Management  Input and Output devices  Security issues (Discuss current malware threats & prevention techniques)  Data protection (RAID & Clusters)

Any Questions? Kaplan University 43  Pam Van Hook  Remember  2 assignments due this week  Start work on Final Project 