Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm almost done with this project i just need help debugging my code. Seeing as the project code is to long to put in a

image text in transcribed

image text in transcribed

I'm almost done with this project i just need help debugging my code. Seeing as the project code is to long to put in a question ill post each header and source file on GitHub and give links.

https://github.com/Bobbyhoff/CPU-Scheduling-SJF-FCFS-MLFG-

The problem im having is my printStatsSJF function(from scheduling.h) is getting a divide by 0 error and messing up my results. and im pretty sure thats why the FCFS and MLFQ results arent printing when i debugg. The FCFS results printed above are given by the professor. my results for FCFS and MLFQ will not print. only SFJ will print results.

If you need any addition information when helping me please comment and ill try my best to help!

Implement the following 3 CPU scheduling algorithms - . Simulate and evaluate each with the set of eight processes below 1. FCFS non-preemptive (results provided) 2. SJF non-preemptive 3. MLFQ Multilevel Feedback Queue (absolute priority in higher queues) Queue 1 uses RR scheduling with Tg- Queue 2 uses RR scheduling with Tq-11 Queue 3 uses FCFS All processes enter first queue 1. If time quantum (Tq expires before CPU burst is complete, the process is downgraded to next lower priority queue. Processes are not downgraded when preempted by a higher queue level process. Once a process has been downgraded, it will not be upgraded Assumptions: 1. All processes are activated at time 0 2. Assume that no process waits on I/O devices 3. After completing an IO event, a process is transferred to the ready queue 4. Waiting time is accumulated while a process waits in the ready queue Process Data process goes {CPU burst, IO time, CPU burst, IO time, CPU burst. time. last CPU burst) .. . P1 14,24,5,73,3,31,5,27,4,33,6,43,4,64,5,19,2) P2 118,31,19,35,11,42,18,43,19,47,18,43,17,51,19,32,10) P3 16,18,4,21,7,19,4,16,5,29,7,21,8,22,6,24,5) P4 117,42,19,55,20,54,17,52,15,67,12,72,15,66,14) P5 (5,81,4,82,5,71,3,61,5,62,4,51,3,77,4,61,3,42,5) P6 10,35,12,41,14,33,11,32,15,41,13,29,11) P7 (21,51,23,53,24,61,22,31,21,43,20) P8 11,52,14,42,15,31,17,21,16,43,12,31,13,32,15) Implement the following 3 CPU scheduling algorithms - . Simulate and evaluate each with the set of eight processes below 1. FCFS non-preemptive (results provided) 2. SJF non-preemptive 3. MLFQ Multilevel Feedback Queue (absolute priority in higher queues) Queue 1 uses RR scheduling with Tg- Queue 2 uses RR scheduling with Tq-11 Queue 3 uses FCFS All processes enter first queue 1. If time quantum (Tq expires before CPU burst is complete, the process is downgraded to next lower priority queue. Processes are not downgraded when preempted by a higher queue level process. Once a process has been downgraded, it will not be upgraded Assumptions: 1. All processes are activated at time 0 2. Assume that no process waits on I/O devices 3. After completing an IO event, a process is transferred to the ready queue 4. Waiting time is accumulated while a process waits in the ready queue Process Data process goes {CPU burst, IO time, CPU burst, IO time, CPU burst. time. last CPU burst) .. . P1 14,24,5,73,3,31,5,27,4,33,6,43,4,64,5,19,2) P2 118,31,19,35,11,42,18,43,19,47,18,43,17,51,19,32,10) P3 16,18,4,21,7,19,4,16,5,29,7,21,8,22,6,24,5) P4 117,42,19,55,20,54,17,52,15,67,12,72,15,66,14) P5 (5,81,4,82,5,71,3,61,5,62,4,51,3,77,4,61,3,42,5) P6 10,35,12,41,14,33,11,32,15,41,13,29,11) P7 (21,51,23,53,24,61,22,31,21,43,20) P8 11,52,14,42,15,31,17,21,16,43,12,31,13,32,15)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

3. You can gain power by making others feel important.

Answered: 1 week ago

Question

Write down the circumstances in which you led.

Answered: 1 week ago