Objectives of OS
Operating system is a resource manager. Its main job is to manage resources efficiently.
1. Average waiting time has to be small (throughput must be large)
This is for background jobs. Let at t = 0 , 10 jobs have gone in
Throughput : is the no. of jobs that come out at the end of a given interval.
If avg. waiting time is small then throughput is large.
To achieve large throughput, resources need to be kept busy.
Example that achieves 1st objective :
Situation I Situation II
P1 20 min. 10 min.
P2 30 min. 65 min.
P3 40 min. 15 min.
In both situations, avg. waiting time = 30 min.
However, there is a wide variation in waiting time in the 2nd situation, which is not preferable.
2. Minimize the maximum waiting time (this is for foreground jobs)
Situation III waiting time
P1 30 min.
P2 40 min.
P3 35 min.
Here the avg. waiting time is more than 30 min. So, although throughput is high but it achieves (2nd) objective i.e. minimize the maximum waiting time.
It may not be possible to achieve both the objectives (1) & (2)
- Foreground jobs are mostly run in time sharing mode.
- Background jobs are mostly run in batch processing mode ( A group of jobs are collected and then run)