Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions