Final Exam Solutions

Number each step 1 send n8 elements from p0 to each

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

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

Unformatted text preview: : write 104 Hit Shared Invalid Shared Modified P0: read 100 Miss Invalid Shared Modified Invalid P1: read 100 Miss Shared Shared Invalid Shared P0: write 100 Hit Shared Modified Shared Invalid P1: read 104 Miss Modified Invalid Invalid Shared 8 Question 5: Parallel decomposition [10 points]. A message ­passing multiprocessor will be used to count the number of zeroes in a very large array (size N). The array is initially in P0’s memory, and there are 8 processors in total. It takes X cycles to send/receive A array elements, and it takes Y cycles to do a comparison. Assume that: • N is a multiple of A • Sending fewer than A elements still takes X cycles • The time to increment the counter is negligible. (a) What is the algorithm for parallelizing this computation? Number each step. (1) Send N/8 elements from P0 to each of P1…P7 (2) In parallel, have each processor count the number of...
View Full Document

This note was uploaded on 02/08/2014 for the course CS 351 taught by Professor Dr.suzannerivoire during the Fall '13 term at Sonoma.

Ask a homework question - tutors are online