



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Class: INTRO TO OPERATING SYSTEMS; Subject: Computer Science; University: University of Pittsburgh; Term: Spring 2005;
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!
st
Profs. José Carlos Brustoloni and Daniel Mossé
c. (3 points) Shortest Remaining Time First (assume perfect predictor of remaining time, arriving process can preempt immediately, quota = 1) Schedule: A(0,0.1), B(0.1,3.1), C(3.1,5.1), D(5.1,6.1), A(6.1,21) Turnaround times: A = 21 B = 3.1 – 0.1 = 3 C = 5.1 – 2 = 3. D = 6.1 – 5 = 1. Ave. = 7. Another solution if we consider the quota: Schedule:a. A(0,1), B(1,4), C(4,6), D(6,7), A(7,21) Turnaround times: A = 21 B = 4 – 0.1 = 3. C = 6 – 2 = 4 D = 7 – 5 = 2 Ave. = 7. b. A(0,1), B(1,2), C(2,4), B(4,5), D(5,6), B(6,7), A(7,21) c. A(0,1), B(1,2), C(2,4), B(4,6), D(6,7), A(7,21) Average time is still 7 .725. d. (3 points) Round robin (quota = 2) Assuming C gets into the ready queue ahead of A at time = 2: Schedule: A(0,2), B(2,4), C(4,6), A(6,8), B(8,9), D(9,10), A(10,21) Turnaround times: A = 21 B = 9 – 0.1 = 8. C = 6 – 2 = 4 D = 10 – 5 = 5 Ave. = 9. Assuming C gets into the ready queue behind A at time = 2: Schedule: A(0,2), B(2,4), A(4,6), C(6,8), B(8,9), D(9,10), A(10,21) Turnaround times: A = 21 B = 9 – 0.1 = 8. C = 8 – 2 = 6 D = 10 – 5 = 5 Ave. = 10.