Question: Learn how SJN work in process management. - Learn how to implement SJN algorithm in C++. Note: - When an algorithm is non-preemptive, it means

Learn how SJN work in process management. - Learn how to implement SJN algorithm in C++. Note: - When an algorithm is non-preemptive, it means the algorithm doesnt move the process from running to ready state. Non-preemptive == no interruption. - Turnaround time = Completion time Arrival time Description: Write a C++ program that will simulate a non-preemptive Shortest Job Next process scheduling algorithm. File Structure: processName,arrivalTime,CPUTime 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.. - 2. Output starting time for each process. 3. Output terminating time for each process. 4. Calculate and output turnaround time for each process. 5. Calculate and output average turnaround time.

file

processName,arrivalTime,CPUTime

p1,0,10

p2,5,5

p3,10,5

p4,15,2

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!