Question: a. What is false sharing in a multiprocessor system and how does it affect performance? Explain with one example. b. Consider the following C

a. What is false sharing in a multiprocessor system and how does 

a. What is false sharing in a multiprocessor system and how does it affect performance? Explain with one example. b. Consider the following C code: C. double x, y, 2; void first () { } y-x+3; z-y/2.0; void second() { y-2-3; In the sequential program first is called before second. [5 Marks] (i) What dependencies exist between first and second? Be specific, including line numbers and variable names. [3 Marks] (ii) Using examples from this code, explain what false dependencies are and how they can be eliminated. What are the disadvantages of removing these false dependencies? [3 Marks] With the help of any simple program or pseudo-code you wrote in your programming modules and answer the following questions. (i) What (if any) part of this program are inherently serial? (!!) [3 Marks] Does the inherently serial part of the work done by the program decrease as the problem size increases? Or does it remain roughly the same? [4 Marks] d. Give any two (2) reasons why a parallel version running on 2 or more processors of a sequential code might run slower than the sequential version? [2 Marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

uuu DIA T... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!