The following differences were identified between the SRJN and FCFS scheduling algorithm.
FCFS executes processes based on the order in which they arrive the processor, the process that requests the CPU first is allocated the CPU first while SRJN executes the processes in accordance with the task that has the shortest time to execute when compared with the other processes.
In SRJN, the duration time of all the tasks needs to be identified in advance while this is not required in FCFS.
The average waiting time is higher in FCFS than in SRJN because in FCFS, shorter tasks could be made to wait for longer time if they arrive the CPU late, thereby increasing the overall average wait time. In SRJN, the shortest tasks are completed before the longer ones, thereby reducing the average wait time.
SRJN is preemptive by releasing the CPU to the next shortest process while in the BLOCKED state while FCFS is non-preemptive.
The following are identified as differences between RR and SRJN
SRJN only takes into account the task with the shortest time required to complete while RR takes into account the order in which the processes arrives while at the same time giving each process a time slice so that the current process do not have to be completed before the next one can run.
RR uses a time slice for each process while SRJN does not.
During CPU intensive processes, the current task must be completed before the next one can run in SRJN; but in RR all tasks are given equal time to run and moves to the nest process even though the current one may not be completed.
In SRJN, there is a fore knowledge of the runtime of each of the processes which it uses to determine the next process to execute; there is no previous knowledge of the runtime in RR.
When SRJN is undergoing an IO operation, it becomes more efficient than RR by considering the job that takes the shortest time to complete while RR does not consider.
The average wait time of RR is higher than that of SRJN because RR tends to make all processes to spend an equal amount of time in the system at the expense of an increased average wait time.
When undergoing only CPU intensive processes, SRJN becomes faster than RR because the context switch time introduced in RR increases the elapsed time.
SRJN has the potential of starving longer tasks so that they do not get the chance to run if a job with a considerable shorter time is continuously added.
The following are identified as differences between SJF and SRJN
The wait time for each of the processes in SRJN is generally shorter than that of SJN, consequently, a lower average wait time is experienced by SRJN.
The total time for each of the processes in SRJN is shorter than that in SJN.
SRJN is preemptive because it releases the CPU to the next shortest process while in the BLOCKED state but SJN is non-preemptive (the current process has to complete before the next one can take over).
No comments:
Post a Comment