Five jobs, arive nearly simultaneously for processing and there estimated CPU cy
ID: 3561652 • Letter: F
Question
Five jobs, arive nearly simultaneously for processing and there estimated CPU cycles are, respectively: Job A = 12, Job B = 2, Job C = 15, Job D = 7, and Job E = 3 ms.
A. Using FCFS, and assuming the difference in arrival time is negligible, in what order would they be processed? What is the total time required to process all five jobs? What is the average turnaround time for all five jobs?
B. Using SJN, and assuming the difference in arrival time is negligible, in what order would they be processed? What is the the total time required to process all five jobs, What is the average turnaround time for all five jobs?
Explanation / Answer
A) In FCFS(First come first serve) total time for the jobs would be 12 + 2 + 15 +7 +3 = 39 ms.
they would be scheduled in order of arrival that is A B C D E.
Turnaroud time is the time between arrival and completion of job
turnaround time for job A = 12ms , job B = 14 ms job C = 29ms, job D = 36 ms , job E = 39 ms
average turn around time = 12+14+29+36+39 / 5 = 26 ms
B) In case of sjn(shortest job next) jobs are processed in order of their execution time.
job B has lowest execution time therefore would be processed first.
order would be B E D A C
Total time = 2 + 3 + 7 + 12 + 15 = 39 (same as fcfs)
turn around time for job B = 2 ms , E = 5 ms , D = 12 ms A = 24 ms C = 39 ms
Average turnaround time = 2+3+7+12+24+39 / 5 = 17.4 ( average turnaround time less than fcfs)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.