Question: Write a C++ program that will simulate a non-preemptive Priority Queue process scheduling algorithm. File Structure: processName,arrivalTime,CPUTime,priority Your program must do the following: 1. Read

Write a C++ program that will simulate a non-preemptive Priority Queue process scheduling algorithm. File Structure: processName,arrivalTime,CPUTime,priority Your program must do the following: 1. Read a comma separated file from your program that has the data. - Note 1: If you have 5 lines, that means 4 processes since the first line is the header. - Note 2: You can use the code on Blackboard to read a file given its path. - Note 3: You can download a sample input from Blackboard. 2. Output starting time for each process. 3. Output terminating time for each process. 4. Output priority of each process. 5. Calculate and output turnaround time for each process. 6. Calculate and output average turnaround time. Code Quality Requirement: 1. Do not put every single logic in the main() function. 2. You must use functions to separate your programs logic into smaller readable pieces.

file input:

name,arrivalTime,CPUTTime,priority P1,0,10,4 P2,5,5,2 P3,10,5,1 P4,15,2,3

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!