Revamped Round Robin Scheduling Algorithm

Similar documents
Design and Performance Evaluation of a New Proposed Shortest Remaining Burst Round Robin (SRBRR) Scheduling Algorithm

COMPARATIVE PERFORMANCE ANALYSIS OF MULTI-DYNAMIC TIME QUANTUM ROUND ROBIN (MDTQRR) ALGORITHM WITH ARRIVAL TIME

February 2011 Page 23 of 93 ISSN

Journal of Global Research in Computer Science

ENHANCING CPU PERFORMANCE USING SUBCONTRARY MEAN DYNAMIC ROUND ROBIN (SMDRR) SCHEDULING ALGORITHM

Dynamic Time Quantum based Round Robin CPU Scheduling Algorithm

Journal of Global Research in Computer Science

Improvising Round Robin Process Scheduling through Dynamic Time Quantum Estimation

An Improved Round Robin Approach using Dynamic Time Quantum for Improving Average Waiting Time

A NEW PROPOSED DYNAMIC DUAL PROCESSOR BASED CPU SCHEDULING ALGORITHM

EXTRA THRESHOLD IN ROUND ROBIN ALGORITHM IN MULTIPROCESSOR SYSTEM

Module 5: CPU Scheduling

Chapter 6: CPU Scheduling

CS 550 Operating Systems Spring CPU scheduling I

CPU scheduling. CPU Scheduling

International Journal of Advanced Research in Computer Science and Software Engineering

ENHANCING THE CPU PERFORMANCE USING A MODIFIED MEAN- DEVIATION ROUND ROBIN SCHEDULING ALGORITHM FOR REAL TIME SYSTEMS.

CPU Scheduling Exercises

DETERMINING THE VARIABLE QUANTUM TIME (VQT) IN ROUND ROBIN AND IT S IMPORTANCE OVER AVERAGE QUANTUM TIME METHOD

Determining the Optimum Time Quantum Value in Round Robin Process Scheduling Method

CPU Scheduling. CPU Scheduler

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

ODSA: A Novel Ordering Divisional Scheduling Algorithm for Modern Operating Systems

2/5/07 CSE 30341: Operating Systems Principles

Half Life Variable Quantum Time Round Robin (HLVQTRR)

Comp 204: Computer Systems and Their Implementation. Lecture 11: Scheduling cont d

CS 370. FCFS, SJF and Round Robin. Yashwanth Virupaksha and Abhishek Yeluri

CPU SCHEDULING RONG ZHENG

CPU Scheduling. Heechul Yun

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

ENHANCING THE CPU PERFORMANCE USING A MODIFIED MEAN- DEVIATION ROUND ROBIN SCHEDULING ALGORITHM FOR REAL TIME SYSTEMS

A new Hybridized Multilevel Feedback Queue Scheduling with Intelligent Time Slice and its Performance Analysis

TDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Last class: Today: Threads. CPU Scheduling

Scheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling

ENHANCED ROUND ROBIN ALGORITHM FOR PROCESS SCHEDULING USING VARYING QUANTUM PRECISION

Efficient Dual Nature Round Robin CPU Scheduling Algorithm: A Comparative Analysis

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

Season Finale: Which one is better?

TDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II

Improved Deadline Monotonic Scheduling With Dynamic and Intelligent Time Slice for Real-time Systems

Simulation of Process Scheduling Algorithms

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

Research Article Designing of Vague Logic Based 2-Layered Framework for CPU Scheduler

Scheduling. Uwe R. Zimmer & Alistair Rendell The Australian National University

Computing the Signal Duration to Minimize Average Waiting Time using Round Robin Algorithm

CSE 380 Computer Operating Systems

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times

Scheduling IoT on to the Cloud : A New Algorithm

LSN 15 Processor Scheduling

CHAPTER 5 - PROCESS SCHEDULING

process arrival time CPU burst time priority p1 0ms 25ms 3 p2 1ms 9ms 1 p3 20ms 14ms 4 p4 32ms 4ms 2

How to deal with uncertainties and dynamicity?

Embedded Systems Development

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

Real-Time Systems. Event-Driven Scheduling

D Praveen Kumar et al, / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (5), 2014,

Aperiodic Task Scheduling

Clock-driven scheduling

Real-Time Systems. Event-Driven Scheduling

Optimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors. Sanjoy K.

CIS 4930/6930: Principles of Cyber-Physical Systems

Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan

Multiprocessor Scheduling of Age Constraint Processes

Real-Time Scheduling and Resource Management

ANALYSIS AND TESTING OF DIFFERENT TIME QUANTUM FOR ROUND ROBIN ALGORITHM

Introduction to Queueing Theory

Performance Metrics for Computer Systems. CASS 2018 Lavanya Ramapantulu

Task Models and Scheduling

Real-Time Systems. Lecture #14. Risat Pathan. Department of Computer Science and Engineering Chalmers University of Technology

Networked Embedded Systems WS 2016/17

Analysis of Software Artifacts

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Andrew Morton University of Waterloo Canada

Process Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach

Task Reweighting under Global Scheduling on Multiprocessors

COVERT TIMING CHANNEL CAPACITY OF RATE MONOTONIC REAL-TIME SCHEDULING ALGORITHM IN MLS SYSTEMS

Embedded Systems 14. Overview of embedded systems design

3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions

PBS: A Unified Priority-Based CPU Scheduler

Analysis of Round-Robin Implementations of Processor Sharing, Including Overhead

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

CycleTandem: Energy-Saving Scheduling for Real-Time Systems with Hardware Accelerators

Introduction to Queueing Theory

NATCOR: Stochastic Modelling

On-line scheduling of periodic tasks in RT OS

Design of Real-Time Software

Design of Real-Time Software

EDF Feasibility and Hardware Accelerators

An Energy-efficient Task Scheduler for Multi-core Platforms with per-core DVFS Based on Task Characteristics

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

Real-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni

Resource Sharing in an Enhanced Rate-Based Execution Model

Real-Time Systems. LS 12, TU Dortmund

Real-Time and Embedded Systems (M) Lecture 5

AS computer hardware technology advances, both

Multi-Objective Scheduling Using Rule Based Approach

MICROPROCESSOR REPORT. THE INSIDER S GUIDE TO MICROPROCESSOR HARDWARE

AstroPortal: A Science Gateway for Large-scale Astronomy Data Analysis

Transcription:

Revamped Round Robin Scheduling Chhayanath Padhy, M.Tech Student, Government College of Engineering Kalahandi, Odissa, India Dillip Ranjan Nayak, Assistant Professor, Government College of Engineering Kalahandi, Odissa, India Abstract Round robin scheduling algorithm is widely used algorithm in time sharing systems. This is because it gives fair chance to every process in the queue. But the main disadvantage with this algorithm is that it has a fixed time quantum assigned for each process that results a larger number of context switching, larger amount of waiting time and turnaround time. In this paper, we have done some modification with the traditional round robin algorithm. The static time quantum is replaced with a dynamic time quantum calculation in every cycle to reduce the waiting time, turn-around time, number of context switching to make the algorithm more efficient and perform better in comparison with the traditional round robin scheduling algorithm. This paper presents a new CPU scheduling algorithm which shows that RRR performs better than RR algorithm in terms of reducing the number of context switches, average waiting time and average turnaround time.. Keywords: CPU Scheduling, Round Robin, switch, Waiting time, time. Introduction Operating system is an interface between end user and system hardware, so that the user can handle the system in a convenient manner. It controls and coordinates the use of the hardware among various application programs. Main goal of the scheduling is to maximize the different performance metrics such as CPU utilization, throughput and to minimize response time, waiting time and turnaround time. In Round Robin (RR) every process has equal priority and is given a static time quantum after which the process is preempted. Although RR gives improved response time and uses shared resources efficiently, its limitations are larger waiting time, larger turnaround time for processes with variable CPU bursts[4][5]. A. Preliminaries A program in execution is called a process. A processes is waiting to be assigned to a processor are put in a queue called ready queue. The time for which a process holds the CPU is known as burst time. The time at which a process arrives is its arrival time. Throughput: number of processes which complete execution per time unit (maximize). time (tat): total amount of time to execute a particular process (minimize).waiting time (wt): amount of time a process has been waiting in the ready queue (minimize). response time: amount of time it takes from when a request is submitted to when the response is produced (minimize); does not include the time for a response to be output In time sharing system, the CPU executes multiple processes by switching among them very fast. The number of times CPU switches from one process to another is called as the number of context switches (cs). B. Scheduling s The various well known CPU scheduling algorithms are First Come First Serve (FCFS), Shortest Job First (SJF), Highest Response Ratio Next (HRRN) and Priority. All the above four algorithms are non-preemptive in nature and are not suitable for time sharing systems. Shortest Remaining Next (SRTN) and Round Robin (RR) are preemptive in nature. RR is most suitable for time sharing systems. C. Related Work SARR algorithm [1] is based on a new approach called dynamic time- quantum, in which time quantum is repeatedly adjusted according to the burst time of the running processes was developed in the year 2009. C.Yashuwaanth [2] in November 2009 proposed a modified RR architecture which overcomes the limitations of simple RR and is suitable for the soft real time systems. The idea of algorithm[3] is to calculate dynamic time quantum by providing control of CPU to lowest burst time process first then highest burst time process present in the list and so on up to N th process. particular unit of time called time quantum, each and every process runs to the limit of the time quantum and the new processes are added to the tail of the ready queue.if the process has the burst time within the limit of the time quantum then that process is executed otherwise that process has to wait for its next cycle, this increases the number of context switches, average turnaround time as well as the average wait time [4] [5]. The Proportional Share Scheduling proposed by Helmy and Dekdouk [7] in November 2007 combines low overhead of round robin algorithms and favor shortest jobs. In the year 2000 Abielmona [6] provided an analytical overview of a myriad of scheduling algorithms. In [8] the author uses an approach by placing the burst time of the jobs in ascending order and then a combination of sorting followed by computation of the median to determine an optimal dynamic time quantum. www.borjournals.com Blue Ocean Research Journals 51

D. Contribution In this paper, we have improved the RR algorithm by taking the dynamic time quantum and the ordering of processes. As static time quantum is a limitation of RR algorithm, we have used the concept of dynamic time quantum. This concept reduces context switching, average waiting time and average turnaround time. E. Organization of the Paper Section 2 shows the proposed approach. Section 3 explains experimental analysis. The whole work and the future scope is discussed in section 4. 2. Proposed RRR In our proposed algorithm, the time quantum is taken as the sum of median and number of process present in the ready queue A. Uniqueness Of Our Approach In our algorithm, the jobs are sorted in ascending order of their burst time to give better turnaround time and waiting time. If time quantum is very small, it causes too many context switches. If it is very large, the algorithm leads to FCFS. So our algorithm solves this problem by taking a dynamic time quantum where the time quantum is repeatedly adjusted according to the remaining burst time of currently running processes. The median can be calculated using the following formulae [3] [8]. Median = Y (n+1)/2 ½ (Y n/2 + Y ((n/2) +1)) If n is odd If n is even Where, M = median, Y = number located in the middle of a group of numbers arranged in ascending order, n = number of processes in the ready queue. Then, the dynamic time quantum is calculated as follows: Dynamic (qt) = (Median + n) Proposed 1. Initialize cs=0, atat=0, awt=0 //Where cs=, atat=average turnaround time, awat=average waiting time 2. While (ready queue! =0) Sort the process in ascending order according to their burst time Find median Then qt= Median + n // where n= No. of remaining processes in ready queue // qt= quantum 3. Assign the qt to each process For each process i=1 to n Pi->qt 4. If a new process arrives or the rest burst time left in the ready queue Update the value of n and go to step2 [End while] 5. Calculate context switches (cs), average waiting time (awt), average turnaround time (atat) 6. Exit B.Illustration Let us consider the process burst time sequence be 10,40,30,20,50, Initially the burst time of all the processes were sorted in ascending order which resulted in sequence 10,20,30,40,50. Then the time quantum of the above burst time which was calculated to be 35 was assigned as the time quantum for all the processes. In the next step remaining burst time of each process was calculated after assigning the time quantum. After first loop the remaining burst time sequence for above processes changed to 0,0, 0,5,15. When a process completes its burst time, it gets deleted from the ready queue automatically. So in this case, the processes P1, P2 and P3 were deleted from the ready queue. Now the remaining burst time were sorted in increasing order and then the recalculated time quantum of these burst times was assigned to remaining process. After sorting the current burst time, the sequence was 5, 15 and the value of time quantum was 12. So 12 were assigned as the time quantum for remaining processes. After second loop the remaining burst time was calculated to be 3. As the only remaining process was P5, the dynamic time quantum 4 was given as the time quantum so that it completes its execution without any context switching. The above process was continued till all the processes were deleted from the ready queue. 3. Experimental Analysis A. Assumptions The environment where all the experiments are performed is a single processor environment and all the processes are independent. All the attributes like burst time, number of processes and the time slice of all the processes are known before submitting the processes to the processor. All processes are CPU bound. No processes are I/O bound. B. Experimental Work Our experiment consists of several input and output parameters. The input parameters consist of burst time, arrival time, time quantum and the number of processes. The output parameters consist of average waiting time, average turnaround time and number of context switches. www.borjournals.com Blue Ocean Research Journals 52

C. Data Set We have performed six experiments for evaluating performance of our new proposed algorithm. For the first three experiments, we have considered the data set as the processes with burst time in increasing, decreasing and random order respectively. D. Experiments Performed: To evaluate the performance of our proposed algorithm, we have taken a set of five processes in six different cases. We have taken 5 processes. The algorithm works effectively even if it is used with a very large number of processes. We have compared the experimental results of our proposed algorithm with the round robin scheduling algorithm with fixed time quantum. Here we have assumed a constant time quantum equal to 25 in all the cases. Avg.waiting [Table-2 Comparison between RR & RRR] (in RR 25 14 160.4 224.2 RRR 60,37,4 7 102.4 166.2 Case 2: Let us assume five processes arriving at time = 0, with decreasing burst time P1 = 82, P2 = 50, P3 = 31, P4 = 27, p5= 19 as shown in TABLE-3. The Table-4 shows the output using RR algorithm and our new proposed algorithm (RRR) Figure-3 and Figure-4 shows Gantt chart for both the algorithms respectively. Case 1: Let us assume five processes arriving at time = 0, with increasing burst time P1 = 13, P2 = 35, P 3 = 46, P4 = 63, p5= 97 as shown in TABLE-1. The Table-2 shows the output using RR algorithm and our new proposed algorithm (RRR) Figure-1 and Figure-2shows Gantt chart for both the algorithms respectively. Processes Arrival Burst P1 0 30 P2 0 44 P3 0 55 P4 0 90 P5 0 100 [Table 1] [Figure-1 Gantt chart for RR in Table- 2] [Table-3] [Figure-3 Gantt chart for RR in Table-4] [Figure-4 Gantt chart for RRR in Table-4] [Figure-2 Gantt chart for RRR in Table-2] Avg. waiting (i n (in RR 25 10 128 169.8 RRR 36,32,15 7 61 102.8 [Table-4 Comparison between RR & RRR] Case 3: Let us assume five processes arriving at time = 0, with random burst time P1 = 43, P2 = 87, P3 = 15, P4 = 27, p5= 38 as shown in TABLE-5. The Table-6 shows the output using RR algorithm and our new pro- www.borjournals.com Blue Ocean Research Journals 53

posed algorithm (RRR) Figure-5 and Figure-6 shows Gantt chart for both the algorithms respectively. [Table-6 Comparison between RR & RRR] Case 4: Let us assume five processes arriving at different times 0, 2, 4, 6, 10 respectively with increasing burst time (P1 = 10, P2 = 22, P3 = 30, P4 = 65, p5= 77) as shown in TABLE-7. The Table-8 shows the output using RR algorithm and our new proposed algorithm (RRR). Figure-7 and Figure-8 shows Gantt chart for both the algorithms respectively. [Figure-5 Gantt chart for RR in Table-6] [Figure-6 Gantt chart for RR in Table-6] Processes Arrival Burst P1 0 10 P2 2 22 P3 4 30 P4 6 65 P5 10 77 [Table-7] Avg.waiting (in RR 25 10 61.8 107 RRR 10,51,22,5 7 52 92.8 [Figure 7 Gantt chart for RR in Table-8] [Figure 8 Gantt chart for RRR in Table-8] [Table-8 Comparison between RR & RRR] [Figure-6 Gantt chart for RR in Table-6] Case 5: Let us assume five processes arriving at different times 0, 2, 4, 6, 8 respectively with decreasing burst time (P1 = 75, P2 = 69, P3 = 65, P4 = 13, p5= 9) as shown in TABLE-9. The Table-10 shows the output using RR algorithm and our new proposed algorithm (RRR). Figure-9 and Figure-10 shows Gantt chart for both the algorithms respectively. www.borjournals.com Blue Ocean Research Journals 54

Processes Arrival Burst P1 0 75 P2 2 69 P3 4 65 P4 6 13 P5 8 9 [Table-9] [Table-11] [Figure 9 Gantt chart for RR in Table-10] [Figure-11 Gantt chart for RR in Table-12] [Figure-12 Gantt chart for RRR in Table-12] [Figure 10 Gantt chart for RR in Table-10] Avg.waiting (in Avg.waiting Turnaroun d (in RR 25 10 109.6 165.8 RRR 75,43,26 6 88.2 134.4 [Table-10 Comparison between RR & RRR] Case 6: Let us assume five processes arriving at different times 0, 3, 4, 7, 10 respectively with random burst time (P1 = 70, P2 = 85, P3 = 60, P4 = 45, p5= 100) as shown in TABLE-11. The Table-12 shows the output using RR algorithm and our new proposed algorithm (RRR). Figure-11and Figure-12 shows Gantt chart for both the algorithms respectively. RR 25 10 61.8 107 RRR 10,51,22,5 7 52 92.8 [Table-12 Comparison between RR & RRR] Avg. waiting RR 25 10 61.8 107 RRR 10,51,22,5 7 52 92.8 www.borjournals.com Blue Ocean Research Journals 55

Fig.13: Comparison of average waiting time taking static and dynamic time quantum for increasing, decreasing and random burst sequence. Fig.14: Comparison of average turnaround time taking static and dynamic time quantum for increasing, decreasing and random burst sequence. www.borjournals.com Blue Ocean Research Journals 56

Fig.15: Comparison of context switch taking static and dynamic time quantum for increasing, decreasing and random burst sequence. Fig.16: Comparison of average waiting time taking static and dynamic time quantum for increasing, decreasing and random burst sequence taking different arrival time into account. www.borjournals.com Blue Ocean Research Journals 57

Fig.17: Comparison of average turnaround time taking static and dynamic time quantum for increasing, decreasing and random burst sequence taking different arrival time into account. Fig.18: Comparison of context switch taking static and dynamic time quantum for increasing, decreasing and random burst sequence taking different arrival time into account www.borjournals.com Blue Ocean Research Journals 58

4. Conclusion From the performed experiment with the utilized new algorithm, it is found out that in the new approach the performance is enhanced in terms of context switching, average waiting time and average turnaround time. This causes better performance of the uniprocessor system 5. References [1] Rami J. Matarneh. Self-Adjustment in Round Robin Depending on Burst of Now Running Processes, American J. of Applied Sciences 6(10):1831-1837, 2009, ISSN 1546-9239. [2] C. Yaashuwanth, Dr. R. Ramesh. A New Scheduling s for Real Tasks, (IJCSIS) International Journal of Computer Science and Information Security, Vol.6, No.2, 2009. [3] H.S. Behera, R. Mohanty, Debashree Nayak A New Proposed Dynamic with Readjusted Round Robin Scheduling and its Performance Analysis, International Journal of Computer Applications(0975-8887) Volume 5- No.5, August 2010. [4] Silberschatz, A., P.B.GalvinandG.Gagne, 2004. Operating Systems Concepts. 7th Edn. John Wiley and Sons, USA., ISBN: 13:978-0471694663, pp: 944. [5] Tanebun, A.S., 2008, Modern Operating Systems.3rd Edn. Prentice Hall, ISBN: 13:9780136006633, pp: 1104. [6] Rami Abielmona, Scheduling ic Research, Department of Electrical and Computer Engineering Ottawa- Carleton Institute, 2000. [7] Tarek Helmy, Abdelkader Dekdouk, " Burst Round Robin: As a Proportional-Share Scheduling ", IEEE Proceedings of the fourth IEEE-GCC Conference on towards Techno-Industrial Innovations, pp. 424-428, 11-14 November, 2007. [8] Debashree Nayak,Sanjeev Kumar Malla, Debashree Debadarshini, Improved round robin scheduling using dynamic time quantum, International Journal of Computer Applications (0975 8887),Volume 38 No.5, January 2012. www.borjournals.com Blue Ocean Research Journals 59