Question: Write a program in either C or C++ that implements a Priority based Pre-emptive Scheduling Algorithm. Include tests that highlight the working of the algorithm.

 Write a program in either C or C++ that implements a

Write a program in either C or C++ that implements a Priority based Pre-emptive Scheduling Algorithm. Include tests that highlight the working of the algorithm. the Algorithm is just a simulation, it will not be accessing real processes. You can assume a process to be a user-defined type which has CPU execution time, Arrival Time and Priority as fields. the user of your executable should be able to input processes along with their respective times and priorities. After every time unit, your program should printout the processes in the ready queue and the CPU status (idle/busy with process #). You do not have to use system time or "real" time. You can model time by a counter variable which increments inside a loop. Upload the source code, exe, any dependent required for compilation or running of your code (on Linux/Windows) and readmes (if any)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!