Friday 13 November 2015

SCHEDULING: An Introduction

When you learn to quit, it becomes a habit.
-Vince Lombardi

SCHEDULING: An Introduction

‘Schedule’ in literal sense means plan for something to happen at a particular time, but in the terms of operating system ‘Schedule’ or ‘Scheduling’ means to manage or to plan the process such that it has minimum utilization of Central Processing unit(CPU).

The policies which are used for scheduling are called ‘Scheduling Policies’ (or disciplines).

1.1 Workload Assumptions

Here we will make some assumptions that will be implied as we move further.The assumptions we make are:-

1)All processes/workload run for same amount of time.
2)Each Process start at the same time.
3)When run each process runs to its completion.
4)Each process uses CPU.
5)The run time of each process is known.

1.2 Scheduling Metrices

A ‘Metric’ is something used to measure something.

Let me introduce you to our first metric i.e. Turnaround time.

The formula for Turnaround time is as follows:

T(turnaround)= T(completion)-T(arrival)

where, T(turnaround)= Turnaround time
T(completion)= Completion Time
T(arrival)= Arrival Time

Since, as we stated in our assumption no. 2 i.e.:-
Each process start at the same time, so,
T(arrival)= 0 seconds (for every process)

So, the above equation becomes,

T(turnaround)= T(completion)- T(arrival)
T(turnaround)= T(completion) - 0
T(turnaround)= T(completion)

This equation will be applicable for further tutorials.

‘Turnaround time’ and another term called ‘fairness’ are two main point of focus in scheduling processes.

Since, we already discussed ‘Turnaround time’, it’s time for our new term ‘Fairness’.
So, what does ‘Fairness’ in terms of Scheduling means. Here, the term ‘Fairness’ means increasing performance by running one process/job to its fullest and restricting others.