Search the whole station

# 并行计算家庭作业代写 Parallel Computing代写 并行计算代写

510

## Homework Assignment 1

### 1.

In the global sum problem that we discussed in class, in lecture 1, if we assume that there is a variable called my_rank (local to each core) that gives each core a unique rank from 0 to p-1 (for p cores), devise an expression to calculate my_first_i and my_last_i assuming:

a. n is divisible by p and n > p.

b. n is not divisible by p.

### 2.并行计算家庭作业代写

We have seen two ways of calculating the final sum in the global sum example we have studied in class. In one of them, the master core receives the partial sums from the other cores and calculates the final sum. The other method is the tree-method. Assume that the master core is core 0. Assume we have p cores and n numbers where n > p.

a. Derive a formula for the number of receives and additions that core 0 does in the first (non-tree) method.

b. Repeat for the tree-method.

c. Make a table showing the number of receives and additions done by core 0 for each method when the number of cores is 2, 4, 8, …, 1024.

d. Which operation do you think is more expensive: receive or addition? and why?

### 3.并行计算家庭作业代写

Sometimes you are given a sequential program that is very Yet, you may find that it is better to keep it sequential because it will be faster than the parallel one. What is the situation where this decision is sound?

### 4.

Before multicore processors, that is, during the single core era,programs are getting faster with every new generation of processors without any effort from the program. This is due to two factors. What are they?

### 5.并行计算家庭作业代写

• Shared memory systems
• Distributed memory systems

### 6.

Suppose we have the following algorithm (assume N is a large even number):

`for(i = 0; i < N/2; i++)         a[i] += a[i+ N/2 ]; `

a. [3] Can we parallelize the above algorithm? If no, why not? If yes, explain.

b. [2] What Is the maximum number of cores after which noperformance enhancement can be seen? Justify

### 7.并行计算家庭作业代写

We discussed briefly how caches are designed. Among cache characteristics are whether a cache is write back (when a cache block is modified, it is written back to the lower level cache only when the block is replaced) or write through (whenever a cache block is updated, it updates also the lower level copy). Discuss the pros and cons of each.

### 8.

Does coherence protocol affect performance positively? Ornegatively? And Why?

### 9.并行计算家庭作业代写

When we discussed hardware pipeline, we discussed an implementation that has five stages: Fetch, Decode, Issue, Execute, and Commit. Briefly (in 1-2 sentences) discuss what each stage does.

### 10.

What is speculative execution? Why is it needed?

### 11.

Now that you know about coherence, how can you make use of this knowledge to write better code? State at least two scenarios.

The next:

### Related recommendations

• #### 澳洲CS代写-有留学生找澳洲CS代写被发现的么？想了解一下

783

有留学生找澳洲CS代写被发现的么？想了解一下代写的靠谱程度 澳洲CS代写 有不少外出留学的留学生就能够发现，国外的作业可以说是多到离谱，基本上不是在写作业就是在写作业的路上，但是这些作业如果不做也不...

View details
• #### 计算理论代写 COSC 1107/1105代写 Computing Theory代写

614

Computing Theory COSC 1107/1105 Assignment 1: Fundamentals 计算理论代写 Assessment Type Individual assignment. Submit online via Canvas → Assignments → Assignment 1. Marks awarded for mee...

View details
• #### cs图论代写 CS420/520代写 Graph Theory代写 cs作业代写

271

CS420/520: Graph Theory with Applications to CS Homework 1 cs图论代写 Homework Policy: 1. Students should work on group assignments in groups of preferably three people. Each group submits ...

View details
• #### 计算机网络课业代做 CS 158A代写 计算机网络代写 cs作业代写

248

CS 158A Computer Networks Problem Set 2 计算机网络课业代做 Problem 1 Read the following statements on reinforcement learning. Indicate if the statement is True or False and write a brief ju...

View details
1