wfergferg
one process is ready tocompletion of the process execution. CPU objective of this scheduler
PU
scheduling algorithms mainly depends quantum is too large; it will give poor
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 7, October 2010
process. On the basis of thattime quantum, processes are executed one after another. If time quantum expires, CPU is taken from the processesforceful
ly and assigned to the next process; the preemptedproces ses are put at the end of the ready queue [7].SJRR is provides fair share to each process and is
useful intime sharing systems. It provides minimum average time andaverage turnaround time [7]. The problem with this algorithmis that
if calculated time quantum is too small then there isoverhead of more context switches.III. P
ROPOSED
CHEDULING
LGORITHM
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:
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
ODE
0temp
0total_tatime
0.0tw_time
0.0avg_wt
0.0avg_tatime
0.0For i
0 to processF[i]
atime[i] + btime[i]For i
process-1 to 0For j
F[j-1]F [j-1]
F[j]F [j]
f temp
btime[j-1]btime[j1]
btime[j]btime[j]
tempptemp
proname[j1]proname[j-1]
proname [j]proname[j]
ptempwtime [1]
0For j
1 to countwtime[j]
0 to processtw_time
tw_time + wtime[j]tatime[j]
total_tatime+ tatime[j]avg_wt
tw_time / processavg_tatime
total_tatime/ process
V. E E
XPERIMENTAL VALUATION
& R
ESULTS
To explain the performance of proposed schedulingalgorit hm 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
20 6
P2
1 10
P3
2 3 2
P4
3 13 1
P5
4 10 4
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 7, October 2010
Proposed CPU scheduling algorithm was implementedwith existing CPU scheduling algorithms and performeddetaile d analysis by using
Deterministic Evaluation method.Following Gantt charts of each algorithms, average waitingtime and average turnaround time was obtained
0 10 12 21 24 29
0 2 5 10 19 29
Figure 3: Gantt chart for SJF
c.
0 8 10 18 21 26 28 29
0 9 11 21 24 29
Figure 5: Gantt chart for Priority Scheduling
e. SJRR Scheduling:
P2 P4 P5 P3 P1 P3 P1
0 2 5 10 15 20 24 29
Figure 6: Gantt chart for SJRR Scheduling
f.
0 2 5 10 20 29
Figure 7: Gantt chart for Proposed Combinatory Scheduling
B.
Waiting Time:Waiting Time of the process is calculated as the time takenby the process to wait for the CPU in the ready queue. From theGantt
chart of the proposed Combinatory Scheduling, it isobserved that waiting time for the processes P2, P4, P5, P1 &P3 is 0, 2, 5, 10 & 20 respectively and
the average waiting timeis (0+2+5+10+20) /5=7.4ms. Waiting Time for all otheralgorithms is calculated in the same way. Table 2 showswaiting
time of each process and average waiting time for eachscheduling algorithm.C. Turnaround Time:Turnaround Time of the
process is calculated as the intervalbetween the time of the submission of the process to the time of the completion of that process. From the Gantt
chart of theproposed Combinatory Scheduling, it is observed thatturnaround time for the processes P1, P2, P3, P4 & P5 is 20, 2,29, 5& 10
respectively and the average turnaround time is(20+2+29+5+1 0) /5=13.2ms. Turnaround Time for all otheralgorithms is calculated in the same way. Table
3 showsturnaround time of each process and average turnaround timefor each scheduling algorithm.
P1
0 19 18 11 19 10
P2
10 0 8 9 0 0
P3
12 10 20 0 15 20
P4
21 2 18 21 2 2
P5
24 5 21 24 5 5
Avg.WaitingTime
Table 2: Waiting Time of each process and Average WaitingTime for Each Scheduling Algorithm
P1
10 29 28 21 29 20
P2
12 2 10 11 2 2
P3
21 19 29 9 24 29
P4
24 5 21 24 5 5
P5
29 10 26 29 10 10
Avg.TurnaroundTime
19.2 13
22.8
18.8 14 13.2
Table 3: Turnaround Time of each process and AverageTurnaround Time for Each Scheduling Algorithm
42http://site s.google.com /site/ijcsis/I SSN 1947-5500
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 7, October 2010
simulated with C#.NET code and comparisons are madebetween the performance of proposed algorithm and existingalgorithm s. Graphical representation of
AlgorithmsFigure 9: Comparison of Turnaround Time of ProposedAlgorithm with Turnaround Time of Existing Algorithms
existingalgorithm s (Figure 2 to 7), it is noticed that waiting time,turnaround time and response time of the proposed algorithmsare smaller than
existing algorithms. The above two graphs inFigure 8 and 9 also represents that proposed schedulingalgorit hm is optimum as compared to
other existingschedulin g algorithms. Maximum CPU utilization andthroughput can also be obtained from proposed
schedulingalgorit hm.VI. C
ONCLUSION
proposed algorithm has successfully beaten the existingCPU scheduling algorithms. It provides good performance inthe scheduling
policy. As SJF is optimal scheduling algorithmbut for large processes, it gives increased waiting time andsometimes long processes will never
execute and remainstarved. This problem can be overcome by the proposedalgorith m. In future, the working of proposed algorithm willbe
OperatingSystem Concepts,Sixth Edition.[2] Andrew S. Tanenbaum, Albert S. Woodhull, Operating Systems Designand Implementation, Second Edition[3] Mohammed A. F. Husainy, Best-Job-
First CPU SchedulingAlgorithm , Information Technology Journal 6(2): 288-293, 2007, ISSN1812-5638[4] E. O. Oyetunji, A. E. Oluleye, Performance Assessment of Some CPUScheduling Algorithms,
Research Journal of Information Technology1(1): 2226, 2009, ISSN: 20413114[5] Sindhu M., Rajkamal R., Vigneshwaran P., "An Optimum MultilevelCPU Scheduling Algorithm," ACE, pp.90-94, 2010 IEEE
InternationalConferen ce on Advances in Computer Engineering, 2010[6] Milan Milenkovic, Operating System Concepts and Design,McGRAWHILL, Computer Science Series, Second Edition.[7]
Saeeda Bibi, Farooque Azam, Sameera Amjad, Wasi Haider Butt, HinaGull, Rashid Ahmed, Yasir Chaudhry An Efficient SJRR CPUScheduling Algorithm International Journal of Computer Science andInformation
Security, Vol. 8, No. 2,2010[8] Maj. Umar Saleem Butt and Dr. Muhammad Younus Javed, Simulationof CPU Scheduling Algorithms,0-780363558/00/$10.00@2000 IEEE.[9]
Rami J. Matarneh, Self Adjustment Time Quantum in Round RobinAlgorithm Depending on Burst Time of the Now Running Processes,American Journal of Applied Sciences 6(10): 18311-1837, 2009, ISSN1546-9239[10]
Gary Nutt, Operating Systems, A Modern Perspective, Second Edition[11] Andrew S.Tanenbaum, Albert S. Woodhull A Modern OperatingSystem, Second Edition[12]
Md. Mamunur Rashid and Md. Nasim Adhtar, A New Multilevel CPUScheduling Algorithm, Journals of Applied Sciences 6(9): 20362039,2009. 43http://site s.google.com /site/ijcsis/I SSN 1947-5500