Shortest job first (SJF)
With SJF, the operating system always chooses the shortest job to execute first. The merit of this plan
is that such a scheme will insure the minimum average turnaround time and the maximum average throughput
(in terms of jobs per hour).
The challenge is to know in advance which job is the shortest! The usual solution to this problem of
estimation is to require the user to declare the maximum execution time of the job. Since shorter jobs get
executed first, the user is motivated to provide an estimate that is only as large as necessary. However, if the job
exceeds the estimate provided by the user, the job is simply terminated, and the user learns to estimate more
accurately in the future.
Shortest remaining job first (SRJF)
SRJF is a preemptive version of SJF. When a new process becomes ready, the operating system inspects
both the newly ready process and the currently executing process, and chooses the process with the least time
remaining to run. If the new process will complete more quickly than the one that was interrupted, the new
process is scheduled to execute.
Round robin (RR)
Round robin scheduling is frequently used in interactive systems. As the name implies, each process is
given a share of time with the CPU, and then the next process gets a turn.
Pages:
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313