0% found this document useful (0 votes)
5 views2 pages

Parallel and Distributed Computing (PDC) Mid Term Spring 2024

Parallel and Distributed Computing

Uploaded by

abbastayyaba417
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Parallel and Distributed Computing (PDC) Mid Term Spring 2024

Parallel and Distributed Computing

Uploaded by

abbastayyaba417
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
Cniversity of Centeal unjab Faculty of Inforn tion Technology Parallel and Distributed Computing Mid Term: Spring 2024 Registration: —_ (Mas, Marks: “35 Note: Attempt all questions on (342 points) o ‘What sort of cache locality is achievable inthe following code an how wo! you bani? (Assume row major ordering in memory forthe rays.) For Gn: jem jo) For (nds ie +4) AQ) > AIL) + BEIGE: code using loop which coun’ be paraletized? we (2 pin “60% of a program's exscution time oceurs inside'a loop tha: can be executed in parallel and rest 40% in Serial Write 2) What isthe maximum speedup we should expect fom 8 parallel version ofthe prog executing 4 ofeore CPU? b)__fwe wanted to achieve 4 time speedup how many processing wits wil be required, iit possible to gain such speedup? Q3 6 points) Write a program that creates an N number of threads to sum an array of 1000 elements. The 1 is passed to the program as a command-argument, All of the threads musi be extended fiom the same function. The array must be declared and initialized inthe main thread. You ‘may initialize the aray using rand() function. qn (ut points + below the task dependency araph, weighted node represents the take, and cach directed edge coco its dapendensy Answer next questions based on this graph, Ge) Ga) 2) What isthe best possible parallel computation time? CO) What is maximum degree of concurreney? utscnemeattamrterterpmeser (E) 2) Ca) C8) 44) Minimum processor needed to achieve the maximum, speck? G) (s) © 1) What iscritcal path and is Feng wy elicalpath fs @) Os points) Given ae he sparse matrices A and vector B. Consider the problem of sparse matrix-vector multiplication, 4 dot corresponds toa non-zero eniy. The computation is decomposed into $ tasks. Each tsk have one ro and a corresponding vector element is distributed among each task. Let tack ithe owner of row Ali, *] and cof row Blil. For example task 0 have BO} only an tsk | have Bt] only. Task i has ta compute row i of the resultC= A B, Draw the isk interaction graph using directed edges.

You might also like