Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started