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

Similar documents
Journal of Global Research in Computer Science

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

Revamped Round Robin Scheduling Algorithm

February 2011 Page 23 of 93 ISSN

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

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

Journal of Global Research in Computer Science

Improvising Round Robin Process Scheduling through Dynamic Time Quantum Estimation

Dynamic Time Quantum based Round Robin CPU Scheduling Algorithm

International Journal of Advanced Research in Computer Science and Software Engineering

EXTRA THRESHOLD IN ROUND ROBIN ALGORITHM IN MULTIPROCESSOR SYSTEM

CPU scheduling. CPU Scheduling

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

Module 5: CPU Scheduling

Chapter 6: CPU Scheduling

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

CS 550 Operating Systems Spring CPU scheduling I

2/5/07 CSE 30341: Operating Systems Principles

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

CPU Scheduling Exercises

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

ENHANCED ROUND ROBIN ALGORITHM FOR PROCESS SCHEDULING USING VARYING QUANTUM PRECISION

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

CPU Scheduling. CPU Scheduler

CPU Scheduling. Heechul Yun

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

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

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

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

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

Half Life Variable Quantum Time Round Robin (HLVQTRR)

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

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

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

Last class: Today: Threads. CPU Scheduling

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

A NEW PROPOSED DYNAMIC DUAL PROCESSOR BASED CPU SCHEDULING ALGORITHM

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

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

CPU SCHEDULING RONG ZHENG

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

Simulation of Process Scheduling Algorithms

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

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

Season Finale: Which one is better?

CSE 380 Computer Operating Systems

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

Scheduling IoT on to the Cloud : A New Algorithm

CHAPTER 5 - PROCESS SCHEDULING

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

LSN 15 Processor Scheduling

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

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

Real-Time Systems. Event-Driven Scheduling

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

Aperiodic Task Scheduling

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

Clock-driven scheduling

ANALYSIS AND TESTING OF DIFFERENT TIME QUANTUM FOR ROUND ROBIN ALGORITHM

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

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

How to deal with uncertainties and dynamicity?

Embedded Systems Development

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

Networked Embedded Systems WS 2016/17

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

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

NATCOR: Stochastic Modelling

Real-Time Systems. Event-Driven Scheduling

Embedded Systems 14. Overview of embedded systems design

Real-Time Scheduling and Resource Management

Task Models and Scheduling

Multiprocessor Scheduling of Age Constraint Processes

Andrew Morton University of Waterloo Canada

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

Real-Time Systems. LS 12, TU Dortmund

Introduction to Queueing Theory

CIS 4930/6930: Principles of Cyber-Physical Systems

Non-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Task Reweighting under Global Scheduling on Multiprocessors

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

There are three priority driven approaches that we will look at

Performance Metrics for Computer Systems. CASS 2018 Lavanya Ramapantulu

Scheduling Lecture 1: Scheduling on One Machine

PBS: A Unified Priority-Based CPU Scheduler

AS computer hardware technology advances, both

Proportional Share Resource Allocation Outline. Proportional Share Resource Allocation Concept

Competitive Analysis of M/GI/1 Queueing Policies

M/G/1 and Priority Queueing

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

Solutions to COMP9334 Week 8 Sample Problems

Cyclic Schedules: General Structure. Frame Size Constraints

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

EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation

COMP9334: Capacity Planning of Computer Systems and Networks

Operational Laws Raj Jain

Analysis of Software Artifacts

CS 700: Quantitative Methods & Experimental Design in Computer Science

11 The M/G/1 system with priorities

Transcription:

Design and Performance Evaluation of a New Proposed Shortest Remaining Burst Round Robin (SRBRR) Scheduling Algorithm Prof. Rakesh Mohanty, Prof. H. S. Behera Khusbu Patwari, Manas Ranjan Das, Monisha Dash, Sudhashree Department of Computer Science and Engineering Veer Surendra Sai University of Technology, Burla, Sambalpur, Orissa, India. Abstract In this paper, we have studied various algorithms for scheduling of the processes in Operating System (OS). Amongst all the algorithms, Round Robin (RR) performs optimally in timeshared system because each process is given an equal amount of static time quantum. But the effectiveness of RR algorithm solely depends upon the choice of time quantum. We have made a comprehensive study and analysis of RR algorithm. We have proposed a new Improved-RR algorithm SRBRR (Shortest Remaining Burst Round Robin) by assigning the processor to processes with shortest remaining burst in round robin manner using the dynamic time quantum. Our experimental analysis shows that SRBRR performs better than RR algorithm in terms of reducing the number of context switches, average waiting time and average turnaround time. Keywords: Operating System, Scheduling Algorithm, Round Robin, Context switch, Waiting time, Turnaround time. I. Introduction Operating System is the interface between the hardware and the user(application program). It controls and coordinates the use of the hardware among various application programs for various users[3]. In multitasking and multiprocessing environment the way the processes are assigned to run on the available CPUs is called scheduling. 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. The scheduling is used in the real time applications like routing of data packets in computer networking, controlling traffic in airways, roadways and railways etc. In Round Robin (RR) every process has equal priority and is given a 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 due to use of static time quantum. This motivates us to implement RR algorithm with sorted remaining burst time with dynamic time quantum concept. A. Preliminaries A program in execution is called a process. The processes, 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. Turnaround time is the amount of time to execute a particular process, while waiting time is the amount of time a process has been waiting in the ready queue. Time from the submission of a request by the process till its first response is the response time. Scheduler selects a process from queues in some manner for its execution. In non-preemption, CPU is assigned to a process, it holds the CPU till its execution is completed. But in preemption, running process is forced to release the CPU by the newly arrived process. 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. B. Scheduling algorithms When there are number of processes in the ready queue, the algorithm which decides the order of execution of those processes is called scheduling algorithm. 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 Time Next (SRTN) and Round Robin (RR) are preemptive in nature. RR is most suitable for time sharing systems. C. Related Work Abielmona[1] provided an analytical overview of a myriad of scheduling algorithms. The Proportional Share Scheduling Algorithm proposed by Helmy and Dekdouk[2] combines low overhead of round robin algorithms and favor shortest jobs. Weight readjustment in the algorithm enables existing proportional share schedulers to significantly reduce, the unfairness in their

allocation. The static time quantum which is a limitation of RR was removed by taking dynamic time quantum by Matarneh[5]. The time quantum that was repeatedly adjusted according to the burst time of the running processes are considered to improve the waiting time, turn around time and number of context switches. D. Our Contribution In our work, we have improved the RR algorithm by taking judiciously the 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. E. Organization of the paper Section II presents the pseudo code and illustration of our proposed SRBRR algorithm. In section III, experimental analysis of SRBRR and its comparison with static RR is presented. Conclusion is presented in section IV. 2. OUR PROPOSED SRBRR ALGORITHM In our proposed algorithm, the time quantum is taken as the median of the increasingly sorted burst time of all the processes. 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 like SRTN Algorithm. Performance of RR algorithm solely depends upon the size of time quantum. If it is very small, it causes too many context switches. If it is very large, the algorithm degenerates 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. To get the optimal time quantum, median of the burst time is taken as the time quantum. B. Our Proposed Algorithm In our algorithm, when processes are already present in the ready queue, their arrival time are assigned to zero before they are allocated to the CPU. The burst time and the number of processes (n) are accepted as input. Let TQ be the time quantum. 1. All the processes present in ready queue are sorted in ascending order. 2. While(ready queue!= NULL) TQ = median (remaining burst time of all the processes) 3. Assign TQ to process P i ->TQ 4. If (i<n) then go to step 3 5. If a new process is arrived, Update the counter n and go to step1 End of while 6. Average waiting time, average turnaround time and no. of context switches are calculated 7. End Fig 1: Pseudo code for Shortest Remaining Burst Round Robin algorithm. C. Illustration Given the burst time sequence: 54 99 5 27 32. Initially the burst time of all the processes were sorted in ascending order which resulted in sequence 5 27 32 54 99. Then the median of the above burst time which was calculated to be 32 was assigned as the time quantum for all the processes. In the next step remaining burst time of each process was calculated after allocating the time quantum. After first loop the remaining burst time sequence for above processes changed to 0 0 0 22 67. 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. The present remaining burst time were sorted in increasing order and then the median of these burst times was assigned as the time quantum. After sorting the current burst time, the sequence was 22 67 and the roof value of median was 45. So 45 was now assigned as the time quantum for remaining processes. After second loop the remaining burst time was calculated to be 22. As the only remaining process was P5, the current burst time 22 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. Time slice is assumed to be not more than the maximum burst time. 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 Frame 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. 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. In the above three cases, the arrival time was assumed to be the same. Then the above experiments were performed by considering data set with different arrival time for each process. D. Performance Metrics The significance of our performance metrics for experimental analysis is as follows: 1) Turnaround time (TAT): For the better performance of the algorithm, average turnaround time should be less. 2) Waiting time (WT): For the better performance of the algorithm, average waiting time should be less. 3) Number of Context Switches (CS): For the better performance of the algorithm, the number of context switches should be less. E. Experiments Performed: To evaluate the performance of our proposed algorithm, we have taken a set of five processes in six different cases. Here for simplicity, we have taken 5 processes. The algorithm works effectively even if it used with a very large number of processes. In each case, we have compared the experimental results of our proposed algorithm with the round robin scheduling algorithm with fixed time quantum Q. Here we have assumed a constant time quantum Q equal to 25 in all the cases. Case 1: We Assume five processes arriving at time = 0, with increasing burst time (P1 = 13, P2 = 35, P 3 = 46, P 4 = 63, p5= 97) as shown in TABLE-1(upper). The Table- 1(lower) shows the output using RR algorithm and our new proposed algorithm.figure-2 and Figure-3 shows Gantt chart for both the algorithms respectively. P1 0 13 P2 0 35 P3 0 46 P4 0 63 P5 0 97 RR 25 148.2 97.4 11 SRBRR 46,34,17 122.4 71.6 7 Table 1: Comparison between RR algorithm and our new proposed algorithm (case 1) Fig.2: Gantt chart for RR algorithm in Table 1 (case 1) Fig.3: Gantt chart for SRBRR in Table 1(case 1) Case 2: We assume five processes arriving at time = 0, with decreasing burst time (P1 = 86, P2 =53, P 3 = 32, P 4 = 21, p5= 9) as shown in TABLE-2(upper). The Table- 2(lower) shows the output using RR algorithm and our new proposed algorithm. Figure-4 and Figure-5 shows Gantt chart for both the algorithms respectively. P1 0 86 P2 0 53 P3 0 32 P4 0 21 P5 0 9 RR 25 150.8 110.5 10 SRBRR 32,38,16 89.8 49.6 7 Table 2: Comparison between RR algorithm and our new proposed algorithm (case 2)

Fig.4: Gantt chart for RR algorithm in Table 2 (case 2) Case 4: We Assume five processes arriving at different times 0, 2, 5, 7, 9 respectively with increasing burst time (P1 = 10, P2 = 22, P 3 = 48, P 4 = 70, p5= 74) as shown in TABLE-4(upper). The Table-4(lower) shows the output using RR algorithm and our new proposed algorithm. Figure-8 and Figure-9 shows Gantt chart for both the algorithms respectively. Fig.5: Gantt chart for SRBRR in Table 2(case 2) Case 3: We Assume five processes arriving at time = 0, with random burst time (P1 = 54, P2 = 99, P 3 = 5, P 4 = 27, p5= 32) as shown in TABLE-3(upper). The Table- 3(lower) shows the output using RR algorithm and our new proposed algorithm. Figure-6 and Figure-7 shows Gantt chart for both the algorithms respectively. P1 0 54 P2 0 99 P3 0 5 P4 0 27 P5 0 32 P1 0 10 P2 2 22 P3 5 48 P4 7 70 P5 9 74 RR 25 114.6 69.8 9 SRBRR 10,59,13,2 106.4 61.6 7 Table 4: Comparison between RR algorithm and our new proposed algorithm (case 4) 8: Gantt chart for RR in Table-4 (case 4) Fig. RR 25 152.2 108.8 11 SRBRR 32,45,22 93.6 50.2 7 Table 3: Comparison between RR algorithm and our new proposed algorithm (case 3) Fig.6: Gantt chart for RR in Table 3 (case 3) Fig.7: Gantt chart for SRBRR in Table 3 (case 3) Fig.9: Gantt chart for SRBRR in Table-4 (case 4) Case 5: We Assume five processes arriving at different times 0, 6, 13, 21, 75 respectively with decreasing burst time (P1 = 73, P2 = 50, P3 = 23, P4 = 19, p5= 5) as shown in TABLE-5. The Table-5(lower) shows the output using RR algorithm and our new proposed algorithm. Figure-10 and Figure-11 shows Gantt chart for both the algorithms respectively. P1 0 73 P2 6 50 P3 13 23 P4 21 19 P5 75 5

RR 25 101.8 67.8 7 SRBRR 73,23,23,27 87.4 53.4 5 Table 5: Comparison between RR algorithm and our new proposed algorithm (case 5) Fig.13: Gantt chart for SRBRR in Table-6 (case 6) Fig.10: Gantt chart for RR in Table-5 (case 5) Fig.11: Gantt chart for SRBRR in Table-5 (case 5) Case 6: We Assume five processes arriving at different times 0, 6, 8, 9, 10 respectively with random burst time (P1 = 7, P2 = 15, P3 = 90, P4 = 42, p5= 8) as shown in TABLE-6(upper). The Table-6(lower) shows the output using RR algorithm and our new proposed algorithm. Figure-12 and Figure-13 shows Gantt chart for both the algorithms respectively. Fig.14: Comparison of average turnaround time sequence. P1 0 7 P2 6 15 P3 8 90 P4 9 42 P5 10 8 RR 25 72 39.6 8 SRBRR 7,15,42,48 52 19.6 5 Fig.15: Comparison of average waiting time sequence. Table 6: Comparison between RR algorithm and our new proposed algorithm (case 6) Fig.12: Gantt chart for RR in Table-6 (case6)

Fig.16: Comparison of context switch taking static and dynamic time quantum for increasing, decreasing and random burst sequence. Fig.19: Comparison of context switches taking static and dynamic time quantum for increasing, decreasing and random burst sequence taking arrival time into consideration. 4. Conclusion From the above comparisons we concluded that our new proposed algorithm is performing better than the static RR algorithm in terms of average waiting time, average turnaround time and number of context switches. 5. References Fig 17: Comparison of average turnaround time sequence taking arrival time into consideration. [1] Rami Abielmona, Scheduling Algorithmic Research, Department of Electrical and Computer Engineering Ottawa- Carleton Institute, 2000. [2] Tarek Helmy, Abdelkader 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, 11-14 November, 2007. [3] Silberschatz, A., P.B. Galvin and G.Gagne, Operating Systems Concepts.7th Edn., John Wiley and Sons, USA ISBN:13:978-0471694663, pp: 944, 2004. [4] A.S. Tanenbaun, Modern Operating Systems.3rd Edn, Prentice Hall, ISBN:13: 9780136006633, pp: 1104, 2008 [5] Rami J. Matarneh, Self-Adjustment Time Quantum in Round Robin Algorithm Depending on Burst Time of the now Running Processes, Department of Management Information Systems, American Journal of Applied Sciences 6 (10):1831-1837, 2009, ISSN 1546-9239. Fig.18: Comparison of average waiting time sequence taking arrival time into consideration.