FIRST SEMESTER EXAMINATIONS JUNE 2000 ADVANCED

Download FIRST SEMESTER EXAMINATIONS JUNE 2000 ADVANCED

Post on 01-Feb-2017

222 views

Category:

Documents

3 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 1</p><p> The University of Western Australia </p><p>Department of Electrical and Electronic Engineering </p><p> FIRST SEMESTER EXAMINATIONS JUNE 2000 ADVANCED COMPUTER ARCHITECTURE (623.300) This paper contains: 10 questions; XX pages. Candidates should attempt ALL questions QUESTION 1 (10 Marks) Compare buses, crossbar switches, and multistage networks for building a multiprocessor system. Assume a word length of w bits and 2 2 switches are used in building the multiprocessor system with n processors and m shared-memory modules. Assume a word length of w bits and that 2 2 switches are used in building the multistage networks. To facilitate the comparison process, complete the following table. </p><p>Network Characteristics </p><p>Bus System Multistage Network Crossbar Switch </p><p>Minimum latency for unit data transfer </p><p>Bandwidth per processor </p><p>Wiring complexity Switching complexity Connectivity and routing capability </p><p>Remarks Assume n processors on the bus; bus width is w bits </p><p>n n MIN using k k switches with line width of w bits </p><p>Assume n n crossbar with line width of w bits </p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 2</p><p>Answer: </p><p> QUESTION 2 (15 Marks) Analyse the data dependencies among the following statements: </p><p>S1: /RDG5 / R1 1024 / S2: /RDG50 / R2 Memory(10) / S3: $GG55 / R1 (R1) + (R2) / S4: 6WRUH05 / Memory(1024) (R1) / S5: 6WRUH05 / Memory(64) 1024 / </p><p> Note that (Ri) means that the content of register Ri and Memory(10) contains 64 initially. </p><p>a) Draw a dependence graph to show all the dependencies. </p><p>b) Are there any resource dependencies if only one copy of each functional unit is available in the CPU? </p><p> Answer: a) </p><p>Network Characteristics </p><p>Bus System Multistage Network Crossbar Switch </p><p>Minimum latency for unit data transfer </p><p>Constant O(logk n) Constant </p><p>Bandwidth per processor </p><p>O(w/n) to O(w) O(w) to O(nw) O(w) to O(nw) </p><p>Wiring complexity O(w) O(nwlogkn) O(n2w) </p><p>Switching complexity O(n) O(nlogkn) O(n2) </p><p>Connectivity and routing capability </p><p>Only one-to-one at a time </p><p>Some permutations and broadcast, if network unblocked </p><p>All permutations, one at a time </p><p>Remarks Assume n processors on the bus; bus width is w bits </p><p>n n MIN using k k switches with line width of w bits </p><p>Assume n n crossbar with line width of w bits </p><p>S1</p><p>S4</p><p>S2</p><p>S3</p><p>S5</p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 3</p><p>b) There are storage dependencies between instruction pairs (S2, S5) and (S4, S5). There is a resource dependence between S1 and S2 on the load unit, and another between S4 and S5 on the store unit. QUESTION 3 (8 Marks) Compare the PRAM models with physical models of real parallel computers in each of the following categories: </p><p>a) Which PRAM variant can best model SIMD machines and how? b) Repeat the question in (a) for shared-memory MIMD machines. </p><p> Answer: </p><p>a) Since the processing elements of a SIMD machine read and write data from different memory modules synchronously, no access conflicts should arise. Thus, any PRAM variant can be used to model SIMD machines. </p><p> b) The processors in a MIMD machine can read the same memory location </p><p>simultaneously. However, writing to the same memory location is prohibited. Thus, the CREW-PRAM can best model an MIMD machine. </p><p> QUESTION 4 (7 Marks) </p><p> Vectorizing compilers generally detect loops that can be executed on a pipelined vector computer. Are the vectorization algorithms used by vectorizing compilers suitable for MIMD machine parallelization? Justify your answer. Answer: Vectorization is a subset of MIMD parallel processing so the parallelization algorithms that detect vectorization all detect code that can be multiprocessed. However, there are several complicating factors: the synchronization is implicit in vectorization whereas it must normally be explicit with multiprocessing and it is frequently time consuming. Thus, the crossover vector length where the compiler will switch from scalar to vector processing will normally be greater on the MIMD machine. There are some vector operations that are more difficult on a MIMD machine, so some of the code generation techniques may be different. QUESTION 5 (16 Marks) Consider the following pipelined processor with four stages. This pipeline has a total evaluation time of six clock cycles. All successor stages must be used after each clock cycle. </p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 4</p><p>a) Specify the reservation table for this pipeline with six columns and four rows? b) List the set of forbidden latencies between task initiations. c) Draw the state diagram which shows all possible latency cycles. d) List all greedy cycles from the state diagram. e) Determine the minimal average latency (MAL). Answer: a) Reservation table: b) Forbidden latency: 4. Collision vector; (1 0 0 0). c) State transition diagram shown below. d) Simple cycles: (1,5), (1,1,5), (1,1,1,5), (1,2,5), (1,2,3,5), (1,2,3,2,5), (1,2,3,2,1,5), (2,5), (2,1,5), (2,1,2,5), (2,1,2,3,5), (2,3,5), (3,5), (3,2,5), (3,2,1,5), (3,2,1,2,5), (5), (3,2,1,2), and (3). e) Greedy cycles: (1,1,1,5) and (1,2,3,2). f) MAL = (1+1+1+5)/4 = 2. </p><p>S1 S2 S3 S4</p><p>Input</p><p>Output</p><p> 1 2 3 4 5 6 S1 X X S2 X X S3 X S4 X </p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 5</p><p>QUESTION 6 (8 Marks) A uniprocessor computer can operate in either scalar or vector mode. In vector mode, computations can be performed nine times faster than in scalar mode. A certain benchmark program took time T to run on this computer. Further, it was found that 25% of T was attributed to the vector mode. In the remaining time, the machine operated in the scalar mode. a) Calculate the effective speedup under the above conditions as compared with the </p><p>condition when the vector mode is not used at all. Also calculate , the percentage of code that has been vectorized in the above program. </p><p> b) Suppose we double the speed ratio between the vector mode and the scalar mode </p><p>by hardware improvements. Calculate the effective speedup that can be achieved. c) Suppose the same speedup obtained in part (b) must be obtained by compiler </p><p>improvements instead of hardware improvements. What would be the new vectorization ratio that should be supported by the vectorizing compiler for the same benchmark program? </p><p> Answer: a) If the vector mode is not used at all, the execution time will be: 0.75T + 9 0.25T = 3T Therefore, effective speedup = 3T/T =3. Let the fraction of vectorized code be . </p><p>Then = 9 0.25T/3T = 0.75. b) Suppose that the speed ratio between the vector mode and the scalar mode is </p><p>doubled. The execution time becomes: 0.75T + 0.25T/2 = 0.875T The effective speedup is 3T/0.875T = 24/7 = 3.43. c) Suppose the speed for vector mode computation is still nine times as fast as that </p><p>for scalar mode. To maintain the effective speedup of 3.43, the vectorization ratio must satisfy the following relation: </p><p> Solving the equation, we obtain = 51 64 08/ . . </p><p>1</p><p>9</p><p>1</p><p>1</p><p>24</p><p>7 + = </p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 6</p><p>QUESTION 7 (15 Marks) On a Fujitsu VP2000, the vector processing unit is equipped with two load/store pipelines plus five functional pipelines as shown below. Consider the execution of the following compound vector function (CVF): $, %,&amp;,',(,),*,</p><p>for I=1,2,.....,N. Initially, all vector operands are in memory, and the final vector result must be store in memory. Show the space-time diagram, for pipelined execution of the CVF. Note that, two vector loads can be carried out simultaneously on the two vector-access pipes. At the end of computation, one of the two access pipes is used for storing the A array. Answer: </p><p>Load B Load D Load F Store A</p><p>Load C Load E Load G</p><p>Mul B,C Mul D,E Mul F,G</p><p>BC+DE(BC+DE)+ FG</p><p>Time</p><p>Access 1</p><p>Access 2</p><p>Multiply</p><p>Add</p><p>6\VWHP6WRUDJH8QLW66</p><p>0DLQ6WRUDJH8QLW</p><p>&amp;KDQQHO</p><p>3URFHVV</p><p>9HFWRU</p><p>5HJLVWHU</p><p>0DVN5HJLVWHU</p><p>/RDG6WRUH3LSHOLQH</p><p>/RDG6WRUH3LSHOLQH</p><p>0DVN3LSHOLQH</p><p>0DVN 3LSHOLQH</p><p>$/83LSHOLQH</p><p>$/83LSHOLQH</p><p>'LYLGH 3LSHOLQH</p><p>%XIIHU6WRUDJH6FDODU</p><p>([HFXWLRQ8QLW</p><p>6FDODU8QLWV</p><p>9HFWRU 8QLW</p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 7</p><p>QUESTION 8 (10 Marks) Given the following assembly language code. Exploit the maximum degree of parallelism among the 16 instructions, assuming no resource conflicts and multiple functional units are available simultaneously. For simplicity, no pipelining is assumed. All instructions take one machine cycle to execute. Ignore all other overhead. </p><p> /RDG 5$ 50HP$ /RDG 5% 50HP% 0XO 555 555 /RDG 5' 50HP' 0XO 555 555 $GG 555 555 6WRUH ;5 0HP;5 /RDG 5&amp; 50HP&amp; 0XO 555 555 /RDG 5( 50HP( $GG 555 555 6WRUH </p></li><li><p>FIRST SEMESTER EXAMINATIONS June 2000 ADVANCED COMPUTER ARCHITECTURE (623.305) </p><p> 8</p><p>(b) QUESTION 9 (8 Marks) </p><p> Explain the applicability and the restrictions involved in using Amdahls law and Gustafsons law to estimate the speedup performance of an n-processor system compared with that of a single-processor system. Ignore all communication overheads. (please answer in one paragraph). Answer: Amdahls law is based on a fixed workload, where the problem size is fixed regardless of the machine size. Gustafsons law is based on a scaled workload, where the problem size is increased with the machine size so that the solution time is the same for sequential and parallel executions. QUESTION 10 (5 Marks) Why are hypercube networks, which were very popular in first-generation multicomputers, being replaced by 2D or 3D meshes or tori in the second and third generations of multicomputers? Answer: In VLSI systems, networks with many dimensions require more and longer wires than low-dimensional networks. Thus, high-dimensional networks cost more and run more slowly than low-dimensional networks. Under the assumption of constant wire bisection, low-dimensional networks have wide channels, and high-dimensional networks have narrow channels. With the wormhole routing method, which is used by most of the second- and third-generation multicomputers, the wider channels provide a lower latency, less contention, and higher hot-spot throughput. </p><p> 1 </p><p>2 </p><p>3 </p><p>4 </p><p>5 </p><p>6 </p><p>7 </p><p>8 </p><p> 1 2 </p><p>4 </p><p>8 </p><p>10 </p><p>7 12 </p><p>14 </p><p>9 16 </p><p>Mem. Acc. Add Mul </p><p>3 </p><p>5 </p><p>9 6 </p><p>11 </p><p>13 </p><p>15 </p></li></ul>