### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# PARALLEL PROGRAMMING CS 515

PSU

GPA 3.91

### View Full Document

## 72

## 0

1 review

## 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.

### 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

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### 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'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I made $350 in just two days after posting my first study guide."

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.