Presentation is loading. Please wait.

Presentation is loading. Please wait.

OverView of Scheduling

Similar presentations


Presentation on theme: "OverView of Scheduling"— Presentation transcript:

1 OverView of Scheduling
Student: Xiuxian Chen ID:93036 Instructor:Mort Anvari Term: Fall 2000

2 Basic Concepts Scheduling is a fundamental operating-system function. Almost all computer resources are scheduling before use. The CPU is one the primary computer resources. Thus, its scheduling is central to operating-system design.

3 Types of Scheduling Long-term Scheduling
Determines which programs are admitted to the system for processing Controls the degree of multiprogramming If more processes are admitted less likely that all processes will be blocked better CPU usage each process has less fraction of the CPU The long term scheduler may attempt to keep a mix of processor-bound and I/O-bound processes

4 Types of Scheduling (Continue)
Medium-term Scheduling Medium-term scheduling is part of the swapping function. Typically, the swapping-in decision is based on the need to manage the degree of multiprogramming.

5 Types of Scheduling (Continue)
Short-term Scheduling Determines which process is going to execute next (also called CPU scheduling) The short term scheduler is known as the dispatcher Is invoked when an event occurs Clock interrupts I/O interrupts Operating system calls and traps Signals

6 Types of Scheduling (Continue)
I/O Scheduling Decision as to which process’s pending I/O request shall be handled by available I/O device

7 Scheduling and Process State Transition

8 Scheduling Criteria CPU utilization Throughput Turnaround time
Waiting Time Response time

9 Scheduling algorithms
First-Come-First-Served (FCFS) Each process joins the Ready queue When the current process ceases to execute, the oldest process in the Ready queue is selected 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

10 Scheduling algorithms (continue)
Round-Robin Uses preemption based on a clock An amount of time is determined that allows each process to use the processor for that length of time

11 Scheduling algorithms (continue)
Priorities of Scheduling Scheduler will always choose a process of higher priority over one of lower priority Have multiple ready queues to represent each level of priority Lower-priority may suffer starvation allow a process to change its priority based on its age or execution history

12 Scheduling algorithms (continue)
Shortest Process Next Non preemptive policy Process with shortest expected processing time is selected next Short process jumps ahead of longer processes 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

13 Scheduling algorithms (continue)
Feedback Scheduling Process is demoted to the next lower-priority queue each time it returns to the ready queue Longer processes drift downward To avoid starvation, preemption time for lower-priority processes is longer

14 Scheduling algorithms (continue)
Multiprocessor Thread Scheduling Load sharing processes are not assigned to a particular processor Gang scheduling a set of related threads is scheduled to run on a set of processors at the same time Determined processor assignment threads are assigned to a specific processor Dynamic Scheduling number of threads can be altered during course of execution

15 Scheduling algorithms (continue)
Real-Time Scheduling Static table-driven determines at run time when a task begins execution Static priority-driven preemptive traditional priority-driven scheduler is used Dynamic planning-based Dynamic best effort

16 References Operating systems: internals and Design Principles, third Edition by William Stallings


Download ppt "OverView of Scheduling"

Similar presentations


Ads by Google