Question: I need help with implementing a CPU scheduling program in C with FCFS, SJF, Priority, and Round-Robin. The program must read from a file and

I need help with implementing a CPU scheduling program in C with FCFS, SJF, Priority, and Round-Robin.

The program must read from a file and all algorithms must be in the same class.

The input file will look like this:

4

1 7 10

2 5 5

3 7 12

4 8 10

The first 4 is the amount of processes. The 1 is the first process with a burst of 7 and priority 10, and so on.

Example output will look like this for FCFS:

 Arrival Order: 4, 2, 3, 1 Process Information: 

4 3 7

2 3 10

3 5 7

1 7 1

------------------------------- Running...

##################################################

## CPU Pri W T

#4 3 7 0 3

#2 3 10 3 6 #3 5 7 6 11 #1 7 1 11 18

##################################################

# Avg. Waiting Time : 5.00

# Avg. Turnaround Time: 9.50

##################################################

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!