(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 7, October 2010
calculated and assigned to each process. On the basis of thattime quantum, processes are executed one after another. If time quantum expires, CPU is taken from the processesforcefully and assigned to the next process; the preemptedprocesses are put at the end of the ready queue .SJRR is provides fair share to each process and is useful intime sharing systems. It provides minimum average time andaverage turnaround time . The problem with this algorithmis that if calculated time quantum is too small then there isoverhead of more context switches.III.
In this algorithm, a new factor F is calculated that isaddition of two basic factors (arrival time and burst time of theprocesses). Here is the equation that shows this relation:F= Arrival Time + Burst TimeThis factor F is assigned to each process and on the basisof this factor processes are arranged in ascending order in theready queue. Processes having highest value of the factor areexecuted first and those with lowest value of the factor areexecuted next. Depend on this new factor CPU executes theprocess that:
Has shortest burst time
Submit to the system at startProposed CPU scheduling algorithm reduces waiting time,turnaround time and response time and also increases CPUutilization and throughput. It has resolved the problem of starvation at much more extent and there is no problem of context switching in this algorithm.The working of the proposed algorithm is as given below:1.
Take list of processes, their burst time and arrivaltime.2.
Find the factor F by adding arrival time and bursttime of processes.3.
On the basis of factor, arrange processes and theirrelative burst time in ascending order using anysorting technique.4.
Calculate waiting time of each process.5.
Iterate through the list of processesa.
Add total waiting time with waiting time of each process to find total waiting timeb.
Add burst time and waiting time of eachprocess to find turnaround timec.
Add total turnaround time and turnaround timeof each process to find total turnaround time6.
Average waiting time is calculated by diving totalwaiting time with total number of processes.7.
Average turnaround time is calculated by dividingtotal turnaround time with total number of processes.IV.
0 to processF[i]
atime[i] + btime[i]For i
process-1 to 0For j
1 to processIF F [j-1] > F[j]f
1 to countwtime[j]
btime [j-1] + wtime [j-1]For j
0 to processtw_time
tw_time + wtime[j]tatime[j]
b[j] + wtime[j]total_ tatime
tw_time / processavg_tatime
To explain the performance of proposed schedulingalgorithm and to compare its performance with theperformance of existing algorithms; consider the following setof processes along with their burst time, arrival time inmilliseconds and priority in numbers as shown in the Table 1:
Table 1: Set of Processes