In: Computer Science
1. Processes A, B, C, D, E, and F require service times of 3, 5, 2, 5, 3, and 5. Their arrival times are 0, 1, 3, 9, 10, and 12. What is the average turnaround time, waiting time, response time, and throughput when using SRJF, RR (q=2), and MLF (q=22i+1). Show your work.
ANSWER:
Given ,processes A,B,C,D,E,F
we need to find average turn around time,waiting time ,response time and through put.
1) Shortest job first (SJF):It is the scheduling process that select the waiting process with smallest execution time to execute.
Turn around time:It is the interval from time of submission to time of completion i.e finished time -Arrival time.
waiting time: The total time spent by the process in ready waiting for CPU i.e turnaround time-service time.
Response time:The time when a job or process completes i.e process time-Arrival time.
throghput:It is the amount of work completed in a unit of time.
Gantt chart for the above processes are
Total process time for A-3
B-10
C-5
D-18
E-13
F-23
Average turn around time is calculated as
3+9+2+9+3+11/6 6.1667
Average waiting time = 0+4+0+4+0+6/6 2.33
Average response time = (0+4+0+4+0+6)/6 2.33
throught put is calculated as overall efficiency of
CPU ( 3+5+2+5+3+5)/6 3.866
ii) Round -Robin: Given Quantum =2
Response time is calculate as start time-Arrival time
2-0 = 2
3-1 2
5-3 2
9-9=0
11-10=1 ,13-12=1
Gantt chart :
the average turn around time 3+15+4+13+9+11/6
9.166
The average response time =2+2-1 2+0+1.11/6
1.33
Average waiting time 5.33
Throughput 3.866
iii) MLF (q = : MLF stands for multi level feed back.
Average turn around time = 7+13+2+9+5+10/6
7.66
Average response time =7+14+5+1+15+22/6
10.66
Average waiting time = 4+2+0+4+2+5/6
2.833
through put =3 .866
If you do not get anything in this solution,please put a comment and i will help you out.
Do not give a downvote instantly.It is a humble request.
If you like my answer,please give an upvote ......Thank you.