Design and implementation of a modified median round robin algorithm (dimmrra)

 

Table Of Contents


  • <p> Declaration ……………………………………………………………………………………………………………………. iii<br>Certification ………………………………………………………………………………………………………………….. iv<br>Dedication ……………………………………………………………………………………………………………………… v<br>Acknowledgement …………………………………………………………………………………………………………. vi<br>Abstract ……………………………………………………………………………………………………………………….. vii<br>Table of Contents …………………………………………………………………………………………………………. viii<br>List of Figures ……………………………………………………………………………………………………………….. xi<br>List of Tables ………………………………………………………………………………………………………………. xiii<br>List of Abbreviations ……………………………………………………………………………………………………….. i<br>

Chapter ONE

INTRODUCTION

  • …………………………………………………………………………….. 1<br>
  • 1.1BACKGROUND OF THE STUDY …………………………………………………………………….. 1<br>
  • 1.2PROBLEM STATEMENT …………………………………………………………………………………. 4<br>
  • 1.3JUSTIFICATION OF THE STUDY ……………………………………………………………………. 5<br>
  • 1.4AIM AND OBJECTIVES …………………………………………………………………………………… 5<br>
  • 1.5SCOPE …………………………………………………………………………………………………………….. 6<br>
  • 1.6METHODOLOGY …………………………………………………………………………………………….. 6<br>

Chapter TWO

LITERATURE REVIEW

  • …………………………………………………………………… 8<br>
  • 2.1THEORITICAL FRAME WORK ……………………………………………………………………….. 8<br>
  • 2.2MULTIPROGRAMMING ………………………………………………………………………………… 11<br>
  • 2.3SCHEDULING ……………………………………………………………………………………………….. 12<br>2.
  • 3.1Job Scheduling Versus Process Scheduling …………………………………………………… 12<br>
  • 2.4PROCESS SCHEDULER …………………………………………………………………………………. 13<br>
  • 2.5JOB AND PROCESS STATUS …………………………………………………………………………. 15<br>ix<br>
  • 2.6PROCESS CONTROL BLOCKS ………………………………………………………………………. 18<br>2.
  • 6.1Process Identification …………………………………………………………………………………. 18<br>2.
  • 6.2Process Status……………………………………………………………………………………………. 19<br>2.
  • 6.3Process State …………………………………………………………………………………………….. 19<br>2.
  • 6.4Accounting ……………………………………………………………………………………………….. 20<br>
  • 2.7PCBs AND QUEUING …………………………………………………………………………………….. 21<br>
  • 2.8PROCESS SCHEDULING POLICIES ………………………………………………………………. 22<br>
  • 2.9PROCESS SCHEDULING ALGORITHMS ……………………………………………………….. 25<br>2.
  • 9.1First-Come First Served ……………………………………………………………………………… 25<br>2.
  • 9.2Shortest Job Next ………………………………………………………………………………………. 27<br>2.
  • 9.3Priority Scheduling ……………………………………………………………………………………. 29<br>2.
  • 9.4Shortest Remaining Time …………………………………………………………………………… 30<br>2.
  • 9.5Round Robin …………………………………………………………………………………………….. 33<br>
  • 2.10STATIC RR VERSUS DYNAMIC RR SCHEDULING TECHNIQUE ………………. 37<br>
  • 2.11CONTEXT SWITCHING ……………………………………………………………………………… 38<br>
  • 2.12REVIEW OF VARIOUS DYNAMIC RR CPU SCHEDULING TECHNIQUE …… 39<br>

Chapter THREE

SYSTEM DESIGN AND IMPLEMENTATION

  • DESIGN OF A MODIFIED MEDIAN ROUND ROBIN ALGORITHM 46<br>
  • 3.1INTRODUCTION ……………………………………………………………………………………………. 46<br>
  • 3.2MMRRA ALGORITHM…………………………………………………………………………………… 48<br>
  • 3.3MMRRA FLOW CHART …………………………………………………………………………………. 49<br>
  • 3.4EVALUATION: CLASSICALRR, IRR, IMRR, HLVQTRR, DRRCP &amp; MMRRA .. 50<br>3.
  • 4.1Generated data from the proposed algorithm …………………………………………………. 50<br>3.
  • 4.2Generated data from DRRCP………………………………………………………………………. 62<br>3.
  • 4.3Generated dada from IMRRSJF…………………………………………………………………… 71<br>x<br>

Chapter FOUR

SYSTEM TESTING AND EVALUATION

  • EVALUATION OF THE DESIGNED MMRRA ………………………………. 80<br>
  • 4.1INTRODUCTION ……………………………………………………………………………………………. 80<br>
  • 4.2DESCRIPTION OF THE SIMULATION …………………………………………………………… 80<br>
  • 4.3PSEUDOCODE FOR THE SIMULATION ………………………………………………………… 82<br>
  • 4.4EVALUATION CRITERIA ……………………………………………………………………………… 82<br>
  • 4.5ALGORITHM EVALUATION …………………………………………………………………………. 84<br>
  • 4.6DISTRIBUTION FUNCTION USED ………………………………………………………………… 85<br>
  • 4.7ALGORITHM FOR THE EXPONENTIAL DISTRIBUTION …………………………….. 86<br>
  • 4.8THE BEST WAY OF CHOOSING PERCENTAGE (for a method) ………………………. 86<br>
  • 4.9PRESENTATION OF RESULTS. ……………………………………………………………………… 89<br>
  • 4.10DISCUSSION OF RESULTS. ……………………………………………………………………….. 93<br>

Chapter FIVE

SUMMARY, CONCLUSION AND RECOMMENDATIONS

  • CONCLUSION AND RECOMMENDATION ……………….. 97<br>
  • 5.1SUMMARY ……………………………………………………………………………………………………. 97<br>5.
  • 1.1Advantage of MMRRA over IMRRSJF ……………………………………………………….. 98<br>5.
  • 1.2Advantage of MMRRA over HLVQTRR……………………………………………………… 99<br>5.
  • 1.3Advantage of MMRRA over DRRCP ………………………………………………………… 100<br>5.
  • 1.4Advantage of MMRRA over IRR ………………………………………………………………. 101<br>5.
  • 1.5Some Major Challenges of DYNAMIC RR Algorithms. ………………………………. 101<br>5.
  • 1.6Critisism With Respect To Context Switching On Most Of the proposed Round Robin Algorithms reviewed …………………………………………………………………………………… 103<br>
  • 5.2CONCLUSION ……………………………………………………………………………………………… 104<br>
  • 5.3RECOMMENDATION ………………………………………………………………………………….. 105<br>REFERENCES …………………………………………………………………………………………………………… 106<br>Appendix : Source code ………………………………………………………………………………………………. 111<br>xi <br></p>

Project Abstract

<p> </p><p>Central Processing Unit (CPU) scheduling involves a careful examination of pending processes to determine the most efficient way to service the requests. Several scheduling algorithms have been designed to arrange accesses to computer resources efficiently. Round robin scheduling algorithm (RRSA) is an attractive algorithm but suffers from the problem of time quantum determination. In the classical round robin algorithm, quantum time is fixed throughout the scheduling process. This static nature made it very difficult to optimize the algorithm. The only solution to this problem is to provide a quantum time that changes dynamically during execution. Major challenges of dynamic round robin schedulers reported in the literature are they do not include Average Response Time as a criterion for comparison and they do not bother much on preempting processes with negligible completion time after executing for a given time quantum leading to an increase in the number of context switches. This research proposed an algorithm, the Modified Median Round Robin (MMRRA), with a dynamic time quantum aimed at reducing the overhead of the RRSA. The proposed algorithm was implemented and evaluated against the following five algorithms in the literature Improved Round Robin (IRR), Improved Mean Round Robin with Shortest Job First (IMRRSJF), Dynamic Round Robin with Controlled Preemption (DRRCP), Half Life Variable Quantum Time RR (HLVQTRR) and CLASSICAL RR. Which in turns, proved to perform better in terms of AWT, ATAT and NCS. But, in terms of ART, HLVQTRR has the best result but still the result for MMRRA was not bad.</p><p>&nbsp;</p> <br><p></p>

Project Overview

<p> INTRODUCTION<br>1.1 BACKGROUND OF THE STUDY<br>Process scheduling algorithm has been an interesting field of study in Operating Systems. Scheduling is a key concept in computer multitasking, multiprocessing and real-time operating system designs. The operating system uses some sort of scheduling techniques to allocate resources to processes in the ready queue. Scheduling refers to the way processes are assigned to run on available Central Processing Unit (CPU). Certain CPU scheduling techniques or algorithms have been developed. The overall goal of these algorithms is to: maximize CPU utilization, reduce average waiting time and average turnaround time, reduce the number of context switching, increase throughput and try as much as possible to be fair to all processes. Processor Manager is in charge of allocating a single CPU to execute the jobs of those users.In a single user system, the processor is busy only when the user is executing a job but, at any other time it is idle. Processor Management in this environment is simple. However, when there are many users with many jobs on the system (this is known as a multiprogramming environment), the processor must be allocated to each job in a fair and efficient manner, which can be a complex task. The processor, also known as the CPU (Central Processing Unit), is the part of the machine that performs the calculations and executes the programs.<br>2<br>Multiprogramming requires that the processor be allocated to each job or to each process for a period of time and de-allocated at an appropriate moment. If the processor is de-allocated during a program‟s execution, it must be done in such a way that it can be restarted later as easily as possible, this is a delicate procedure. A single processor can be shared by several jobs or several processes, but if, and only if, the operating system has a scheduling policy, as well as a scheduling algorithm, to determine when to stop working on one job and proceed to another. Some examples of these scheduling algorithms are: i First Come First Serve (FCFS): Attends to processes in their order of arrivals. ii Shortest Job First (SJF): Attends to processes in an increasing order of their burst time. iii Round Robin (RR): Gives an equal time slice (Quantum) to every process in the ready queue in a circular manner. If the Quantum time is greater or equal to the burst time of the process it will run to completion without being preempted. Otherwise, the process must be preempted after it must have exhausted its time Quantum and then return to the tail of the ready queue to take turn. iv Priorities scheduling: Here, processes are attended to based on their priorities.<br>The preemptive nature of Round Robin scheduling can only suggest that it is designed to handle time sharing systems. As bad as context switching may be, it is highly needed in time sharing systems, although too much context switching is an overhead. Another issue is what should be the Quantum time? This is even more serious because smaller Quantum time will increase the<br>3<br>number of context switching, and a larger value will automatically change the system to ordinary FCFS. Therefore, an optimal Quantum time is what we need. In the Classical RR the quantum time is static. This is why it is sometimes called Static RR. Here, the quantum time is gotten from the average of the processes‟ burst time in the ready queue and remain constant throughout the entire procedure. The static nature made it difficult for maximum improvement, and as such research on Dynamic RR is on. The idea of dynamic RR is to use more than one different quantum time for processes depending on their circumstances. Some of the proposed dynamic RR are: Improved Mean Round robin with shortest job first scheduling, Self-Adjustment time quantum in Round Robin algorithm depending on Burst time of the New Running Processes (SARR), An Improved Round Robin CPU Scheduling Algorithm (IRR), A new Round Robin Based Scheduling Algorithm for Operating System, Dynamic Quantum Using the Mean (An Algorithm), Half-life variable quantum time RR (HLVQTRR), Dynamic Round Robin with Control Preemption (DRRCP) etc. So far, from the various proposed Dynamic RR, it has been proven to be more efficient than the Classical RR when compared and evaluated on the basis of number of context switching, average waiting time and average turnaround time. The purpose of this research is to develop a new dynamic RR algorithm base on the ideas gotten from the different scheduling algorithms like IRR, IMRR, HLVQTRR, DRRCP etc. that will provide answers to some of the critical setbacks experienced in the classical RR and the various proposed dynamic RRs. Comparative analysis would be carried out on Six RR algorithms to enable this research work reach a meaningful conclusion.<br>4<br>1.2 PROBLEM STATEMENT<br>The greatest challenge in RR is Quantum time. That is, what should be the Quantum time? In the classical RR, Quantum time is fixed throughout the scheduling process. This static nature made it very difficult to optimize the algorithm. In order to reduce the number of context switching, average waiting time and average turnaround time, we must find a dynamic Quantum time. This will provide a Quantum time that change automatically according to a circumstance so as to improve the general performance of the system. Each of the proposed dynamic RR performs better when compared with static RR on the basis of number of context switching, average waiting time and average turnaround time. If that is the case, which among them should be implemented and why? In order to answer the above question, the Modified Median RR (MMRRA) was proposed. Another problem is that, most of these algorithms do not care to include ART as a criteria for comparison. And, they do not bother much on preempting processes with negligible left over. Mis-calculation of number of context switching (NCS) is another problem to most of these algorithms. The MMRRA would be compared against the classical RR, Improved Round Robin(IRR), Improved Mean Round Robin(IMRR), Half Life Variable Quantum Time RR(HLVQTRR) and Dynamic Round Robin with Controlled Preemption (DRRCP) using analytic and simulation techniques.<br>5<br>1.3 JUSTIFICATION OF THE STUDY<br>So far, a lot of research papers having excellent ideas on dynamic RR algorithms have been published eg IRR, HLVQTRR etc. But most of these papers only considered average waiting time, average turnaround time and number of context switching as the criteria for comparison and evaluation. They did not bother to include other criteria like multiprogramming, response time and so on. Since dynamic RR has proven to provide better results, a new dynamic RR CPU scheduling algorithm should be developed that will provide better solutions to both the classical RR and most of the proposed dynamic RR algorithms that were reviewed. The evaluation would be done analytically and also through the use of simulation on the following criteria: average waiting time; average turnaround time; number of context switching; response time; and priority on shorter jobs. Random variable will be generated using exponential distribution function to perform the analysis. In general, the concept of CPU scheduling would be thoroughly presented to serve as a learning resource material.<br>1.4 AIM AND OBJECTIVES<br>The aim of this work is to propose a better solution to the classical and most of the dynamic RR CPU scheduling algorithm. The basic objectives are:<br>1. Develop a new Dynamic RR algorithm. “Modified Median Round Robin Algorithm”<br>(MMRRA)<br>6<br>2. Implement a system that will help in minimizing the overall waiting time, turnaround time, number of context switching and response time of processes.<br>3. Compare the proposed algorithm against five selected dynamic RR CPU scheduling algorithm.<br>1.5 SCOPE<br>This research work would focus on the scheduling algorithm for Round Robin technique. Thereby, developing a framework that will make fair consideration to shorter jobs on the queue. Many research papers with excellent ideas on RR scheduling have been published. But most of these papers focused on only average waiting time, average turnaround time and number of context switching as the criteria for comparison and evaluation. A new dynamic RR CPU scheduling algorithm would be proposed so as to provide better solutions to both the classical RR and most of the proposed dynamic RR algorithms that were reviewed. The evaluation shall be done analytically and also through the use of simulation on the following criteria: average waiting time; average turnaround time; number of context switching; average response time and priority on shorter jobs.<br>1.6 METHODOLOGY<br>The approaches and series of steps to be taken in actualizing our research objectives are as follows: i Random variables are generated using Exponential distribution ii Visual basic programming language 6.0 is used in writing the program.<br>iii MMRRA was evaluated analytically and through simulation against the classical RR,<br>7<br>IRR, IMRR, DRRCP and HLVQTRR. iv The result of each run of the simulator is also represented graphically using column graph. v The results of the evaluation are plotted using Microsoft excel 2007. Three data set have been used for the analysis. i The first set has been generated by the proposed algorithm ii The second set are the data set used in DRRCP. iii The third set are the data set used in IMRRSJF. Reason for using the data set in DRRCP and IMRRSJF is because MMRRA borrowed some few ideas but not exactly of these two (2) algorithms. Therefore, there is need to use their own data set for analysis.<br>8 <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. 2 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. 4 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. 4 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. 2 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. 3 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. 4 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. 3 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