Scheduling Algorithms For CPU
Scheduling Algorithms For CPU
ISSN: 2509-0119.
© 2021 International Journals of Sciences and High Technologies
http://ijpsat.ijsht‐journals.org Vol. 27 No. 1 June 2021, pp.458-463
Abstract – The process scheduling, is one of the most important tasks of the operating system. We present in this paper some types of
scheduling algorithms of CPU. One of the most common scheduling algorithms used by the most operating systems is the Round Robin
method in which, the ready processes waiting in ready queue, seize the processor for a short period of time known as the quantum (or
time slice) circularly. But the most important issue in RR algorithm, which highly affects its efficiency. It determines the amount of the
time quantum. Assigning very small and very large values for this parameter, will lead to performance decrease due to increasing context
switching overhead, and degradation of the RR method to FCFS algorithm consequently. We will suggest a solution of allocated time
quantum.
I. INTRODUCTION
Central processing unit (CPU) scheduling is the mechanism by which operating systems (OS) allocate the CPU resources to
processes. Scheduling is required for multiprogramming, and it is one of the fundamental of OS activities (Aas, 2005). [1]
The operating system (OS) is the most important program needed for starting up. Managing the tasks each of which are
performed by one of the management units. The process management, is one of these management units, allocates the processor to
the processes using several allocating algorithms. The scheduling criterion is to give fairness to each process and to provide
efficiency in CPU usage. One of the most common algorithms in processor allocation is the Round Robin (RR) algorithm in which,
the ready processes waiting in ready queue, are dispatched sequentially and allocate the processor for certain period of time known
as time quantum (q) or time slice. If a process is finished during its time quantum, releases the processor, otherwise the processor
is pre-empted by the OS and is allocated to the next ready process waiting in front of the ready queue and the current process will
be moved to the end of the this queue . The value of the quantum parameter is selected in 10-100 milliseconds range [2]. Each value
will lead to a specific performance and will affect the algorithm's efficiency by affecting the processes' waiting time. In this paper
we proposed new method to solve problem by allocating time quantum in Round Robin process algorithm to minimize the average
waiting time of the processes. The content of the paper is organized as the follows: In section 2, previous works. In section 3 basic
concepts of scheduling. Section 4 presents the scheduling algorithms which is being the main section of this paper. In section 5, we
described the proposed model, and section 6, covers summary and conclusions.
II. PREVIOUS WORKS
The importance of the problem has already raised the attention of the researchers and study in this field still continues. Some
more important works are listed below:-
Albielmona [4] did an overall review over many scheduling algorithms. Proportional share scheduling algorithm proposed is
combining the small overhead of the RR method by protecting the short processes. [5] The capability of re-adjusting the weights
enables the algorithm to have a more fair behavior. Nieh et al. [6] proposed a new scheduling algorithm known as Virtual Time
Suppose that the processes arrive in the order: P1, P2, P3. The Gantt chart for the schedule is:
Waiting time for P = 0; P2 = 24; P3 = 27 Average waiting time:
(0 + 24 + 27) / 3 = 17 (milliseconds)
1.2 Shortest-Job-First Scheduling (SJF)
Associate with each process the length of its next CPU burst. We use these lengths to schedule the process with the shortest
time.
Below are two schemes of (SJF):
Non-preemptive: once CPU given to the process it cannot be preempted until completes its CPU burst.
Table 6. RR method
P1 53
P2 17
P3 68
P4 24
Table (8) shows the average Waiting Time for the proposed model as (0+17+41+94) / 4 = 152 / 4=38.
By combining between RR method and the proposed method we get that the average waiting time diminish in the last method,
and this decline returns to dividing the queue of ready processes into two queues Q1 for short processes and Q2 for long processes,
and duplicated time quantum of Q2.
VI. CONCLUSIONS
The main goal of the CPU scheduling is distribution of the CPU time among the ready processes, and to give fairness to each
process. Also, to provide efficiency in CPU usage. In this paper, we proposed new model developed to solve the problem. By
allocated time quantum in Round Robin process to minimize the average waiting time of the processes.
REFERENCES
[1]. W. Stallings, Operating Systems: Internals and Design Principles. 6th Edition, Prentice Hall, 2008.
[2]. M. Fahimi, Operating Systems, vol. 1, 1st Edition, Tehran: Jelve Publishing, 1992.
[3]. Aas, J. (2005). Understanding the Linux 2.6.8.1 CPU Scheduler, Silicon Graphics Inc, Mountain View, CA.
[4]. R. Abielmona, "Scheduling Algorithmic Research", Department of Electrical and Computer Engineering, Ottawa-Carleton
Institute, 2000.
[5]. T. Helmy, and A. Dekdouk, "Burst Round Robin: As a Proportional-Share Scheduling Algorithm", IEEE, Proceedings of
the fourth IEEE-GCC Conference on towards Techno-Industrial Innovations, pp. 424-428, 2007.
[6]. J. Nieh, Ch. Vaill, and H. Zhong, "Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler." Proceeding of the
2001 USENIX Annual Technical Conference, USA, 2001.