Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "IT320 OPERATING SYSTEM CONCEPTS Unit 6: Processor Scheduling September 2012 Kaplan University 1."— Presentation transcript:

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

2 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

3 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

4 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

5 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.  http://courses.cs.vt.edu/~csonline/OS/Lessons/Processes/in dex.html

6 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

7 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.

8 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.

9 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.

10 Chapter 9 – UniProcessor Scheduling 10 Kaplan University

11 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).

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

13 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

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

15

16 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

17 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

18 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.

19 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

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

21 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

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

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

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

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

26 Chapter 10: Multiprocessor Scheduling 26 Kaplan University

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

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

29 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

30 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?

31 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

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

33 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

34 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

35 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

36 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

37 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. 476-478 Kaplan University 37

38 Additional Reading Sources Kaplan University 38  Intel.com  http://software.intel.com/en-us/articles/operating- systems-issues/  http://www.intel.com/consumer/products/processors/c ore-family.htm

39 RMS Web Reading  Introduction to Rate Monotonic Scheduling http://www.eetimes.com/discussion/beginner-s-corner/4023927/Introduction-to-Rate- Monotonic-Scheduling  What Every Engineer needs to know about Rate Monotonic Scheduling: A Tutorial http://www.imd.uni-rostock.de/ma/gol/bsys/pdf/whatevereyeng.pdfa (focus on first several pages of this article & ignore formulas)  Scheduling Algorithms http://wiki.osdev.org/Scheduling_Algorithms Kaplan University 39

40 Preview – Final Project 40 Kaplan University

41 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

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

43 Any Questions? Kaplan University 43  Pam Van Hook  Remember  2 assignments due this week  Start work on Final Project  Email: pvanhook@kaplan.edu


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

Similar presentations


Ads by Google