Optimization of Priority based CPU Scheduling Algorithms to Minimize Starvation of Processes using an Efficiency Factor

Similar documents
Enhancing Cloud Computing Scheduling based on Queuing Models

Traditional queuing behaviour in routers. Scheduling and queue management. Questions. Scheduling mechanisms. Scheduling [1] Scheduling [2]

Operating System Concepts. Operating System Concepts

Ones Assignment Method for Solving Traveling Salesman Problem

An Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem

Lecture 28: Data Link Layer

Multi-Threading. Hyper-, Multi-, and Simultaneous Thread Execution

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

Analysis of Server Resource Consumption of Meteorological Satellite Application System Based on Contour Curve

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

Administrative UNSUPERVISED LEARNING. Unsupervised learning. Supervised learning 11/25/13. Final project. No office hours today

A Hierarchical Load Balanced Fault tolerant Grid Scheduling Algorithm with User Satisfaction

Data diverse software fault tolerance techniques

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis

Pattern Recognition Systems Lab 1 Least Mean Squares

Security of Bluetooth: An overview of Bluetooth Security

Elementary Educational Computer

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Single-Cycle Disadvantages & Advantages

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem

Fast Fourier Transform (FFT) Algorithms

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Analysis of Algorithms

Improving Information Retrieval System Security via an Optimal Maximal Coding Scheme

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis

Chapter 3 Classification of FFT Processor Algorithms

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

Data Structures and Algorithms. Analysis of Algorithms

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

Improved Random Graph Isomorphism

Optimization for framework design of new product introduction management system Ma Ying, Wu Hongcui

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Switching Hardware. Spring 2018 CS 438 Staff, University of Illinois 1

Accuracy Improvement in Camera Calibration

Outline. CSCI 4730 Operating Systems. Questions. What is an Operating System? Computer System Layers. Computer System Layers

How do we evaluate algorithms?

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design

Adaptive Graph Partitioning Wireless Protocol S. L. Ng 1, P. M. Geethakumari 1, S. Zhou 2, and W. J. Dewar 1 1

3D Model Retrieval Method Based on Sample Prediction

Announcements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components

Lecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5

Solving Fuzzy Assignment Problem Using Fourier Elimination Method

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Algorithms for Disk Covering Problems with the Most Points

A Study on the Performance of Cholesky-Factorization using MPI

Adaptive Resource Allocation for Electric Environmental Pollution through the Control Network

arxiv: v2 [cs.ds] 24 Mar 2018

IMP: Superposer Integrated Morphometrics Package Superposition Tool

6.854J / J Advanced Algorithms Fall 2008

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

Protected points in ordered trees

UNIT 4 Section 8 Estimating Population Parameters using Confidence Intervals

Chapter 2: Processes & Threads. Chapter 2

Appendix D. Controller Implementation

Fuzzy Rule Selection by Data Mining Criteria and Genetic Algorithms

Lecture 10 Collision resolution. Collision resolution

Chapter 3 MATHEMATICAL MODELING OF TOLERANCE ALLOCATION AND OVERVIEW OF EVOLUTIONARY ALGORITHMS

Computer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria.

A MODIFIED APPROACH FOR ESTIMATING PROCESS CAPABILITY INDICES USING IMPROVED ESTIMATORS

Bayesian approach to reliability modelling for a probability of failure on demand parameter

An Algorithm to Solve Multi-Objective Assignment. Problem Using Interactive Fuzzy. Goal Programming Approach

The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana

Evaluation scheme for Tracking in AMI

Enhancing Efficiency of Software Fault Tolerance Techniques in Satellite Motion System

BAYESIAN WITH FULL CONDITIONAL POSTERIOR DISTRIBUTION APPROACH FOR SOLUTION OF COMPLEX MODELS. Pudji Ismartini

Python Programming: An Introduction to Computer Science

1 Graph Sparsfication

Ontology-based Decision Support System with Analytic Hierarchy Process for Tour Package Selection

HADOOP: A NEW APPROACH FOR DOCUMENT CLUSTERING

CMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago

Deadline Guaranteed Service for Multi-Tenant Cloud Storage

On Computing the Fuzzy Weighted Average Using the KM Algorithms

Performance Analysis of Multiclass FIFO: Motivation, Difficulty and a Network Calculus Approach

A Generalized Set Theoretic Approach for Time and Space Complexity Analysis of Algorithms and Functions

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.

Learning to Shoot a Goal Lecture 8: Learning Models and Skills

Normal Distributions

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

EFFECT OF QUERY FORMATION ON WEB SEARCH ENGINE RESULTS

CMSC Computer Architecture Lecture 11: More Caches. Prof. Yanjing Li University of Chicago

1&1 Next Level Hosting

Performance Plus Software Parameter Definitions

Introduction to SWARM Software and Algorithms for Running on Multicore Processors

Improving Template Based Spike Detection

An Efficient Algorithm for Graph Bisection of Triangularizations

Lecture 1: Introduction and Fundamental Concepts 1

Analysis of Algorithms

Redundancy Allocation for Series Parallel Systems with Multiple Constraints and Sensitivity Analysis

AN EFFICIENT GROUP KEY MANAGEMENT USING CODE FOR KEY CALCULATION FOR SIMULTANEOUS JOIN/LEAVE: CKCS

Guaranteeing Hard Real Time End-to-End Communications Deadlines

Master Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1

Transcription:

Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 Optimizatio of based CPU Schedulig Algorithms to Miimize Starvatio of Processes usig a Efficiecy Factor Muhammad A. Mustapha Departmet of Mathematics, Ahmadu Bello Uiversity, Zaria, Nigeria Saleh E. Abdullahi Departmet of Computer Sciece, Nigeria Turkish Nile Uiversity, Abuja, Nigeria Sahalu B. Juaidu Iya Abubakar Computer Ceter, Ahmadu Bello Uiversity, Zaria, Nigeria ABSTRACT The priority based CPU schedulig algorithm (i.e. Shortest Job First () or Schedulig (PS)) is a kid of schedulig algorithm that assigs the CPU to processes based o the priority of each process. The shortcomig of both of these algorithms is starvatio (i.e. starvatio of processes with loger burst times i the case of ad starvatio of processes with lower priorities i the case of PS). This paper proposes a ew algorithm that itroduces the cocept of EFFICIENCY FACTOR to all processes. This proposed algorithm was implemeted ad bechmarked agaist, PS ad the Optimum Service Time Cocept for Roud Robi Algorithm () by [9] usig to geerate the burst times, Expoetial distributio to geerate the priorities ad Poisso distributio to geerate the arrival times of processes. It is observed that i the category, the traditioal produced better Average Waitig Time (AWT), Average Turaroud Time (ATAT), Average Respose Time (ART) ad Waitig Time Variace Deviatio (WTVD) compared with the proposed. But they both produced the same Number of Cotext Switches (NCS). The proposed produced better results compared with with respect to AWT, ATAT, ART, NCS ad WTVD. While i the PS category, the proposed priority produced better AWT, ATAT, ART ad WTVD compared to the traditioal schedulig algorithm. But they both produced the same NCS. The proposed algorithm produced better results compared with with respect to NCS ad WTVD also produced almost the same result i terms of AWT ad ATAT i all categories of the statistical distributios used. Based o these results, the proposed priority algorithm should be preferred over the traditioal priority algorithm. Keywords CPU schedulig algorithms, Efficiecy factor, Shortest Job First Schedulig, Starvatio, Schedulig, Waitig Time Variace Deviatio 1. INTRODUCTION The Cetral Processig Uit (CPU) is a importat compoet of the computer system; hece it must be utilized efficietly. This ca be achieved through what is called CPU schedulig [7]. CPU Schedulig refers to a set of policies ad mechaisms to cotrol the order of work to be performed by a computer system. The CPU schedulig is oe of the most importat tasks of the operatig system []. The eed for a schedulig algorithm to achieve the efficiecy of the CPU arises from the requiremet for most moder systems to perform multitaskig (execute more tha oe process at a time) ad multiplexig (trasmit multiple flows simultaeously). CPU Schedulig is the act of selectig the ext process for the CPU to service, oce the curret process leaves the CPU idle. Some basic CPU schedulig algorithms are listed below: 1. First-Come First-Serve (FCFS) By far the simplest CPU-schedulig algorithm is the firstcome, first-served (FCFS) schedulig algorithm. The implemetatio of the FCFS policy is easily maaged with a FIFO queue. Whe a process eters the ready queue, its PCB is liked oto the tail of the queue. The average waitig time uder the FCFS policy, however, is ofte quite log [2]. 2. Shortest-Job-First () This is a priority based algorithm which associates with each process the legth of the process's ext CPU burst [4]. Whe the CPU is available, it is assiged to the process that has the smallest ext CPU burst. If the ext CPU bursts of two processes are the same, FCFS schedulig is used. The schedulig algorithm gives the miimum average waitig time for a give set of processes. The real difficulty with the algorithm is kowig the legth of the ext CPU request. The algorithm a optimal algorithm because it produces miimum average waitig time, average turaroud time ad umber of cotext switches. 3. Schedulig (PS) A priority umber is associated with each process. The CPU is allocated to the process with the highest priority. If there are multiple processes with same priority, the FCFS is used to allocate the CPU. A variatio of this scheme allows preemptio of the curret process wheever a higher priority process arrives. Aother variatio of the policy adds a agig scheme, where the priority of a process icreases as it remais i the ready queue. 4. Roud-Robi Schedulig (RR) This algorithm is especially desiged for time-sharig systems; each process gets a small uit of CPU time. This algorithm allows the first process i the queue to ru util it expires its time, ad the rus the ext process i the queue. I a situatio where a process eeds more time, the process rus for the full legth of the time quatum ad the it is preempted ad the added to the tail of the queue. 1.1 Performace Criteria The various CPU schedulig algorithms have differet properties, ad the choice of a particular algorithm may favor oe class of processes over aother. For selectio of a 24

Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 algorithm for a particular situatio, properties of various algorithms must be cosidered. The schedulig criteria iclude the followig [1]: 1. Cotext Switch: A cotext switch is process of storig ad restorig cotext (state) of a preempted process, so that executio ca be resumed from same poit at a later time. 2. Throughput: Throughput is defied as umber of processes completed per uit time. Cotext switchig ad throughput are iversely proportioal to each other. 3. CPU Utilizatio: This is a measure of how much busy the CPU is. Usually, the goal is to maximize the CPU utilizatio. 4. Turaroud Time: Turaroud time refers to the total time which is spet to complete the process.. Waitig Time: Waitig time is the total time a process has bee waitig i ready queue. 6. Respose Time: respose time is the time from the submissio of a request util the first respose is produced So, a good schedulig algorithm for real time ad time sharig systems must possess the followig characteristics: 1. Miimum cotext switches. 2. Maximum CPU utilizatio. 3. Maximum throughput. 4. Miimum turaroud time.. Miimum waitig time. 6. Miimum respose time. 1.2 Waitig Time Variace Variace is a statistical word, which is the measuremet of the spread betwee umbers i a data set. It measures how far each umber i the set is from the mea. σ 2 = (i μ)2 N (1) were σ 2 is te variace, N is te umber of processes, i te i t process ad μ is te mea of te processes A variace value of zero idicates that all values withi a set of umbers are idetical; all variaces that are o-zero are assiged positive umbers. A large variace idicates that umbers i the set are far from the mea ad each other, while a small variace idicates the opposite [3]. The waitig time variace is the measure of how far the waitig time of processes are from the mea of the processes waitig times. This implies that waitig time variace of processes should be miimized [6]. based CPU Schedulig Algorithms such as Shortest Job First Algorithm which assigs CPU to processes accordig to their burst times ad CPU Schedulig Algorithm which assigs CPU to processes accordig to their priorities suffer from the problem of starvatio. They are ot fair as they are biased to processes of high priorities [9]. Cosequetly the goal of this work is to miimize starvatio i the priority based CPU schedulig algorithms that is shortest job first ad priority schedulig algorithms thereby reducig the average waitig time, average turaroud time, average respose time, umber of cotext switches ad waitig time variace deviatio. 2. RELATED WORK Brich [1] proposed a algorithm amed Highest Respose Ratio Next (HRRN) CPU schedulig algorithm to address the shortcomigs of the Shortest Job First () ad Shortest Job Next (SJN) CPU Schedulig algorithms which are starvatio ad lack of fairess to loger burst time processes. It does this by usig equatio (2) to calculate the Respose Ratio of processes Respose Ratio = Waitig Time + Service Time Service Time (2) It allocates the CPU to the process with the Highest Respose Ratio ad it also takes care of the problem of determiig the ext burst time of processes i. Its disadvatage is that it is computatioally itesive ad its limitatio is that it does ot address user priority. Rakesh et al [8] proposed a ew variat of Roud Robi Schedulig algorithm by executig the processes accordig to a ew calculated fit factor f ad usig the cocept of dyamic time quatum. Geerally with every process three factors are associated. These factors are user priority, burst time ad arrival time. Above factors play a importat role to decide i which sequece the processes will be executed. Sortig accordig to the importace of these factors, user priority comes first, the the burst time ad at last the arrival time of the processes. If all the 3 factors are mixed up to calculate a ew factor i.e. Fit Factor f which will decide the order of executio the average waitig time, average turaroud time ad umber of cotext switches will be decreased. So to icrease the resposiveess of the system, RR algorithm should be used. Geerally i RR algorithm, processes are take from the ready queue i FCFS maer for executio. But i the proposed algorithm, f is calculated for each process. The process havig the lowest f value will be scheduled first. The two importat criteria that decide the early executio of processes are higher user priority ad shorter burst time. As user priority has higher importace tha other factors, so it is give a weight age of 6% ad burst time is give 4%, assumig that all the processes have same arrival time i.e. arrival time =. Let the User = UP, User Weight = UW, Shorter Burst time = SP, Burst time Weight = BW. The Fit Factor f ca be calculated as f = UP UW + SP BW (3) Dyamic time quatum is used i order to overcome the limitatios of static RR. To get the optimal time quatum, media of the remaiig burst time is take as the time quatum. Saxea ad Agarwal [9] desiged a algorithm kow as Desig ad Performace Evaluatio of Optimum Service Time Cocept for Roud Robi Algorithm (). Geerally, with every process, three factors are associated. These factors are user priority, burst time ad arrival time. These factors play a importat role to decide i which sequece the processes will be executed. Sice the algorithm is a priority based system, the cocept of Optimum was employed, which combies user defied priority, effect of shorter burst time ad effect of arrival time i a way so as to achieve better turaroud time ad average waitig time. A weight of. is assiged to user or system defied priority, a weight of.3 to burst time ad.2 to arrival time. This esures that user defied priority; burst time; ad arrival time get cosideratio while decidig order of executio of processes. A higher priority process gets a higher umber; a 2

Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 shorter process also gets a higher umber; ad a process that arrived earlier also gets a higher umber i the umberig scheme. A Optimum OP is give as: OP =. P +.3 BT +.2 AT (4) Where P is user or system defied priority; BT is priority umber assiged accordig to shorter burst time; ad AT is priority umber assiged accordig to early arrival of the process. A time quatum was selected while takig ito accout the same cosideratios that is take while selectig time quatum for RR algorithm. The Optimum service time OST for each process is give by equatio (): OST i = OP i q () Where OST i is the service time of process with Optimum OP i, q is the decided time quatum. All the processes are placed i a priority queue. After calculatig the service time of each process, CPU is assiged to the process with highest optimum service time. I case of coflict, the process with shorter burst time is give preferece. If coflict still persists the process that arrived earlier is give preferece. The process decided executes for a period that is equal to optimum service time of the process OST i or its burst time whichever is smallest. I case a process or the set of processes with same value of OP, which so ever is applicable, fiish executio after a sigle roud, the value of OST is redistributed removig the value of OST of fiished process ad redistributig the value of OST accordigly. 3. THE PROPOSED ALGORITHMS The proposed CPU schedulig algorithms use Efficiecy factor values to assig priority to processes which will be used for CPU allocatio. The Efficiecy factor value for the proposed uses equatio (6): E = BTW + WW (6) Where BTW is Burst time Weight ad WW is Waitig time Weight. The first process to arrive the arrival queue is scheduled first sice it is the oly process i the system the ad it is allocated the CPU to execute for the period of its burst time. By the time it has fiished executig, some processes will have arrived the arrival queue their efficiecy values is calculated by fidig the Burst Tme Weight (BTW) for all the processes that arrived withi this period so that the process with the least burst time is give a BTW of 1. All other processes are give BTW i ascedig order of their burst times. Also each process is give Waitig Time Weight (WW), accordig to their arrival times so that the first process to arrive is give a WW of 1. All other processes uder cosideratio are give WW of 2, 3 util all processes uder cosideratio are give WW. The the E- value of each process will be computed usig equatio (6) ad the process with the lowest E-value is scheduled first followed by the process with ext lower E-value util all processes that arrived the system have fiished executig. This process of determiatio of E-values ad schedulig of processes is performed util there is o process remaiig i the arrival ad ready queues. The Efficiecy factor value for the proposed schedulig algorithm uses equatio (7): E = PW + BTW + WW (7) where, PW is Weight, BTW is Burst time Weight ad WW is Waitig time Weight. Similarly, for the priority (PS) category, the same method as i the case of is employed but with the iclusio the Weight (PW), which is calculated based o the priority values of the processes i which the process with the highest priority is give a priority weight of 1 ad all other processes are give PW of 2, 3 util all processes uder cosideratio are give PW. The the E-value of each process will be computed usig equatio (7) ad the process with the lowest E-value is scheduled first followed by the process with ext lower E-value util all processes that arrived the system have fiished executig. This process of determiatio of E-values ad schedulig of processes is performed util there is o process remaiig i the arrival ad ready queues. 3.1 The pseudo code of the Proposed Based CPU Schedulig Algorithms This pseudo code illustrates how the priority based CPU schedulig algorithms work i.e. the priority ad shortest job first CPU schedulig algorithms. Step 1: Start INPUT: (N), Burst Time (BT) of processes, Arrival Time (AT) of processes, (PRIO) of processes, Queue READY, Queue ARRIVAL OUTPUT: Number of Cotext Switches (NCS), Average Waitig Time (AWT), Average Turaroud Time (ATAT), Waitig Time Variace Deviatio (WTVD) ad Average Respose Time (ART) Step 2: NCS = ; AWT = ; ATAT = ; ART = ; WTVD = ; BT = uiform a, b ; AT = Poisso (rate); PRIO = Expoetial rate ; Last Poit = ; = N; Step 3: For i = 1 to efficiecy factor i = ; // efficiecy factor Step 4: WHILE (ARRIVAL! = NULL) Step : WHILE (READY! = NULL) Step 6: For i = 1 to REQUEST Process i // Fill the ready queue //accordig to Arrival Time Assig priority weight, burst time weight ad arrival weight usig the geerated values based o the proposed algorithm Step 7: For i = 1 to if algoritm == efficiecy factor i = BTW + WW else if algoritm == priority 26

END if efficiecy factor i = PW + BTW + WW Mi = efficiecy factor[1] Step 8: For (i = 1 to 1 ) If efficiecy factor i < Mi //sort processes accordig // to lowest efficiecy factor END if Mi = efficiecy factor i efficiecy factor i = efficiecy factor i+1 efficiecy factor i+1 = Mi Step 9: For (i = 1 to ) Last Poit = Last Poit + BT i TAT i = Last Poit AT i WT i = TAT i BT i RT = TAT i BT i BT i = NCS i = NCS i + 1 END WHILE END WHILE Step 1: uiform (a, b) { // geerate radom values usig // uiform distributio } a + rad,1 (b a) Step 11: Poisso (rate) { // geerate radom values usig // Poisso distributio k = p = 1 l = e rate do { k = k + 1 p = p rad,1 }wile p l 3.2.1 Shortest Job First () 3.2.2 Schedulig (PS) Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 } k = k 1 retur k Step 12: Expoetial (rate) { // geerate radom values // usig expoetial distributio retur log(1 rad(,1)) rate } } Step 13: Calculate OUTPUT parameters i=1 WT i AWT = i=1 TAT i ATAT = i=1 RT i ART = i=1(wt i AWT) 2 WTV = For (i = 1 to k ) //k stads for the algorithm uder cosideratio ad opt is the algorithm with the least waitig time variace. END Figure 1: Gatt chart represetatio of WTVD k = WTV k WTV opt WTV opt 1% 3.2 Illustrative Examples To demostrate the previous cosideratios, this example is cosidered, i which each process with its burst ad arrival time as show i Table 4.1, where the time quatum used i is 1ms. The values were chose radomly. Table 1: Process Table PR_ID AT BT PRIO P1 3 1 P2 1 2 6 P3 3 2 4 P4 4 3 P 6 1 7 P6 7 11 P7 9 6 8 P8 12 4 9 P9 13 3 1 P1 1 2 P11 1 2 P12 1 6 13 P13 18 7 12 P1 P2 P3 P P4 P8 P1 P9 P6 P11 P7 P12 3 7 8 12 16 18 21 26 31 37 43 P13 P1 P3 P4 P2 P P7 P9 P11 P1 P8 P6 P13 P12 3 9 11 12 18 21 26 28 32 37 44 Figure 2: Gatt chart represetatio of CPU Schedulig Algorithm 27

4 8 1 26 42 Average Waitig Time Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 3.2.3 Proposed Shortest Job First P1 P2 P3 P P4 P6 P1 P9 P8 P7 P11 P12 P13 3 7 8 12 17 19 22 26 32 37 43 3.2.4 Proposed Schedulig Figure 3: Gatt chart represetatio of Proposed Shortest Job First 3 7 11 12 17 2 22 27 33 37 43 Figure 4: Gatt chart represetatio of Proposed Schedulig 3.2. 3 9 11 12 18 21 26 28 32 37 44 Figure : Gatt chart represetatio of Algorith ms P1 P3 P2 P4 P P6 P9 P1 P11 P7 P8 P12 P1 P2 P3 P4 P6 P P7 P8 P9 P1 P11 P12 Table 2: Comparative Table AW T ATA T AR T NC S WTV D (%) WTV D (%) 8.31 13.31 8.3 16.76 9.77 13.62 9.8 18.93 Pro. 8.62 12.46 8.6 Pro. 9.1 13 9.1 9.46 13.21 9. 3.1 29.62 Table 2 shows the comparative results of the algorithms uder study. I the category, the proposed algorithm produced the best result followed by the traditioal algorithm ad the. I the priority category the proposed algorithm produced the best result followed by the traditioal priority algorithm followed by. 4 SIMULATION I this paper, the followig five performace criteria are studied: AWT, ATAT, ART, NCS ad WTVD. The evaluatio is doe usig a simulatio by geeratig processes radomly with Uiform statistical distributio to geerate burst times of the processes. The simulatio is doe i two differet categories; i the first category (i.e. the Shortest Job First ()) cosistig of:, the ew ad Optimum Service Time Roud Robi CPU Schedulig algorithms ad i the secod category (i.e. the Schedulig (PS)) cosistig of: PS, the ew PS ad Optimum Service Time Roud Robi CPU Schedulig algorithms to observe these criteria. The simulatio eviromet where all the experimets were performed was a sigle processor eviromet ad all the processes are idepedet ad CPU boud, o process was I/O boud ad the system was also assumed to have o cotext switch cost. A process geerator routie to geerate the process sets was built. Each process i the process set is a tuple: <(process_id, arrival_time, CPU_time, priority)>. The process arrival was modeled as a Poisso radom process. Hece, the iter-arrival times are Poisso distributed. A process arrival geerator was developed to take care of the radom arrival of differet processes to the system. The geerator produces the iter-arrival times utilizig some specific mea (arrival itesity) of the distributio fuctio. Burst time (i.e. the CPU_time) was geerated usig uiform distributio. Process priority (i.e. priority) was geerated usig expoetial distributio. A process burst time geerator was developed to take care of the radom burst time of differet processes i the system ad also a process priority geerator was developed to take care of the radom priority of differet processes i the system. 4.1 Results obtaied usig uiform distributio to geerate burst time The followig shows the relatioships betwee the CPU schedulig algorithms uder study usig processes geerated by uiform distributio with burst times ragig betwee 1 ad 1ms ad time quatum of 1ms used by. 4.1.1 First category 9 8 7 6 4 3 2 1 Figure 6: Graph of Average Waitig Time usig Figure 6 shows the overall graphical result of the Average Waitig Time for all cases of values take. It was observed from the graph that the traditioal algorithm is better tha the proposed algorithm while the proposed algorithm is better tha i terms of miimizig AWT. P13 P13 28

9 18 34 Averagr Respose Time 9 18 34 Waitig Time Variace Deviatio 9 18 34 6 13 28 Average Turaroud Time Number of Cotext Switches Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 1 6 8 6 4 4 2 3 2 1 Figure 7: Graph of Average Turaroud Time usig Figure 7 shows the overall graphical result of the Average Turaroud Time for all cases of values take. It was observed from the graph that the traditioal algorithm is better tha the proposed algorithm while the proposed algorithm is better tha i terms of miimizig ATAT. Figure 8shows the overall graphical result of the Average Respose Time for all cases of values take. It was observed from the graph that the traditioal algorithm is better tha the proposed algorithm while the proposed algorithm is better tha i some cases i terms of miimizig ART. 9 8 7 6 4 3 2 1 Figure 8: Graph of Average Respose Time usig Figure 9: Graph of Number of Cotext Switches usig Figure 9 shows the overall graphical result of the Number of Cotext Switches for the same processes. It was observed from the graph that the traditioal algorithm ad the proposed algorithm produce the same umber of cotext switches which is better tha that of. 18 16 14 12 1 8 6 4 2 Figure 1: Graph of Waitig Time Variace Deviatio usig Figure 1 shows the overall graphical result of the Waitig Time Variace Deviatio for the same processes. It was observed from the graph that the traditioal algorithm is better tha the proposed algorithm while the proposed algorithm is better tha i terms of miimizig WTVD. From the results of the two schedulig algorithms ( ad ) compared with the proposed algorithm (the ew ), it has show that the traditioal produced best Average Waitig Time (AWT), Average Turaroud Time (ATAT), Average Respose Time (ART) ad Waitig Time Variace Deviatio (WTVD) compared with the proposed ew. But they both produced the same 29

Average Turaroud Time 9 18 34 Number of Cotext Swithes 6 13 28 9 18 34 Average Waitig Time Averagr Respose Time Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 Number of Cotext Switches (NCS). The ew proposed produced better results compared with with respect to Average Waitig Time (AWT), Average Turaroud Time (ATAT), Average Respose Time (ART), Number of Cotext Switches (NCS) ad Waitig Time Variace Deviatio (WTVD). 4.1.2 Secod category 1 8 observed from the graph that gives the best average respose time followed by the proposed algorithm ad lastly the traditioal algorithm. 1 8 6 6 4 2 New_Proir ity 4 2 New_Proirit y Figure 11: Graph of Average Waitig Time usig Figure 11shows the overall graphical result of the Average Waitig Time for all cases of values take. It was observed from the graph that gives the least average waitig time while the proposed algorithm gives a better average waitig time tha the traditioal algorithm. 9 8 7 6 4 3 2 1 6 1328 New_Proiri ty Figure 12: Graph of Average Turaroud Time usig Figure 12 shows the overall graphical result of the Average Turaroud Time for all cases of values take. It was observed from the graph that gives the least average turaroud time while the proposed algorithm gives a better average turaroud time tha the traditioal algorithm. Figure 13 shows the overall graphical result of the Average Respose Time for all cases of values take. It was Figure 13: Graph of Average Respose Time usig 6 4 3 2 1 New_Proirit y Figure 14: Graph of Number of Cotext Switches usig Figure 14 shows the overall graphical result of the Number of Cotext Switches for the same processes. It was observed from the graph that the traditioal algorithm ad the proposed algorithm produce the same umber of cotext switches which is better tha that of. Figure 1 shows the overall graphical result of the Waitig Time Variace Deviatio for the same processes. It was observed from the graph that the proposed algorithm is the best algorithm i terms of miimizig waitig time variace deviatio followed by ad the the traditioal algorithm. This shows that processes with low priorities will ot starve i the proposed algorithm. 3

9 18 34 Waitig Time Variace Deviatio Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 14 12 1 8 6 4 2 Figure 1: Graph of Waitig Time Variace Deviatio usig From the results of the two schedulig algorithms ( ad ) compared with the proposed algorithm (the ew ), it has show that the ew proposed priority produced best Average Waitig Time (AWT), Average Turaroud Time (ATAT), Average Respose Time (ART) ad Waitig Time Variace Deviatio (WTVD) compared to the traditioal schedulig algorithm. But they both produced the same Number of Cotext Switches (NCS). The ew proposed algorithm produced better results compared with with respect to Number of Cotext Switches (NCS) ad Waitig Time Variace Deviatio (WTVD). Table 3: Performace of Algorithms Based o Metrics Used i Comparig Them for First Category Performace Metric Traditioal (%) New_Proir ity (%) AWT -47.86-4.96 ATAT -47.7-1.96 ART -47.86-4.6 NCS 2.8 WTVD -1 131.99 Table 4: Performace of Algorithms Based o Metrics Used i Comparig Them for Secod Category Performace Traditioal (%) Metric (%) AWT 7.36-3.34 ATAT 7.34-3.33 ART 7.36 -.9 NCS 2.8 WTVD 16.69 12.3 CONCLUSION This paper presets a algorithm that miimized starvatio i priority based CPU schedulig algorithms. This has bee doe by modifyig the optimum priority i Saxea ad Agarwal (212) by itroducig the cocept of EFFICIENCY FACTOR ad applyig it to the priority based CPU schedulig algorithms i order to reduce average waitig time, average turaroud time, average respose time ad waitig time variace deviatio. The priority based CPU schedulig algorithms were grouped ito two groups i.e. the shortest job first ad the priority groups. I each group, the proposed algorithm with the traditioal algorithm i that with were implemeted i Java ad their results were compared based o Average Waitig Time (AWT), Average Turaroud Time (ATAT), Average Respose Time (ART), Number of Cotext Switches (NCS) ad Waitig Time Variace Deviatio (WTVD) for differet categories of processes that were geerated radomly usig either Expoetial, Uiform or Normal distributios to geerate the burst time; Uiform or Expoetial distributios to geerate priority ad Poisso distributio to geerate arrival time of processes. The simulatio results show that with processes geerated usig ragig betwee 1 ad 1, priority usig Expoetial distributio time at a rate of.2, arrival time usig Poisso distributio arrivig at the rate of 3 millisecods per process ad time quatum of 1ms used by. I the category, ad compared with the proposed algorithm (the ew ), it has show that the traditioal produced better AWT, ATAT, ART ad WTVD compared with the proposed ew. But they both produced the same NCS. The ew proposed produced better results compared with with respect to AWT, ATAT, ART, NCS ad WTVD. Ad i the PS category, ad compared with the proposed algorithm (the ew ), it has show that the ew proposed priority produced better AWT, ATAT, ART ad WTVD compared to the traditioal schedulig algorithm. But they both produced the same NCS. The ew proposed algorithm produced better results compared with with respect to NCS ad WTVD. The recommedatio i this work is to implemet the proposed priority algorithm istead of the traditioal priority algorithm, so as to miimize starvatio of processes. I the future, a more efficiet algorithm should be developed to miimize starvatio i Shortest Job First () algorithm. 6 REFERENCES [1] Brich, H. P. (1977). The Architecture of Cocurret Programs. Eglewood Cli s, NJ: Pretice Hall. [2] http://siber.cakaya.edu.tr/operatigsystems/ceg32 8/ode122.html. (.d.). Retrieved May 2, 214, from http://siber.cakaya.edu.tr. [3] http://www.merriamwebster.com/dictioary/variace. (.d.). Retrieved Jue 28, 214, from http://www.merriam-webster.com. [4] https://www.it.uu.se/edu/course/.../schedulig_algorit hms/hadout.pdf. (.d.). Retrieved May 2, 214, fromhttps://www.it.uu.se/edu/course/.../schedulig_al gorithms/hadout.pdf. [] Mehdi, N., Mehdi, S., Adel, N., Ad Ali, A. (212). The New Method Of Adaptive Cpu Schedulig Usig Foseca Ad Flemig s Geetic Algorithm. Joural 31

Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 Of Theoretical Ad Applied Iformatio Techology, 1-16. [6] Nog, Y., Xuepig, L., Toi, F., ad Xiaoyu, X. (27). Job schedulig methods for reducig waitig time variace. Computers ad Operatios Research, 369-383. [7] Oyetuji E.O ad Oluleye A. E. (29). Performace Assessmet of Some CPU Schedulig Algorithms. Research Joural of Iformatio Techology, 1 (1), 22-26. [8] Rakesh, M, Maas, D, Lakshmi, M. P ad Sudhashree. (211). Desig ad Performace Evaluatio of A New Proposed Fittest Job First Dyamic Roud Robi (FJFDRR) Schedulig Algorithm. Iteratioal Joural of Computer Iformatio Systems, 2 (2), 23-27. [9] Saxea, H. F., ad Agarwal, P. S. (212). Desig ad Performace Evaluatio of Optimum Service Time Cocept for Roud Robi Algorithm. Iteratioal Joural of Machie Learig ad Computig, 2 (2), 113-117. [1] Silberschatz, P. B. Galvi ad G. Gage. (26). Operatig System Cocepts. (7th, Ed.) Joh Wiley ad Sos Ic. 111 River Street, Hoboke NJ, 73, 13-168 IJCA TM : www.ijcaolie.org 32