{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw3_standard_answer - CSE721 Homework 3 Due on Tuesday...

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

CSE721 Homework 3 Due on Tuesday, 1/18/2011 Thanks to Xin Huo, S M Faisal 1

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

View Full Document
Problem 1 (5.3) 1. Compute the degree of concurrency. Degree of concurrency is the maximum number of tasks that can be executed in parallel. a) 2 n 1 b) 2 n 1 c) n d) n 2. Compute the maximum possible speedup if an unlimited number of processing elements is available. a) The sequential time T s = 2 n 1. The Parallel run time T p = n . Speedup S = (2 n 1) /n b) The sequential time T s = 2 n 1. The Parallel run time T p = n . Speedup S = (2 n 1) /n c) The sequential time T s = n 2 . The Parallel run time T p = 2 n 1. Speedup S = n 2 / (2 n 1) c) The sequential time T s = n ( n + 1) / 2. The Parallel run time T p = n . Speedup S = ( n + 1) / 2 3. Compare the values of speedup, e ciency, and overhead function if the number of processing elements is (i) the same as the degree of concurrency and (ii) equal to half of the degree of concurrency. (i) processor equals to the degree of concurrency. 1) Number of processors: P a = 2 n 1 P b = 2 n 1 P c = n P d = n 2) Speedup: S a = (2 n 1) /n S b = (2 n 1) /n S c = n 2 / (2 n 1) S d = ( n + 1) / 2 3) E ciency: E a = S a /P a = (2 n 1) /n 2 n 1 = 2 n 1 n 2 n 1 E b = S b /P b = (2 n 1) /n 2 n 1 = 2 n 1 n 2 n 1 E c = S c /P c = n 2 / (2 n 1) n = n/ (2 n 1) E d = S d /P d = ( n + 1) / 2 n 1
4) Overhead: T o ( a ) = 2 n 1 × n 2 n + 1 T o ( b ) = 2 n 1 × n 2 n + 1 T o ( c ) = 2 n 2 n n 2 = n 2 n T o ( d ) = n 2 n ( n + 1) / 2 = ( n 2 n ) / 2 (ii) processor equals to half of degree of concurrency. 1) Number of processors: P a = 2 n 2 P b = 2 n 2 P c = n/ 2 P d = n/ 2 2) Speedup: Parallel Time for these four graphs T p ( a ) = n + 1 T p ( b ) = n + 1 For graph (c), the execution order is from the left top matrix to the right bottom. In the first n/ 2 and last n/ 2 times of execution, the degree of concurrency is increased from 1 to n/ 2. However, in the center of the matrix, there are enough data can be parallelized in all the processors. Thus, the run time of two ends is n/ 2 × 2 = n . The left data in the center is n 2 (1+ n/ 2) n/ 2 2 × 2 = 3 n 2 2 n 4 . Thus, T p ( c ) = n + 3 n 2 2 n 4 / ( n 2 ) = 3 n 2 2 + n = 5 n 2 2 The method for computing parallel time in (d) is very similar to graph (c). For the top n/ 2 rows, the run time is n/ 2. The the left data is

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern