Homework 4 Ash

# Homework 4 Ash - C B 8 13 22 26(c shortest time to...

This preview shows pages 1–2. Sign up to view the full content.

Question 4.1:- Four processes A through D, arrive at a computer system at 0, 1, 2, and 3, respectively. They have estimated execution times of 8, 4, 9, and 5. Their priorities are 2, 4, 3, and 1, respectively, with 1 being the highest priority. The priorities are used only for priority scheduling (i.e., they are ignored in other scheduling algorithms). All jobs are completely CPU bound. The OS does not know when a process will arrive, until it arrives. For each of the following scheduling algorithms, determine the average response time. Ignore context switching overhead. (a) round robin with time slice = 1 (b) priority scheduling (c) shortest time to completion first Answer 4.1:- (a) round robin with time slice = 1 A B A C B D A C B D A C B D A C D A C D A C A C C C 0 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 26 (b) priority scheduling A D

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C B 8 13 22 26 (c) shortest time to completion first A B D C 8 12 17 26 Average Response Time Process Round Robin Priority Scheduling SJF A 1 8 8 B 1 25 11 C 2 20 24 D 3 10 14 Question 4.2:-Two periodic processes are ready to run at time 0: P1(2,1) and P2(5,2.5) (2 and 5 are intervals as well as deadlines, 1 and 2.5 are processing time). Draw a timeline for each process to show when they are running and when they are waiting, assuming that there is no context switching overhead. (a) The system uses EDF (earliest deadline first) scheduling. (b) The system uses RM (rate monotonic) scheduling. Answer 4.2:-(a) The system uses EDF (earliest deadline first) scheduling. P1 P2 P1 P1 P1 P2 P1 0 1 3.5 4.5 5.5 6.5 9 10 (b) The system uses RM (rate monotonic) scheduling. P1 P2 P1 P2 P1 P2 P1 0 1 2 3 4 5 5.5 6 7...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

Homework 4 Ash - C B 8 13 22 26(c shortest time to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online