AlgorithmsHW1PlusAnswersnew - Homework I 1 Five jobs are...

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

View Full Document Right Arrow Icon
Homework I 1. Five jobs are waiting to be run. Their expected run times are 9, 6, 3, 5 and X. In what order should they be run in order to minimize average waiting time? (Hint: Though the answer is simple, you need to consider all cases). In class we’ve discussed that shortest job first leads to minimum average waiting time. See class text, p 159. You don’t need to prove it for this question, just remember that fact. In that case the answer is a. 0 < X β 3 : X, 3, 5, 6, 9 b. 3 < X β 5 : 3, X, 5, 6, 9 c. 5 < X β 6 : 3, 5, X, 6, 9 d. 6 < X β 9 : 3, 5, 6, X, 9 e. X > 9 : 3, 5, 6, 9, X 2. This problem deals with real time systems with N CPU’s. Events that real time systems have to respond to are classified as periodic or aperiodic . Consider the first case where jobs occur at regular intervals: Let there be m periodic events and event i occurs with period P i and C i seconds of CPU time are required to handle each event, derive an inequality that can be used to show the conditions under which the periodic load can be handled. ( Hint : Define CPU utilization, ignore context switch overhead.) Utilization is defined as = m i i i P C 1 and this must be less than or equal to N, i.e., CPU utilization cannot exceed the number of CPU’s available, and we have assumed N
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/30/2008 for the course CS 447 taught by Professor Chandra during the Spring '07 term at New Haven.

Page1 / 3

AlgorithmsHW1PlusAnswersnew - Homework I 1 Five jobs are...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online