PARALLEL PROGRAMMING CS 515
Popular in Course
Popular in ComputerScienence
This 5 page Class Notes was uploaded by Orrin Rutherford on Tuesday September 1, 2015. The Class Notes belongs to CS 515 at Portland State University taught by Jingke Li in Fall. Since its upload, it has received 72 views. For similar materials see /class/168267/cs-515-portland-state-university in ComputerScienence at Portland State University.
Reviews for PARALLEL PROGRAMMING
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/01/15
Review Problems Jingke Li Portla nd State U n iversity Jingke Li Portland State University Review Problems 19 Problem Speedup Consider the search tree shown below left figure in which the dark node represents the solution Assume that traversing each edge in each direction counts as one step gt J l If a sequential depth first search DFS is performed how many steps does it take to find the solution Assume that the tree is partitioned between two processors as shown in the right figure If both processors performs a DFS on their subtrees how many steps does it take to find the solution now What is the speedup number Is it a normal speedup or an anomaly t N A Jingke Ll Portland State University Review Problems 2 9 Problem Topology Derive a formula Lk for the number of links in a k dimensional binary hypercube 1 Express the formula in a recursive form ie define Lk in terms of Lk 1 2 Express the formula in a closed form ie define Lk in terms of k and constants only 3 According to your formula how many links are there in a 5 dimensional hypercube Jingke Li Portland State University Review Problems 3 9 Problem Dining Philosophers Five philosophers spend their lives just thinking and eating They sit around a circular table but never talk to each other There are five forks placed evenly between the philosphers To eat each philosopher must pick up both forks that are placed next to him Write a SPMD program to simulate the philosophers39 life Picture credit GFDL by Bdesham Jingke Li Portland State University Review Problems 4 9 Dining Philosophers cont Solution 1 Whlle true thl p1ckupjork1ert 1f not avallable wa1t p1ckupjorkr1ght 1f not aVallable wa1t eat putdownjork1ert putdownjorkr1ght Problems 7 1mm Li mend sea WWW Review Pmbiems s 9 Dining Philosophers cont Solutlon 2 mm holding time Whlle true thl p1ckupjork1ert 1f not avallable wa1tmderm1tely p1ckupjorkr1ght 11 not avallable Walt 2m1n 1f st111 not aVallable putdownjork1ert amp startjver eat putdownjork1ert putdownjorkr1ght Still Pmblems7 1mm Li mend sea WWW Review Pmbiems n g Dining Philosophers cont solutroh 3 Introduce asymmetry wh11e true i thka 11 I am ph11osopherogt p1ckup1orkr1ghtgt 11 not ava11ab1e wa1t0 p1ckup1orklt1e1tgt 11 not ava11ab1egt W110 else p1ckup1orklt1e1tgt 11 not ava11ab1egt W110 p1ckup1orkr1ghtgt 11 not ava11ab1e wa1t0 e putdownj ark 1e1t putdownj ark r 1ght huge Li Fenland state Unwersrty Review Problems Problem Graph Algorithm Consider son connected gr p 1 Give an example of a graph h whrch the algorithm requlres only a slngle teratroh to produce a MCS tree 2 Give an example of a graph h whrch the algorithm requlres Hog hi Iteratlons to produce a MCS tree m39s algorithm for llndlng a mlnlmumrcost spahmhg tree on a a h huge Li Fenland state Unwersrty Review Problems Problem Task Scheduling AJob for mu twproce ssor wrth P processors cohsrsts of N moepehoeht tasks of two types 0ngand short L L s s L s L Long tasks take TL umts of processor twme and short tasks take T5 There are NL ong tasks and the rest are short P orvroes N evemy and m NP gt M The ohg tasks are random ced among the N tasks Assume the tasks are bemg statrcaNscheouxeo re wrthout knowmg the actua orstrroutroh ot ohg and short tasks 1 What 3 the Worst case scena o7 2 Show ah expressroh tor th h e executroh trme of the worst case usr parameters Eva uatet e as ng the gwen worst c e executroh trme tor p 10 N 100 5 7110 ms and T5 3 fthe tasks are dynamcaHyschedu ed wrth a centrahzedjob queue Can the worst case sceharro that you roehtmeo above strh 0c 4 Cah you roehtrty the new worst case sceharro tor the dynarmc schedu e approa at S the executton Mme for tth case7 Hnt What 3 the maxrmum oad ortterehce between any two processes7 a huge Lt menu state uhmky Revww Pmb ems
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'