Modifying Round Robin Algorithm for Process Scheduling using Dynamic Quantum Precision

Similar documents
Design and performance evaluation of Advanced Priority Based Dynamic Round Robin Scheduling Algorithm (APBDRR)

A Group based Time Quantum Round Robin Algorithm using Min-Max Spread Measure

Utilizing Round Robin Concept for Load Balancing Algorithm at Virtual Machine Level in Cloud Environment

PROCESS SCHEDULING ALGORITHMS: A REVIEW

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

A Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems

W4118 Operating Systems. Instructor: Junfeng Yang

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Process Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

Analysis and Comparison of CPU Scheduling Algorithms

A Comparative Study of CPU Scheduling Algorithms

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Chapter 5 Process Scheduling

CPU Scheduling. CPU Scheduling

Weight-based Starvation-free Improvised Round-Robin (WSIRR) CPU Scheduling Algorithm

ICS Principles of Operating Systems

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Job Scheduling Model

Operating System: Scheduling

CPU Scheduling Outline

OPERATING SYSTEMS SCHEDULING

Main Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Scheduling Algorithms

OS OBJECTIVE QUESTIONS

Performance Analysis of VM Scheduling Algorithm of CloudSim in Cloud Computing

Scheduling 0 : Levels. High level scheduling: Medium level scheduling: Low level scheduling

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

A Review on Load Balancing In Cloud Computing 1

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

Operating Systems Lecture #6: Process Management

Load Balancing Scheduling with Shortest Load First

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition

Operating Systems. III. Scheduling.

Scheduling policy. ULK3e 7.1. Operating Systems: Scheduling in Linux p. 1

Analysis of Job Scheduling Algorithms in Cloud Computing

CPU Scheduling. Core Definitions

A Survey on Load Balancing and Scheduling in Cloud Computing

III. SCHEDULING MODEL A. Users: The user enters the jobs to be executed on processor in computational grid.

IMPROVEMENT OF RESPONSE TIME OF LOAD BALANCING ALGORITHM IN CLOUD ENVIROMENT

Operating Systems Concepts: Chapter 7: Scheduling Strategies

CPU Scheduling. CSC 256/456 - Operating Systems Fall TA: Mohammad Hedayati

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

CS Fall 2008 Homework 2 Solution Due September 23, 11:59PM

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

IMPROVED LOAD BALANCING MODEL BASED ON PARTITIONING IN CLOUD COMPUTING

Konzepte von Betriebssystem-Komponenten. Linux Scheduler. Valderine Kom Kenmegne Proseminar KVBK Linux Scheduler Valderine Kom

STASR: A New Task Scheduling Algorithm. For Cloud Environment

Dr. Ravi Rastogi Associate Professor Sharda University, Greater Noida, India

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

A SURVEY ON LOAD BALANCING ALGORITHMS IN CLOUD COMPUTING

@IJMTER-2015, All rights Reserved 355

Roulette Wheel Selection Model based on Virtual Machine Weight for Load Balancing in Cloud Computing

Load Balancing in cloud computing

A Dynamic Load Balancing Algorithm For Web Applications

Scheduling for QoS Management

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

ADAPTIVE LOAD BALANCING ALGORITHM USING MODIFIED RESOURCE ALLOCATION STRATEGIES ON INFRASTRUCTURE AS A SERVICE CLOUD SYSTEMS

Response Time Minimization of Different Load Balancing Algorithms in Cloud Computing Environment

Linux scheduler history. We will be talking about the O(1) scheduler

Introduction. Scheduling. Types of scheduling. The basics

1 st year / / Principles of Industrial Eng. Chapter -3 -/ Dr. May G. Kassir. Chapter Three

W4118 Operating Systems. Instructor: Junfeng Yang

Load Balancing using DWARR Algorithm in Cloud Computing

A Review of Load Balancing Algorithms for Cloud Computing

APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM

Real-Time Scheduling 1 / 39

Efficiency of Batch Operating Systems

Distributed and Dynamic Load Balancing in Cloud Data Center

Overview of Presentation. (Greek to English dictionary) Different systems have different goals. What should CPU scheduling optimize?

A Comparative Study of Load Balancing Algorithms in Cloud Computing

REDUCING TIME: SCHEDULING JOB. Nisha Yadav, Nikita Chhillar, Neha jaiswal

CPU Scheduling 101. The CPU scheduler makes a sequence of moves that determines the interleaving of threads.

Processor Scheduling. Queues Recall OS maintains various queues

A Comparison of Four Popular Heuristics for Load Balancing of Virtual Machines in Cloud Computing

Operating Systems, 6 th ed. Test Bank Chapter 7

Performance Comparison of RTOS

Efficient Cloud Computing Load Balancing Using Cloud Partitioning and Game Theory in Public Cloud

Improved Hybrid Dynamic Load Balancing Algorithm for Distributed Environment

Keywords Load balancing, Dispatcher, Distributed Cluster Server, Static Load balancing, Dynamic Load balancing.

An Approach to Load Balancing In Cloud Computing

Operating System Tutorial

Grid Computing Approach for Dynamic Load Balancing

International Journal of Advance Research in Computer Science and Management Studies

CPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.

Discrete-Event Simulation

MEASURING PERFORMANCE OF DYNAMIC LOAD BALANCING ALGORITHMS IN DISTRIBUTED COMPUTING APPLICATIONS

International Journal of Computer Science Trends and Technology (IJCST) Volume 2 Issue 4, July-Aug 2014

A Comparative Study of Batch Scheduling Strategies for Parallel Computing System

Router-assisted congestion control. Lecture 8 CS 653, Fall 2010

Webpage: Volume 3, Issue XI, Nov ISSN

SCHEDULING IN CLOUD COMPUTING

Automatic Queuing Model for Banking Applications

LOAD BALANCING IN CLOUD COMPUTING USING PARTITIONING METHOD

Load Balancing in Distributed System Using FCFS Algorithm with RBAC Concept and Priority Scheduling

Cloud Partitioning Based Load Balancing Model for Performance Enhancement in Public Cloud

Comparison of PBRR Scheduling Algorithm with Round Robin and Heuristic Priority Scheduling Algorithm in Virtual Cloud Environment

Transcription:

Modifying Round Robin for Scheduling using Dynamic Quantum Precision Mohd Abdul Ahad Department of Computer Science, FMIT, Jamia Hamdard, New Delhi, India ABSTRACT Any processor is said to be optimally performing if it has a higher throughput, low waiting time, low turn around time, and less number of for the processes coming for execution. The scheduler is the component which is responsible for taking the decision on how and when to schedule the processes waiting in the ready queue for their chance to get the CPU. In this paper we have given a proposal for modifying the classical round robin scheduling algorithm. The proposal works by finding the left out burst time of the processes in the last but one turns of the quantum cycle. The left out burst time values in last but one turn of each process are processed to get an optimal threshold value. Based on this, we have divided the processes waiting in the ready queue in two categories. The processes in the first category are the one for which we will modify the time quantum and the processes in the second category will be processed as per the classical round robin algorithm. We have also compared proposal with the classical round robin algorithm and the results are depicted in tabular form. Keywords: Scheduling, Turn around,, waiting time. 1. INTRODUCTION In today s era, most processors are capable of handling multiple processes at the same time by switching the allotment of the CPU among the processes. This switching is performed by the scheduler of the operating system. The competence of the processor depends upon the type of scheduling algorithm followed by the processor [9], [14]. There exists a variety of process scheduling algorithms and most of the operating systems are deploying more than one process scheduling algorithm for optimizing their processing needs[12], [13]. The three most common scheduling algorithms are as follows [10], [11]: A. First Come First Serve (FCFS): Here the CPU is assigned to the job or process that arrives first at the ready queue. The CPU is taken away from the process only when, it has totally finished its execution or is performing any I/O operation(s) [10], [11]. B. Shortest Job First (SJF): In this the process that has the minimum burst time, gets the CPU first. In this algorithm also, the CPU is taken away only when the process has entirely completed its execution [10], [11], [12]. C. Round Robin (RR): This algorithm is an enhanced version of the FCFS algorithm. It introduces the concept of time quantum (a fixed amount of time period). If the process entirely finishes its execution within this time, it is removed from the ready queue otherwise it goes back to the ready queue and waits for its next chance in FCFS order only [10], [11], [12]. Out of the above stated algorithms, the round robin algorithm is the most interesting because it involves the concept of quantum slices of time and switching and this is the reason why we have chosen this algorithm for modification. 2. RELATED WORKS There have been many researches going in the field of modifying the scheduling algorithm of the operating system so as to make them faster and efficient. The authors of [1] proposed a new method using integer programming for finding the value of time quantum [1]. The authors of in [2] proposed an adaptive version of the round robin algorithm wherein the concept of smart time slices is used by rearranging the processes in increasing order of the burst times. The novelist of [3] highlights the problem in the conventional Linux SCHED_RR, wherein the users who runs more processes will get more share of CPU than the users who runs less number of processes of the same priority. They proposed a solution to this by assigning equal share of CPU to users instead of the processes [3]. The researchers in [4] proposed an approach in which the process are arranged in ascending order of the burst time and then an optimal time quantum is calculated using the median concept, which means that if the number of processes in the ready queue is odd, the burst time of the middle process will become the time quantum, otherwise the average of the two middle processes will become the time quantum. The authors in [5] highlight an improved version of the algorithm with the complexity of O (n log n). They used the concept of bursts arrivals and batch departures [5]. The researchers in [6] propose the concept of self adjustment time quantum, in which the time quantum is continuously modified according to the burst time of the currently running processes [6]. The authors in [7] proposed to increase the time quantum of the process which does not completes its execution within the allotted time [7]. The authors in [8] talks about increasing the time quantum two folds after completing one cycle of CPU allocation to the processes. Then finding the process with the minimum execution time and assigning the CPU to it and continuing in the same fashion. The researchers in [15] calculates the time quantum using max-min approach wherein the time quantum is the difference between the maximum and minimum burst time value of the processes. 3. IMPROVED ROUND ROBIN APPROACH approach is not to change the round robin philosophy but to make it one step advanced. In round robin approach the time quantum is absolutely fixed. While it is observed that in many cases jobs are preempted even if a negligible amount of execution time is left for a job. This particular job now has to wait for its next turn. This situation caters to waiting time of the process sometimes unnecessarily. A. Terminologies Used in the proposed algorithm P: TQ: Quantum 5

Old_TQ: A quantity storing the original initial value of the Quantum. BT: An N dimensional array storing the of the processes AT: An N dimensional array storing the of the processes N: Total number of processes in the ready queue Count: An N dimensional array storing the value of the current quantum cycle of the processes. B: An N dimensional Array Storing the integer part of the quantity: B [P i ] = int (BT [Pi] / TQ), where i= 1,2, 3...N. Left out (LoT) : It is also an N dimensional array that can be calculated by the equation: LoT [Pi] = BT [Pi], where i = 1, 2, 3...N K : ceil ( of (LoT[Pi])) B. Modification of the Round Robin 1. Input: Ready queue consisting of the various processes waiting to get the CPU 2. For each process in the ready queue do 3. Count [Pi] =1; 4. If (BT [Pi] < TQ) 5. { 6. Apply classical round robin policy 7. } 8. If (BT [Pi] / TQ) = = I), where I is an Integer value 9. { 10. Apply classical round robin policy 11. BT [Pi] = BT [Pi] -TQ; 12. } 13. Else if (BT [Pi]/ TQ)!= I) // Non integer value 14. { 15. If (B [P i] = = Count [P i]) // checking the last but one turn 16. { 17. if (LoT[i] <=K) 18. { 19. TQ=TQ + K 20. Assign CPU to the process as per New TQ 21. BT [Pi] = BT [Pi] - TQ 22. TQ=Old_TQ; 23. } 24. Else 25. { 26. Apply classical round robin policy 27. BT [Pi] = BT [Pi] TQ 28. } 29. } 30. Else (Count [P i]! =B [P]) 31. { 32. BT [Pi] = BT [Pi] TQ; 33. Count [Pi] ++ 34. } 35. } C. Working of the using hypothetical Examples Method for calculating the threshold value (K) 1. Let BT[i] represents the of the i th process. 2. Let TQ represents the Quantum 3. Let n is the number of processes in the ready queue. 4. Therefore the Left out (LoT) for a process is calculated as follows a. LoT[i] = BT[i] ; And the threshold value K is calculated as follows K* = ceil (LoT [i] / n); Where ceil (p) is the smallest integer greater than or equal to p. * We will not include those processes in the calculation of K for which LoT[i] < = 0; Example 1: TABLE 1: (Example 1 Using Round Robin ) TIME QUANTUM (TQ) = 20 P1 0 24 P2 0 29 P3 0 35 P4 0 40 P5 0 27 Fig 1: Gantt chart according to Round Robin Calculation of Turn around, Waiting and for Round Robin Turn around (Avg. TAT) is given by Avg. TAT = (104 + 113 + 128 + 148 + 155) / 5 = 129.6 Waiting (Avg. WT) is given by Avg. WT = (80 + 84 + 93 + 108 + 128) /5 = 98.6 = 09 6

TABLE 2: Example 1(Using ) TIME QUANTUM (TQ) = 20 B = INT(BT / TQ) P1 0 24 1 4 P2 0 29 1 9 P3 0 35 2 15 P4 0 40 2 0 P5 0 27 1 7 K = ceil ( of (C[i])) K= ceil ((4 +9+15+7) / 4) K= ceil (35/4) = ceil (8.75) Therefore K = 9 Fig 2: Gantt chart according to Calculation of Turn around, Waiting and for proposed Turn around (Avg.TAT) is given by Avg. TAT = (24 + 53 + 135 + 155 + 120) / 5 = 97.4 Waiting (Avg. WT) is given by Avg.TAT = (0 + 24 + 100 + 115 + 93) / 5 = 66.4 = 06 Example 2: TABLE 3: (Example 2 Using Round Robin ) TIME QUANTUM = 10 ms P1 0 11 P2 0 12 P3 0 13 P4 0 22 P5 0 23 P6 0 33 Fig 3: Gantt chart according to classical Round Robin Calculation of Turn around, Waiting and for Round Robin Turn around (Avg. TAT) is given by Avg. TAT = (61 + 63 + 98 + 101 + 114) / 6 = 83.83 Waiting (Avg. WT) is given by Avg. WT = (50 + 51 + 76 + 78 + 81) / 6 = 64.83 = 14 TABLE 4: (Example 2 Using ) TIME QUANTUM = 10 ms B = INT(BT / TQ) P1 0 11 1 1 P2 0 12 1 2 P3 0 13 1 3 P4 0 22 2 2 P5 0 23 2 3 P6 0 33 3 3 K = ceil ( of (C[i])) K=ceil (1 +2+3+2+3+3) / 6) K= ceil (14/6) K=ceil (2.33) K=3 Fig 4: Gantt chart according to proposed algorithm Calculation of Turn around, Waiting and for Round Robin Turn around (Avg. TAT) is given by Avg. TAT = (11+ 23 + 36 + 78 + 91 + 114) /6 = 58.83 Waiting (Avg. WT) is given by 7

Avg. WT = (0 + 11+ 23 + 56 + 68 + 81) / 6 = 39.83 =08 Example 3: TABLE 5: (Example 3 Using Round Robin ) Quantum (TQ) = 10 P1 0 11 P2 0 12 P3 0 29 P4 0 30 P5 0 27 P6 0 13 Fig 5: Gantt chart according to Round Robin Calculation of Turn around, Waiting and for Round Robin Turn around (Avg. TAT) is given by Avg. TAT = (61 + 63 + 105 + 115 + 122 + 96) /6 = 93.66 Waiting (Avg. WT) is given by Avg. WT = (50 + 51 + 76 + 75 + 95 + 83) / 6 = 71.66 = 14 TABLE: 6 (Example 3 Using proposed ) Quantum (TQ) = 10 B = INT(BT / TQ) P1 0 11 1 1 P2 0 12 1 2 P3 0 29 2 9 P4 0 30 3 0 P5 0 27 2 7 P6 0 13 1 3 K = ceil ( of (C[i])) K = ceil (1+2+9+7+3) /5 K =ceil (22/5) K = ceil (4.4) K = 5 Fig 6: Gantt chart according to proposed algorithm Calculation of Turn around, Waiting and for proposed Turn around (Avg. TAT) is given by Avg. TAT = (11+ 23 + 105 + 115 + 122 + 66) / 6 = 72 Waiting (Avg. WT) is given by Avg. WT. = (0 +11+ 76+ 75+ 95+ 53) / 6 = 51.66 = 11 Example 4: TABLE 7: (Example 4 Using Round Robin ) TIME QUANTUM (TQ) = 10 MS P1 0 11 P2 0 12 P3 0 21 P4 0 32 P5 0 23 P6 0 13 Fig 7: Gantt chart according to conventional round robin policy Calculation of Turn around, Waiting and for Round Robin Turn around (Avg. TAT) is given by Avg. TAT = (61+63+97+112+110+97) / 6 8

= 88.6 Waiting (Avg. WT) is given by Avg. Wait = (50+51+76+80+87+83) / 6 = 71.66 : 15 TABLE 8: (Example 4 Using ) TIME QUANTUM (TQ) = 10 MS B = INT(BT / TQ) P1 0 11 1 1 P2 0 12 1 2 P3 0 21 2 1 P4 0 32 3 2 P5 0 23 2 3 P6 0 13 3 3 K = ceil ( of (C[i])) K = ceil ((1+2+1+2+3+3)/6) K = ceil (12/6) K = 2 Fig 8: Gantt chart according to the proposed approach Calculation of Turn around, Waiting and for proposed Turn around (Avg. TAT) is given by Avg.TAT = (11 + 23 + 74 + 109 + 112 + 97) / 6 = 426 / 6 = 71 Waiting (Avg. WT) is given by Avg. WT = (0 + 11 + 53 + 77 + 89 + 84) / 6 = 314 / 6 = 52.33 = 11 4. RESULTS AND CONCLUSION In this paper we have considered round robin algorithm for improvement in the sense of reducing the average turnaround time, average waiting time and the number of. We have presented algorithm supported by a number of examples with hypothetical data and we have observed a good amount of improvement in scheduling an execution process. for Comparison Turn Around Waiting for Comparison Turn Around Waiting for Comparison Turn Around Waiting TABLE 9: Comparison Table for Example 1 Round Robin 129.6 97.4 98.6 66.4 09 06 32.2 units of 32.2 units of 03 number of TABLE10: Comparison Table for Example 2 Round Robin 83.83 58.8 64.83 39.8 14 08 TABLE 11: Comparison Table for Example 3 Round Robin 93.66 72 71.66 51.66 14 11 25.03 units of 25.03 units of 06 number of 21.66 units of 20 units of 03 number of 9

(for Comparison) Turn Around Waiting TABLE 12: Comparison Table for Example 4 Round Robin 88.6 71 71.66 52.33 15 11 17.6 units of 19.33 units of 04 number of The above tables very evidently depicts that the proposed modification for round robin scheduling technique performs much better than the conventional round robin algorithm. 5. REFERENCES [1] Samih M. Mostafa, S. Z. Rida, Safwat H. Hamad, Finding time quantum of round robin CPU scheduling, algorithm in general computing systems using integer programming October 2010, IJRRAS 5 (1) [2] Saroj Hiranwal and K. C. Roy, Adaptive Round Robin Scheduling Using Shortest Based On Smart Slice, International Jnal of Data Engineering (IJDE), Volume 2, Issue 3. [3] Braunhofer Matthias, Strumflohner Juri, Fair Round Robin Scheduling, September 17, 2009 URL: matthiasbraunhofer-projects.googlecode.com/files /AOE- Report.pdf [4] H.S.Behera, R. Mohanty, Debashree Nayak, A New Dynamic Quantum with Re-Adjusted Round Robin Scheduling and its Performance Analysis, Volume 5-No. 5, August 2010, International Jnal of Computer Application(0975-8887) [5] Jorge R. Ramos,Veron Rego Janche Sang, An Improved Computational for Round Robin Service Proceeding of the Winter simulation conference, 2003. [6] Rami J Matarneh, Self- Adjustment Quantum in Round Robin Depending upon the Burts time of the Now Running es, American Jnal of Applied Sciences 6 (10): 1831-1837, 2009, ISSN 1546-9239. [7] Haidar M. Ali, Kaies Khalid, An on Round Robin Scheduling Method International Conference on Information Technology and Natural Sciences, ICITNS- 2003. [8] Ajit Singh, Priyanka Goyal, Sahil Batra, An Optimized Round Robin Scheduling for CPU scheduling International Jnal of Computer Science and Engineering (IJCSE), Vol. 02, No. 07, 2010, 2383-2385. [9] http://bcs.wiley.com/he-bcs/books?action=resce &bcsid=2217& itemid=0471694665&resceid =5004 [10] http://www.it.uu.se/edu/cse/homepage/ oskomp/vt07/lectures/scheduling_algorithms/ handout.pdf [11] http://www.cis.upenn.edu/~lee/07cis505/lec/os-schedulev2.pdf [12] http://www.scs.stanford.edu/07au-cs140/notes/ l5.pdf [13] Prof. Rakesh Mohanty, Prof. H. S. Behera, Khusbu Patwari, Manas Ranjan Das, Monisha Dash, Sudhashree Design and Performance Evaluation of a New Shortest Remaining Round Robin (SRBRR) Scheduling URL : http://www.rimtengg.com/iscet/proceedings/pdfs/advcom p/126.pdf [14] Shih-Chiang Tsao, Ying-Dar Lin, Pre-order De cit Round Robin: a new scheduling algorithm for packetswitched networks, Computer Networks 35 (2001) 287±305, URL: http://140.113.88.160/~ydlin /DRR.pdf [15] Sanjaya Kumar Panda, Sav Kumar Bhoi An Effective Round Robin using Min-Max Dispersion Measure in International Jnal on Computer Science and Engineering (IJCSE) Vol. 4 No. 01 January 2012. 10