Question: Sample Output: current time 0 job 1 with time 7 psr ps finish time 1 1 7 2 0 0 3 0 0 4 0

Sample Output:
current time 0
job 1 with time 7
psr ps finish
time
1 1 7
2 0 0
3 0 0
4 0 0
5 0 0
current time 0
job 2 with time 4
psr ps finish
time
1 1 7
2 2 4
3 0 0
4 0 0
5 0 0
current time 0
job 3 with time 8
psr ps finish
time
1 1 7
2 2 4
3 3 8
4 0 0
5 0 0
current time 0
job 4 with time 3
psr ps finish
time
1 1 7
2 2 4
3 3 8
4 4 3
5 0 0
current time 0
job 5 with time 9
psr ps finish
time
1 1 7
2 2 4
3 3 8
4 4 3
5 5 9
current time 0
current time 1
current time 2
current time 3
job 6 with time 2
psr ps finish
time
1 1 7
2 2 4
3 3 8
4 6 5
5 5 9
current time 3
current time 4
job 7 with time 5
psr ps finish
time
1 1 7
2 7 9
3 3 8
4 6 5
5 5 9
current time 4
current time 5
job 8 with time 8
psr ps finish
time
1 1 7
2 7 9
3 3 8
4 8 13
5 5 9
current time 5
current time 6
current time 7
job 9 with time 7
psr ps finish
time
1 9 14
2 7 9
3 3 8
4 8 13
5 5 9
current time 7
current time 8
job 10 with time 6
psr ps finish
time
1 9 14
2 7 9
3 10 14
4 8 13
5 5 9
current time 8
current time 9
job 11 with time 4
psr ps finish
time
1 9 14
2 11 13
3 10 14
4 8 13
5 5 9
current time 9
job 12 with time 7
psr ps finish
time
1 9 14
2 11 13
3 10 14
4 8 13
5 12 16
current time 9
current time 10
current time 11
current time 12
current time 13
job 13 with time 2
psr ps finish
time
1 9 14
2 13 15
3 10 14
4 8 13
5 12 16
current time 13
job 14 with time 2
psr ps finish
time
1 9 14
2 13 15
3 10 14
4 14 15
5 12 16
current time 13
current time 14
job 15 with time 7
psr ps finish
time
1 15 21
2 13 15
3 10 14
4 14 15
5 12 16
current time 14
job 16 with time 8
psr ps finish
time
1 15 21
2 13 15
3 16 22
4 14 15
5 12 16
current time 14
current time 15
job 17 with time 6
psr ps finish
time
1 15 21
2 17 21
3 16 22
4 14 15
5 12 16
current time 15
job 18 with time 8
psr ps finish
time
1 15 21
2 17 21
3 16 22
4 18 23
5 12 16
 Sample Output: current time 0 job 1 with time 7 psr

You are to write a processor scheduling algorithm. Assume that there are 5 processors and the scheduler is using a FIFO scheduling algorithm. When a processor becomes available, the next process in sequence is scheduled for that processor. ps # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 time 7 483 92587 6 4 7 2 2 7 8 6 8 Print the jobs that are currently running immediately after a process has been scheduled. The output should consist of a) a statement indicating the current time slice, and b) when a new process is scheduled, the process number that is being scheduled with the running time, and a table displaying all of the processes currently running

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!