scheduling

11
PROCESS SCHEDULING BY: JASDEEP KAUR

Upload: jasscheema

Post on 06-May-2015

498 views

Category:

Education


4 download

TRANSCRIPT

Page 1: Scheduling

PROCESS SCHEDULING

BY: JASDEEP

KAUR

Page 2: Scheduling

Process Scheduling

CPU scheduling is to basis of multi-programmed operating systems. In a single-processor system , only one process can run at a time until the CPU is free and can be rescheduled.The objective of multiprogramming is to have some process running at all times. To maximum CPU utilization.

Page 3: Scheduling

A process is executed until it must wait typically for completion of I/O. In a simple computer system, the CPU then just sits idle. All the waiting time is wasted as no useful work is done. With multiprogramming we try to use this time productivity. Several processes are kept in the memory at one time. When one process has to wait . The operating system takes away CPU and give it to another one.

Page 4: Scheduling

Whenever the CPU becomes idle, the OS must select one of the processes in the ready queue to be executed. This is done by short term scheduler. Scheduler uses various scheduling algorithms, To select process from ready queue and let it to be executed.

CPU Scheduler

Page 5: Scheduling

CPU utilization Throughput Turn around time Waiting time Response time It is desirable to maximize CPU utilization

and throughput and to minimize turnaround time, waiting time and response time.

SCHEDULING CRITERIA

Page 6: Scheduling

Preemptive scheduling Non-preemptive scheduling

SCHEDULING CATEGORIZATION

Page 7: Scheduling

First- Come, First –Served Scheduling. Shortest Job First Scheduling. Priority Scheduling. Round Robin Scheduling.

SCHEDULING ALGORITHMS

Page 8: Scheduling

The process that requests the CPU first is allocated CPU first.

Simplest of all. Non-preemptive in nature.

First-Come,First –Served Scheduling

Page 9: Scheduling

When the CPU is available , it is assigned to the process having smallest CPU burst.

SJF is optimal. Can be preemptive or non-preemptive.

Shorest Job First Scheduling

Page 10: Scheduling

A priority is associated with each process and CPU is allocated to the process having highest priority.

Can be preemptive or non-preemptive. Suffers from problem of starvation.

Priority Scheduling

Page 11: Scheduling

Is used in time shared systems. A small unit of time, called as time quantum

is defined(10-100 ms). The ready queue is treated as circular

queue and CPU scheduler goes around it ,allocating CPU to each process for a tome interval upto one quantum.

Round Robin Scheduling