8. Given the following information: Job Arrival Time CPU Cycle A 0 15 B 2 2 C 3
ID: 3665431 • Letter: 8
Question
8. Given the following information:
Job Arrival Time CPU Cycle
A 0 15
B 2 2
C 3 14
D 6 10
E 9 1
Calculate which jobs will have arrived ready for processing by the time the first job is finished or first interrupted using each of the following scheduling algorithms. a. FCFS b. SJN c. SRT d. Round Robin (use a time quantum of 5, but ignore the time required for context switching and natural wait)
Explanation / Answer
a. FCFS
Here are the arrival and finish times.
Job
A
B
C
D
E
Arrival time
0
2
3
6
9
Finish time
15
17
31
41
42
Here is a time line from 0 to 42 seconds.
A
B
C
D
E
0 15 17 31 41 42
b. SJN
Here are the arrival and finish times.
Job
A
B
C
D
E
Arrival time
0
2
3
6
9
Finish time
15
18
42
28
16
A
E
B
D
c
0 15 16 18 28 42
c. SRT
Note: SRT is preemptive and interrupts a job when another job arrives that has a shorter remaining CPU time required to finish.
Job
A
B
C
D
E
Arrival time
0
2
3
6
9
Finish time
18
28
6
7
42
A
B
E
A
D
c
0 6 7 15 18 28 42
d. Round robin (using a time quantum of 5, ignore context switching and natural wait)
Job
A
B
C
D
E
Arrival time
0
2
3
6
9
Finish time
28
38
13
14
42
A1
B1
C
D
E1
A2
B2
E2
B3
E3
0 5 10 13 14 19 24 29 34 36 42
Job
A
B
C
D
E
Arrival time
0
2
3
6
9
Finish time
15
17
31
41
42
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.