Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson Objectives Aims Key Words

Similar presentations


Presentation on theme: "Lesson Objectives Aims Key Words"— Presentation transcript:

1 Lesson Objectives Aims Key Words
Be able to describe how processes are scheduled in an operating system. Give examples of different scheduling algorithms Key Words round robin, first come first served, multi-level feedback queues, shortest job first, shortest remaining time.

2 The kernel contains three important features:
Memory Manager Process Scheduler File Manager

3 The Process Scheduler The scheduler determines how programs access CPU time. As we’ve seen previously, this can be affected by, and must take into account the effect of Interrupts Running more than one process at a time is called multitasking. Without a process scheduler, you cannot create a multi-programming or multi-tasking system.

4 Scheduling issues A process is not constantly running. It can be in one of three states, or terminated (ended)

5 Process states Running - the CPU is actually executing the process. Only one process can be running at a time (per core) Ready - the process is loaded into memory and runnable, but is not actually running; the CPU is doing something else. These processes are in the Ready Queue, although the data structure which contains these may not be a simple queue (owing to the algorithm used!). Blocked - the process is not runnable because it is waiting for an event to occur. The usual event is that it is waiting for an I/O operation to complete.

6 Already there is a need for any scheduling algorithm to maximise CPU utilisation by:
Not allowing a ready process to occupy the CPU in an idle state To prioritise “ready” tasks How long have they been waiting? What priority do they have?

7 Problems Any scheduling algorithm should:
minimise starvation (ensure ALL processes WILL run and are not constantly superseded by higher priority processes) eliminate deadlock (deadlock occurs when a process is waiting for a resource that never becomes available) ensure efficiency of process execution ensure that all processes have an opportunity to execute.

8 Task – fill in the table Algorithm Description
Potential Advantages / Disadvantages Round Robin All processes are given an equal time slice of CPU time, regardless of priority. All processes are guaranteed service. However, important processes may lack necessary processing time – could lead to inefficient running of the system. Time critical processes may not complete in time. First Come, First Serve (FCFS) Shortest Remaining Time (SRT) Shortest Job First

9 Question What is a “Multi-level Feedback Queue” and what is its role in process scheduling?

10 Review/Success Criteria
You should know: What states processes can be in Problems that scheduling algorithms need to overcome Features of a good scheduler Four different scheduling algorithms


Download ppt "Lesson Objectives Aims Key Words"

Similar presentations


Ads by Google