STMJOURNALCPUSCHEDULING

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333079926

A Comparative Study of Various CPU Scheduling Algorithms using MOOS


Simulator

Article · January 2018

CITATIONS READS

5 7,415

4 authors, including:

Nilam Choudhary Yukti Goswami


Swami Keshvanand Institute of Technology Management and Gramothan (SKIT) JECRC Foundation
23 PUBLICATIONS   33 CITATIONS    1 PUBLICATION   5 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Smart Voting System Through Facial Reorganization View project

DIGITAL MARKETING CHALLENGE AND OPPORTUNITY WITH REFERENCE TO TIKTOK-A NEW RISING SOCIAL MEDIA PLATFORM View project

All content following this page was uploaded by Nilam Choudhary on 14 May 2019.

The user has requested enhancement of the downloaded file.


Journal of Advances in Shell Programming
ISSN: 2395-6690 (Online)
Volume 5, Issue 3
www.stmjournals.com

A Comparative Study of Various CPU Scheduling


Algorithms using MOOS Simulator
Nilam Choudhary1,*, Geetika Gautam1, Yukti Goswami2, Soumil Khandelwal2
1
Associate Professor, Computer Science and Engineering, Jaipur Engineering College & Research
Centre, Jaipur, Rajasthan, India
2
Student, Computer Science and Engineering, Jaipur Engineering College & Research Centre, Jaipur,
Rajasthan, India

Abstract
Current study represents the implementation of a various scheduling algorithms and
developing CPU scheduling algorithms. Examining their impact in practice can be difficult as
well as time consuming because of the need to modify their test operating system kernel code
and measure the resulting performance on a consistent workload of real applications. As
processor is the important resource, CPU scheduling becomes very important in accomplishing
the operating system (OS) design goals. The intention should be allowed as many as possible
running processes at all times in order to make best use of CPU. This study presents a state
diagram that depicts the comparative study of various scheduling algorithms using simulator
for a single CPU and shows which algorithm is best for the particular situation. Using this
representation, it becomes much easier to understand what is going on inside the system and
why a different set of processes is a candidate for the allocation of the CPU at different times.
The objective of the study is to analyze the highly efficient CPU scheduler on design of the
high-quality scheduling algorithms which suits the scheduling goals.

Keywords: Scheduler, state diagrams, CPU utilization, performance, TAT

*Author for Correspondence E-mail: neelamvit@gmail.com

INTRODUCTION routing of data in networking and in all types


In a single-processor system, only one process of traffic control systems like airways,
can run at a time; any others must wait until roadways, railways etc. [6]. Scheduling is the
the CPU is free and can be rescheduled. The strategy by which jobs or processes are given
objective of multiprogramming is to have access to the system resources. By that the
some process running at all times, to maximize system, loads are managed efficiently, or
CPU utilization [1]. Scheduling is a quality of service is achieved [7]. The MOSS
fundamental operating-system function. simulator for scheduling is a tool or an
Almost all computer resources are scheduled application designed to analyze the
before use. The CPU is, of course, one of the performance of different scheduling
primary computer resources. Thus, its algorithms. The data analyzed is represented in
scheduling is central to operating-system a statistical manner for better understanding of
design. CPU scheduling determines which algorithms.
processes run when there are multiple
runnable processes. CPU scheduling is RELATED WORK
important because it can have a big effect on Over the years many researchers have
resource utilization and the overall concluded that making a combination of more
performance of the system [2]. CPU than one scheduling algorithm improves
scheduling means process assigned to CPU for system performance [8]. Neetu et al. have
a particular time of interval. We know that represented a state diagram which describes
scheduling avoids starvation of each job the comparative study of several scheduling
within CPU, also assigning of processes to algorithms based on performance of single
CPU is done by scheduler [3–5]. Scheduling is CPU and illustrate which algorithm is best
also used in real time applications such as suitable for the particular situation [9].

JoASP (2018) 1-5 © STM Journals 2018. All Rights Reserved Page 1
Comparative Study of CPU Scheduling Algorithms Choudhary et al.

Another paper which closely corresponds with principle of FIFO (First in First out). FCFS is
current paper is by Ankur et al. [10]. non-preemptive in nature and will have
Comparison of existing scheduling algorithms negligible number of context switches among
is based on seven parameters which are the process; that means once the process is
namely: allocation, application, complexity, scheduled on CPU it will not switch to
waiting time, usability, preemption and types different process until its full completion. In
of system. Their observation concluded that this perspective, a waiting queue is formed of
not one algorithm is enough to satisfy all the the processes which are started in after some
seven basic parameters and suggested need for time. They are pushed into the queue from the
improvement. rear node as they are submitted [11].

METHODOLOGY Shortest Job First Scheduling (SJFS)


Scheduling Criteria This scheduling algorithm apparently produces
Performance of various scheduling algorithms minimum amount of process average waiting
is judged upon several criteria. Different time and turnaround time. For minimizing
algorithms may favor different types of response time, this algorithm is used. Total
processes: time taken by a process from its arrival to its
• CPU Utilization: Amount of time till CPU completion; while the amount of time a
remains totally busy. process waits in the ready queue is waiting
time in SJF. The average waiting time is
• Throughput: Processes which complete
minimized because it executes the processes
their execution per unit time.
with less burst time before it takes the
• Burst Time: Time required for execution prominent ones [12].
of a process.
• Completion Time: Time when process Round Robin Scheduling (RRS)
completes their execution. This algorithm is specially designed for time
• Turnaround Time: Required time to execute sharing system. This algorithm is usually taken
a particular process. It is denoted by: into action in the case of multiprogramming or
multitasking systems. A particular time frame
Turnaround Time: Completion Time – Arrival is provided to each system and computer
Time. resources are shared among them. It is similar
• Waiting Time: Waiting time of process in to FCFS, but preemption is added to switch
waiting queue. It is denoted by: between processes.

Waiting Time: Turnaround – Burst Time. Priority Scheduling (PS)


• Response Time: Amount of time from the In this scheduling algorithm, each process is
submission of a request until the first assigned some priority, and then processes are
response is produced. executed according to their priority first, while
processes with equal priorities are executed
Optimization Criteria according to FCFS algorithm [13]. A priority
The throughput time and the CPU utilization number is assigned with each process. Each
need to be maximized, whereas waiting time, process is allocated to the CPU with number
response time and turnaround time need to be that assigns some priority which means
minimized. smaller the number, higher the priority, larger
• Maximum CPU Utilization; the number, lower the priority. Some of the
• Maximum Throughput; examples of various scheduling (Example 1):
• Minimum Turnaround Time;
• Minimum Waiting Time; and Example 1:
Process Burst Time (ms) Arrival Time Priority
• Minimum Response Time.
P1 10 0 2

SCHEDULING ALGORITHMS P2 3 1 3
First Come First Serve Scheduling (FCFS) P3 9 2 1
First come first serve, this is the most basic P4 4 3 4
scheduling algorithm and based on the Quantum Time =4 ms.

JoASP (2018) 1-5 © STM Journals 2018. All Rights Reserved Page 2
Journal of Advances in Shell Programming
Volume 5, Issue 3
ISSN: 2395-6690 (Online)

Table 1: FCFS (First Come First Serve) Gantt comparative analysis of average waiting time
Chart. and average turnaround time respectively.
P1 P2 P3 P4
0 10 13 22 26 Table 5: Waiting Time for Each Process and
Average Waiting Time for Each Scheduling.
Table 2: SJF (Shortest Job First) Gantt Chart. Properties Process FCFS SJF RR Priority
P1 P2 P4 P1 P3 P1 0 7 15 9
0 1 4 8 17 26 P2 9 0 3 18
Waiting Time
P3 11 15 15 0
Table 3: Round Robin Scheduling Gantt P4 19 0 7 18
Chart. Average
P1 P2 P3 P4 P1 P3 P1 P3 9.75 5.5 10 11.25
Waiting Time
0 4 7 11 15 19 23 25 26
Table 6: Turnaround Time for Each Process
Table 4: Priority Scheduling Gantt Chart. and Average Turnaround Time for Each
P1 P3 P1 P2 P4 Scheduling.
Properties Process FCFS SJF RR Priority
0 2 11 19 22 26
P1 10 17 25 19
P2 12 3 6 21
Figures 1 and 2 depict the comparative waiting Turnaround Time
P3 20 24 24 9
time and turnaround time respectively. In P4 23 4 11 22
continuation, Figures 3 and 4 show the Average TAT 16.25 12 16.5 17.75

Fig. 1: Waiting Time Chart

Fig. 2: Turnaround Time Chart.

JoASP (2018) 1-5 © STM Journals 2018. All Rights Reserved Page 3
Comparative Study of CPU Scheduling Algorithms Choudhary et al.

Fig. 3: Average Waiting Time Chart.

Fig. 4: Average Turnaround Time Chart.

CONCLUSION overhead, high throughput, medium


In this study, we have presented the entire turnaround and medium response time. RR has
scheduling algorithm by their Gantt chart the high CPU overhead, medium throughput,
followed by Tables 1–4 for calculating the medium turnaround time and high response
waiting time (Table 5) and turnaround time time. Priority scheduling has the medium CPU
(Table 6) and average waiting time and overhead, low throughput, high turnaround
average turn around for each scheduling time and high response time; so shortest job
algorithm. Figures 1 and 2 show the results in first scheduling algorithm performance is
graphical format. Figure 3 depicts the results better as compared with others.
of average waiting time and Figure 4 depicts
the results of average turnaround time, and we REFERENCES
concluded that SJF is the best scheduling 1. Sukumar Babu Bandarupalli, Neelima
algorithm because for long process it tends to Priyanka Nutulapati. A Novel CPU
result in increased waiting time. The FCFS has Scheduling Algorithm-Preemptive and
low throughput and response time and high Non-Preemptive. IJMER. Nov–Dec 2012;
turnaround time. SJF has the medium CPU 2(6): 4484–4490p.

JoASP (2018) 1-5 © STM Journals 2018. All Rights Reserved Page 4
Journal of Advances in Shell Programming
Volume 5, Issue 3
ISSN: 2395-6690 (Online)

2. Raman, Pardeep Kumar Mittal. An Hard-Real-Time Environment. J ACM. Jan


Efficient Dynamic Round Robin CPU 1973; 20(1): 46–61p.
Scheduling Algorithm. IJARCSSE. May 9. Neetu Goel, Garg RB. A Comparative
2014; 4(5): 906–910p. Study of CPU Scheduling Algorithms.
3. Silberschatz Abraham, Peter Galvin, Greg International Journal of Graphics &
Gagne. Operating Systems Concepts with Image Processing (IJGIP). Nov 2012;
Java. 7th Edn. John Wiley & Sons; 2004. 2(4): 245–251p.
4. Lingyun Yang, Schopf Jennifer M, Ian 10. Ankur B, Rachhpal S, Gaurav.
Foster T. Conservative Scheduling: Using Comparative Study of Scheduling
Predicted Variance to Improve Scheduling Algorithms in Operating System.
Decisions in Dynamic Environments. International Journal of Computers and
Proceedings of the ACM/IEEE SC2003 Distributed Systems. Apr–May 2013; 3(1).
Conference (SC) 1-58113-695-1/03 $ 11. Saleem U, Muhammad Younus Javed.
17.00 © 2003 ACM. Simulation of CPU Scheduling
5. Abbas Noon, Ali Kalakech, Seifedine Algorithms. In TENCON Proceedings,
Kadry. A New Round Robin Based IEEE. 2000; 2: 562–567p.
Scheduling Algorithm for Operating 12. Lupetti, Simone, Dmitrii Zagorodnov.
Systems: Dynamic Quantum Using the Data Popularity and Shortest-Job-First
Mean Average. IJCSI. May 2011; 8(3)(1): Scheduling of Network Transfers. In
224–229p. Digital Telecommunications ICDT,
6. Imran Qureshi. CPU Scheduling International Conference on, IEEE. 2006;
Algorithms: A Survey. Int J Advanced 26–26p.
Networking and Applications (IJANA). 13. Neeraj Kumar, Nirvikar. Performance
2014; 05(04): 1968–1973p. Improvement Using CPU Scheduling
7. Mostafa Samih M, Rida SZ, Hamad Algorithm. IJETTCS. Mar–Apr 2013;
Safwat H. Finding Time Quantum of 2(2): 110–113p.
Round Robin CPU Scheduling Algorithm
in General Computing Systems Using
Integer Programming. International Cite this Article
Journal of Research and Reviews in Nilam Choudhary, Geetika Gautam, Yukti
Applied Sciences (IJRRAS). 2010; 5(1): Goswami, et al. A Comparative Study of
64–71p. various CPU Scheduling Algorithms using
8. Liu CL, Layland James W. Scheduling MOOS Simulator. Journal of Advances in
Algorithm for Multiprogramming in a Shell Programming. 2018; 5(3): 1–5p.

JoASP (2018) 1-5 © STM Journals 2018. All Rights Reserved Page 5

View publication stats

You might also like