Previous | Next --- Slide 32 of 60
Back to Lecture Thumbnails
kayvonf

Question: So let's talk about the question on the slide a bit. Will the performance of this program be significantly better than that on the previous slide? (What information is necessary to answer this question?)

pmassey

@kayvonf It depends on how large N is. What this code does is have each worker enter the critical section 10 less times. Therefore I believe we wil see at least some improvement. However, if N is large than the actual work done (prime computation) will take more time than the critical section operations will, so the improvement will be less obvious than on examples with small N.

amaliujia

@kayvonf To answer this question, how many simultaneously workers and how large granularity are necessary. Use these information I can compute ratio of sequential part of this program and proximate speed up.