cop5615fa10quiz4Key

cop5615fa10quiz4Key - used. 2. (a) Low priority task L...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Quiz 4 Key COP 5615 Fall 2010 Put your last name in the top right corner of your answer sheet, with your first name below it. Answer both questions, indicating the question number and part you are answering. 1. What is the maximum speedup possible according to Amdahl's Law for a program that is 25% inherently serial and 75% parallelizable using N processors for the values of N below? Show your work. (a) N=3 processors. (b) N=6 processors. (c) What is the maximum speedup possible? 2. Give a simple example of (a) Pass-through blocking. (b) Priority inversion. Explain your examples. KEY 1. Amdahl's Law states that the maximum speedup for a program with fraction P parallelizable and (1-P) inherently serial, using N processors is S_max = 1/[(1-P) + P/N]. (a) N=3 so S_max = 1/[.25 + .75/3] = 2 (b) N=6 so S_max = 1/[.25 + .75/6] = 2.67 (c) The maximum speedup is 1/[.25+0] = 4, no matter how many processors are
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: used. 2. (a) Low priority task L runs, obtains lock R. Medium priority task M then preempts L and obtains lock S, then later blocks when it requests lock R held by task L, so L resumes execution (direct blocking). Then task H preempts task L and blocks when it requests lock S held by task M. Task M is still blocked waiting for lock R, so task L again resumes. Task H blocks on S held by M, which blocks on R held by L (pass-through blocking). (b) Low priority task L runs, obtains lock R. Medium priority task M then preempts L and runs until it is preempted by high priority task H. H runs until it requests R, at which point it blocks waiting for L to release R. However, M is higher priority, so M runs instead of L, in effect giving it higher priority than H as long as H is blocked waiting for L....
View Full Document

This note was uploaded on 01/18/2012 for the course COP 5615 taught by Professor Staff during the Fall '08 term at University of Florida.

Ask a homework question - tutors are online