Outline for 1/23/98


Avoidance - Banker’s Algorithm


Representing the State


Basic Outline of Algorithm

if (request[i,j] > avail[j]) defer;
//Sufficient resources for request
//pretend to grant request
avail[j] = avail [j] - request [i,j];
alloc[i,j] = alloc[i,j] + 	request [i,j];
need[i,j] = need[i,j] - 	request [i,j];
if (safe state) grant; else defer;

Processor Scheduling


Goals of Scheduling Policy

Improve performance in terms of one of these measures:

Other goals:


Multiprogramming as a Utilization Issue

Overlap of computation and I/O

Determine mix and multiprogramming level (kind and number of processes competing) in order to “cover” the idle times caused by I/O


Flavors of Scheduling


Scheduling Algorithms


SJF


Round Robin


Manipulating Priorities


Multilevel Queues