Development of an optimized priority based cpu scheduling algorithm to minimize starvation of processes using an efficiency factor

 

Table Of Contents


  • <p> </p><p>TITLE PAGE………………………………………………………………………………………i<br>DECLARATION ……………………………………………………………………………………………………………. ii<br>CERTIFICATION …………………………………………………………………………………………………………. iii<br>DEDICATION ………………………………………………………………………………………………………………. iv<br>ACKNOWLEDGEMENT ……………………………………………………………………………………………….. v<br>ABSTRACT ………………………………………………………………………………………………………………….. vi<br>TABLE OF CONTENTS ………………………………………………………………………………………………. viii<br>LIST OF TABLES ………………………………………………………………………………………………………….. x<br>LIST OF FIGURES ……………………………………………………………………………………………………….. xi<br>LIST OF ABBREVIATIONS ………………………………………………………………………………………… xiii<br>

Chapter ONE

INTRODUCTION

  • ………………………………………………………………………………… 1<br>
  • 1.1Background of the Study ……………………………………………………………………………………………… 1<br>
  • 1.2Research Motivation and Goals ……………………………………………………………………………………. 2<br>
  • 1.3Research Aim and Objectives ………………………………………………………………………………………. 2<br>
  • 1.4Research Methodology ………………………………………………………………………………………………… 3<br>
  • 1.5Contribution to knowledge …………………………………………………………………………………………… 5<br>

Chapter TWO

LITERATURE REVIEW

  • ……………………………………………………………………… 6<br>
  • 2.1INTRODUCTION ………………………………………………………………………………………………………… 6<br>
  • 2.2OPERATING SYSTEM ………………………………………………………………………………………………… 6<br>2.
  • 1.1The Process State …………………………………………………………………………………………………. 7<br>2.
  • 1.2CPU Scheduling Algorithms …………………………………………………………………………………….. 8<br>2.
  • 1.3Performance Criteria ………………………………………………………………………………………….. 10<br>
  • 2.3Waiting Time Variance ……………………………………………………………………………………………… 11<br>
  • 2.4CPU Scheduling ………………………………………………………………………………………………………… 12<br>2.
  • 4.1The importance of priority in CPU Scheduling ………………………………………………………… 13<br>
  • 2.5Review of Priority Based CPU Scheduling Algorithms ………………………………………………… 13<br>
  • 2.6Observations on the Review Literatures Showing the Knowledge Gap Addressed by the Dissertation …………………………………………………………………………………………………………………………… 18<br>
  • 2.7Waiting Time Variance (WTV): …………………………………………………………………………………. 19<br>

Chapter THREE

SYSTEM DESIGN AND IMPLEMENTATION

  • MATERIALS AND METHOD ………………………………………………………… 21<br>
  • 3.1Introduction ………………………………………………………………………………………………………………. 21<br>
  • 3.2Assumption ……………………………………………………………………………………………………………….. 21<br>ix<br>
  • 3.3Efficiency Factor ……………………………………………………………………………………………………….. 21<br>
  • 3.4The pseudo code of the Proposed Priority Based CPU Scheduling Algorithms ……………………. 23<br>
  • 3.5Proposed Algorithm for Priority CPU Scheduling Algorithm………………………………………. 27<br>
  • 3.6Proposed Algorithm for Shortest Job First CPU Scheduling Algorithm ………………………. 30<br>
  • 3.7Time Complexity of the Proposed Priority Based CPU Scheduling Algorithm ……………………. 33<br>

Chapter FOUR

SYSTEM TESTING AND EVALUATION

  • RESULTS AND DISCUSSION …………………………………………………………. 35<br>
  • 4.1Introduction ………………………………………………………………………………………………………………… 35<br>
  • 4.2Illustrative Examples …………………………………………………………………………………………………… 35<br>4.
  • 2.1Shortest Job First (SJF) ………………………………………………………………………………………….. 36<br>4.
  • 2.2Priority Scheduling (PS) ………………………………………………………………………………………… 38<br>4.
  • 2.3Proposed Shortest Job First ………………………………………………………………………………….. 39<br>4.
  • 2.4Proposed Priority Scheduling ………………………………………………………………………………… 40<br>4.
  • 2.5OSTRR ………………………………………………………………………………………………………………… 41<br>
  • 4.3System Requirements …………………………………………………………………………………………………… 43<br>4.
  • 3.1Experimental Setup…………………………………………………………………………………………….. 43<br>
  • 4.4Results and Discussion ………………………………………………………………………………………………… 45<br>4.
  • 4.1Results obtained using normal distribution to generate burst time ………………………………. 46<br>4.4.
  • 1.1First category …………………………………………………………………………………………………… 47<br>4.4.
  • 1.2Second category ……………………………………………………………………………………………….. 53<br>4.
  • 4.2Results obtained using uniform distribution to generate burst time ……………………………… 58<br>4.4.
  • 2.1First category …………………………………………………………………………………………………… 59<br>4.4.
  • 2.2Second category ……………………………………………………………………………………………….. 65<br>4.
  • 4.3Results obtained using exponential distribution to generate burst time ………………………… 70<br>4.4.
  • 3.1First category …………………………………………………………………………………………………… 71<br>4.4.
  • 3.2Second category ……………………………………………………………………………………………….. 77<br>

Chapter FIVE

SUMMARY, CONCLUSION AND RECOMMENDATIONS

  • CONCLUSION AND RECOMMENDATION ………………….. 85<br>
  • 5.1Summary …………………………………………………………………………………………………………………… 85<br>
  • 5.2Conclusion ………………………………………………………………………………………………………………… 85<br>
  • 5.3Recommendation ……………………………………………………………………………………………………….. 88<br>REFERENCES …………………………………………………………………………………………………………….. 89<br>APPENDIX …………………………………………………………………………………………………………………………… 92<br>x<br>LIST OF TABLES<br>Table 3.1: Process Table ………………………………………………………………………………………………… 28<br>Table 3.2: Process Table for Priority CPU Scheduling Algorithm ……………………………………….. 30<br>Table 3.3: Process Table ………………………………………………………………………………………………… 31<br>Table 3.4: Process Table for Shortest Job First CPU Scheduling Algorithm …………………………. 33<br>Table 4.1: Process Table ………………………………………………………………………………………………… 35<br>Table 4.2: Comparative Table…………………………………………………………………………………………. 43<br>Table 4.3: Performance of Statistical Distributions in Generating Burst Times …………………….. 82<br>Table 4.4: Performance of Algorithms Based on Metrics Used in Comparing Them for First Category ………………………………………………………………………………………………………………………. 83<br>Table 4.5: Performance of Algorithms Based on Metrics Used in Comparing Them for Second Category ………………………………………………………………………………………………………………………. 84<br>xi</p><p>&nbsp;</p><p>&nbsp;</p> <br><p></p>

Project Abstract

<p> </p><p>The priority based CPU scheduling algorithm (i.e. Shortest Job First (SJF) or Priority Scheduling (PS)) is a kind of scheduling algorithm that assigns the CPU to processes based on the priority of each process. The shortcoming of both of these algorithms is starvation (i.e. starvation of processes with longer burst times in the case of SJF and starvation of processes with lower priorities in the case of PS). This dissertation proposes a new algorithm that introduces the concept of EFFICIENCY FACTOR which uses three properties which are priority, burst time and arrival time to compute one factor which is used to schedule processes in the case of the proposed Priority algorithm instead of only one factor that priority is in the case of traditional Priority algorithm and two properties which are burst time and arrival time to compute one factor which is used to schedule processes in the case of proposed Shortest Job First algorithm instead only one factor that is burst time in the case of traditional Shortest Job First algorithm. This proposed algorithm was implemented and benchmarked against SJF, PS and the Optimum Service Time Concept for Round Robin Algorithm (OSTRR) by Saxena and Agarwal (2012) using three different statistical distributions (namely Normal, Uniform and Exponential Distributions) to generate the burst times of the processes, two different statistical distributions (namely Uniform and Exponential Distributions) to generate the priorities of the processes and also, uses Poisson Distribution to generate the arrival times of processes. It is observed that in the SJF category, the traditional SJF produced better Average Waiting Time (AWT), Average Turnaround Time (ATAT), Average Response Time (ART) and Waiting Time Variance Deviation (WTVD) compared with the proposed SJF. But they both produced the same Number of Context Switches (NCS). The proposed SJF produced better results compared with OSTRR with respect to AWT, ATAT, ART, NCS and WTVD. While in the PS category, the proposed Priority produced better AWT, ATAT, ART and WTVD compared to the traditional Priority</p><p>&nbsp;</p> <br><p></p>

Project Overview

<p> INTRODUCTION<br>This chapter discusses the introductory part of this dissertation which comprises the background of the study, research motivation and goals which stipulate the research questions for which the dissertation provides answers, the aims and objectives of the research work, the methodology that is followed in the research and the contribution which the dissertation makes to knowledge.<br>1.1 Background of the Study<br>The Central Processing Unit (CPU) is an important component of the computer system; hence it must be utilized efficiently. This can be achieved through what is called CPU scheduling (Oyetunji and Oluleye, 2009). CPU Scheduling refers to a set of policies and mechanisms to control the order of work to be performed by a computer system. The CPU scheduling is one of the most important tasks of the operating system (Mehdi et al, 2012). The need for a scheduling algorithm to achieve the efficiency of the CPU arises from the requirement for most modern systems to perform multitasking (execute more than one process at a time) and multiplexing (transmit multiple flows simultaneously). The basic idea is to keep the CPU busy as much as possible by executing a user process or job until it must wait for an event, and then switch to another process. In multiprogramming systems, when there is more than one runnable process (that is ready to run on the CPU), the operating system must decide which one to activate as shown in Figure 1.1. The decision is made by the part of the operating system called the scheduler, using a scheduling algorithm (Suri and Sumit, 2012).<br>2<br>Figure1.1: The Traditional Process State Diagram (Silberschatz,et al. 2006)<br>1.2 Research Motivation and Goals<br>Priority based CPU Scheduling Algorithms such as Shortest Job First Algorithm which assigns CPU to processes according to their burst times and Priority CPU Scheduling Algorithm which assigns CPU to processes according to their priorities suffer from the problem of starvation. They are not fair as they are biased to processes of high priorities (Saxena and Agarwal 2012). Consequently the goal of this work is to minimize starvation in the priority based CPU scheduling algorithms that is Shortest Job First and Priority scheduling algorithms thereby reducing the average waiting time, average turnaround time, average response time, number of context switches and waiting time variance deviation.<br>1.3 Research Aim and Objectives<br>The aim of this dissertation is to develop an algorithm that minimizes starvation in priority based CPU scheduling algorithms. This has been done by modifying the optimum priority in Saxena and Agarwal (2012) and applying it to the priority based CPU scheduling algorithms in order to<br>3<br>reduce average waiting time, average turnaround time, average response time and waiting time variance deviation. This is achieved with the following objectives:<br>1. Develop a new algorithm based on OSTRR by Saxena and Agarwal (2012)<br>2. Implement the algorithm using Java programming language<br>3. Assess the algorithm side-by-side traditional Shortest Job First algorithm, traditional Priority algorithm and OSTRR by Saxena and Agarwal (2012)<br>1.4 Research Methodology<br>The research was conducted in two stages as follows: In the first stage, the following steps were taken<br>i. Values were assigned for process number, burst time, arrival time and priority randomly.<br>ii. The values assigned in i were used to calculate EFFICIENCY FACTORS for the processes both in the SJF and Priority categories.<br>iii. The processes were scheduled based on their EFFICIENCY FACTORS values.<br>iv. Compared the results for the proposed algorithm against the traditional priority based CPU scheduling algorithms and OSTRR by Saxena and Agarwal (2012) by the use of Gantt charts<br>In the second stage,<br>i. Developed an algorithm to reduce starvation in priority based CPU scheduling algorithms<br>ii. The data to be used was generated randomly using three different experiments as follows:<br>a. In the first experiment, the arrival time is generated using Poisson Distribution (because it is a probability distribution of a discrete random variable that stands<br>4<br>for the number (count) of statistically independent events, occurring within a unit of time or space Letkowski (2012)); while the burst time is generated using Normal/Gaussian Distribution (because it is the most widely known and used of all distributions. And also, it approximates many natural phenomena so well, it has developed into a standard of reference for many probability problems (<a target="_blank" rel="nofollow" href="https://math.berkeley.edu/~scanlon/m16bs04/ln/16b2lec31.pdf)">https://math.berkeley.edu/~scanlon/m16bs04/ln/16b2lec31.pdf)</a>) and the priority is generated using Exponential Distribution (because it is used to model the behavior of units that have a constant failure rate<br>(<a target="_blank" rel="nofollow" href="http://reliawiki.org/index.php/The_Exponential_Distribution))">http://reliawiki.org/index.php/The_Exponential_Distribution))</a>.<br>b. In the second experiment, the arrival time is generated using Poisson Distribution, the burst time is generated using Uniform Distribution (because it defines equal probability over a given range for a continuous distribution. For this reason, it is important as a reference distribution. It is also used in the generation of random numbers. That is, almost all random number generators generate random numbers on the (0,1) interval. For other distributions, some transformation is applied to the uniform random numbers<br>(<a target="_blank" rel="nofollow" href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm)">http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm)</a>) and the priority is generated using Exponential Distribution<br>iii. In the third experiment, the arrival time is generated using Poisson Distribution, the burst time is generated using Exponential Distribution and the priority is generated using Uniform Distribution.<br>5<br>Iii Simulated the algorithm developed in step i against the traditional priority based CPU scheduling algorithms and Optimum Service Time for Round Robin Algorithm(OSTRR) by Saxena and Agarwal (2012) using Java programming language,<br>iv. The comparison is done based on average waiting time, average turnaround time, average response time, number of context switches and waiting time variance deviation for the three different experiments on the priority based CPU scheduling algorithms and OSTRR by Saxena and Agarwal (2012)<br>1.5 Contribution to knowledge<br>The dissertation contributed to knowledge by optimizing the traditional priority CPU scheduling algorithms thereby reducing starvation using Efficiency Factor which makes use of three metrics that is arrival time, waiting time and priority of processes to obtain one optimal value to schedule each process instead of using only one metric that is the priority of a process to schedule the process in the case of traditional Priority algorithm. <br></p>

Blazingprojects Mobile App

📚 Over 50,000 Project Materials
📱 100% Offline: No internet needed
📝 Over 98 Departments
🔍 Software coding and Machine construction
🎓 Postgraduate/Undergraduate Research works
📥 Instant Whatsapp/Email Delivery

Blazingprojects App

Related Research

Computer Science. 4 min read

Adaptive Cybersecurity Threat Detection Using Machine Learning Techniques...

What This Project Is About This project focuses on developing a system that can detect cybersecurity threats, such as hacking attempts or malware, more effectiv...

BP
Blazingprojects
Read more →
Computer Science. 2 min read

AI-Powered Real-Time Language Translation System...

What This Project Is About This project involves creating a system that can understand and translate spoken language from one language to another instantly. The...

BP
Blazingprojects
Read more →
Computer Science. 3 min read

Developing an AI-Powered Personal Health Assistant Chatbot...

What This Project Is About This project focuses on creating a chatbot that uses artificial intelligence (AI) to help people manage their health. The chatbot wil...

BP
Blazingprojects
Read more →
Computer Science. 4 min read

Deep Learning-Based Real-Time Cybersecurity Threat Detection System...

This project is about creating a system that can automatically detect cybersecurity threats, such as hacking attempts or malware attacks, in real-time using adv...

BP
Blazingprojects
Read more →
Computer Science. 2 min read

Development of an AI-Powered Personalized Learning Platform...

This project is about creating a smart online learning platform that adapts to each student's individual needs and ways of learning. Traditional education metho...

BP
Blazingprojects
Read more →
Computer Science. 3 min read

Predicting Disease Outbreaks Using Machine Learning and Data Analysis...

The project topic, &quot;Predicting Disease Outbreaks Using Machine Learning and Data Analysis,&quot; focuses on utilizing advanced computational techniques to ...

BP
Blazingprojects
Read more →
Computer Science. 3 min read

Implementation of a Real-Time Facial Recognition System using Deep Learning Techniqu...

The project on &quot;Implementation of a Real-Time Facial Recognition System using Deep Learning Techniques&quot; aims to develop a sophisticated system that ca...

BP
Blazingprojects
Read more →
Computer Science. 4 min read

Applying Machine Learning for Network Intrusion Detection...

The project topic &quot;Applying Machine Learning for Network Intrusion Detection&quot; focuses on utilizing machine learning algorithms to enhance the detectio...

BP
Blazingprojects
Read more →
Computer Science. 2 min read

Analyzing and Improving Machine Learning Model Performance Using Explainable AI Tech...

The project topic &quot;Analyzing and Improving Machine Learning Model Performance Using Explainable AI Techniques&quot; focuses on enhancing the effectiveness ...

BP
Blazingprojects
Read more →
WhatsApp Click here to chat with us