Docsity

Solutions for Final Exam - Advanced Computer Architecture | ECE 4100, Exams of Computer Architecture and Organization

Toggle sidebar
bg1
SCORE:________ Name:__________________________________________
ECE 4100 Advanced Computer Architecture
Final Exam – Summer 2004
1. (10 points) What happens in a multiprocessor “snooping protocol” when a cache line remains in the
exclusive state for several accesses and is this good or bad for system performance?
A cache line in the exclusive state for several accesses will keep data in the local cache and not tie up the
system bus – this is good for performance.
2. (10 points) What limits the size and performance of a single bus SMP parallel computer system?
I/O bus bandwidth of a single bus will become saturated at some point as more processors are added.
3. (10 points) Adding 7 additional processors to a parallel computer system (for a total of 8 processors) runs
an application 3.5 times faster than on one processor (ignore additional communication overheard between
processors and any possibility of superlinear speedup effects). What is the maximum percentage of the
original program code that has to run sequentially for this to be possible? (assume code only runs parallel
on eight or sequential on one)
3.5= 1/((x/8)+(1-x)) , x =.816 parallel so 1-.816= 18.4% sequential
Percentage of original program code that is sequential __18.4______%
pf3
pf4
pf5

Partial preview of the text

Download Solutions for Final Exam - Advanced Computer Architecture | ECE 4100 and more Exams Computer Architecture and Organization in PDF only on Docsity!

SCORE:________ Name:__________________________________________

ECE 4100 Advanced Computer Architecture

Final Exam – Summer 2004

  1. (10 points) What happens in a multiprocessor “snooping protocol” when a cache line remains in the exclusive state for several accesses and is this good or bad for system performance? A cache line in the exclusive state for several accesses will keep data in the local cache and not tie up the system bus – this is good for performance.
  2. (10 points) What limits the size and performance of a single bus SMP parallel computer system? I/O bus bandwidth of a single bus will become saturated at some point as more processors are added.
  3. (10 points) Adding 7 additional processors to a parallel computer system (for a total of 8 processors) runs an application 3.5 times faster than on one processor (ignore additional communication overheard between processors and any possibility of superlinear speedup effects). What is the maximum percentage of the original program code that has to run sequentially for this to be possible? (assume code only runs parallel on eight or sequential on one) 3.5= 1/((x/8)+(1-x)) , x =.816 parallel so 1-.816= 18.4% sequential Percentage of original program code that is sequential __18.4______%
  1. (10 points) Assume a network with a 1000M bit/sec bandwidth has a sending overhead of 75 usec. and a receiving overhead of 100 usec. How long would it take to send a 2 Mbyte message. Assume the receiving machines are in two locations, one is 1 km away at another building in town and the other in Asia is 8000 km away. Use the book’s speed of light in a conductor estimate (2/3 of the speed in a vacuum). Compute the total latency for the message (to three decimal places). Assume the network does not store and later forward data in buffers along the way and the message length includes extra bits for protocol and error det. 75usec + dist/(2/3*300,000) + (2x10^6 *8)/(1000 *10^6 ) + 100usec Minimum Total latency for message _________16.18ms____________ (1 km apart) Minimum Total latency for message _______56.175ms_____________ (8000 km apart)
  2. (10 points) Compare the average time to read or write a Windows cluster of eight 512-byte sectors on the new high performance Western Digital Serial ATA Raptor disk to a typical EIDE disk with these features: Raptor: Average seek time is 4.5ms (use the book’s suggested 1/3 correction factor for a more realistic seek time) a serial ATA transfer rate of 150 Mbytes/sec, the disk rotates at 10,000 RPM, and the controller overhead is .08ms. To an older IDE drive (that is cheaper and larger) with these features: Typical EIDE: Average seek time is 8.9ms (use the book’s suggested 1/3 correction factor for a more realistic seek time) an Ultra IDE transfer rate of 66 Mbytes/sec, the disk rotates at 7,200 RPM, and the controller overhead is .1ms. (on both disks, ignore the effects of the cache inside the disk and assume you can read all eight contiguous sectors during a single pass over the disk cluster. Recall from 3055 that clusters are just a small group of disk sectors that the OS uses to allocate disk space in the file system tables) 1/34.5ms + .5601000/10,000ms + 4096/(15010^6 )+ .08 = 4.61ms 1/38.9ms + .5601000/7,200ms + 4096/(6610^6 )+ .1 = 7.3ms The new Raptor drive is ____58_____ % faster.
  1. (15 points) Part I (10 of 15 points): Unroll the loop shown below four times and schedule to reduce the number of stalls and control overhead. You can assume that the loop executes a multiple of four times. Use registers F12..F30, if needed. Indicate any stalls in your answer. Instruction producing result Instruction using result Latency in clock cycles FP ALU Op FP ALU Op 2 FP ALU Op Store Double 2 Load Double FP ALU Op; 1 Load Double Store Double 0 LOOP: L.D F8, 0(R1) L.D F4, 64(R1) SUB.D F4, F4, F MUL.D F4, F4, F S.D F4, 0(R1) DADDIU R1, R1, # BNE R1, R3 LOOP The original code takes ___13_____ clocks per loop iteration. Assume 1 branch delay slot. L.D F8, 0(R1) L.D F4, 64(R1) L.D F12, 8(R1) L.D F14, 72(R1) L.D F16, 16(R1) L.D F18, 80(R1) L.D F20, 24(R1) L.D F22, 88(R1) SUB.D F4, F4, F SUB.D F14, F14, F SUB.D F18, F18, F SUB.D F22, F22, F MUL.D F4, F4, F MUL.D F14, F14, F MUL.D F18, F18, F MUL.D F22, F22, F DADDIU R1, R1, # S.D F4, -32(R1) S.D F14, -24(R1) S.D F18, -26(R1) BNE R1, R3 LOOP S.D F22, -8(R1) The unrolled code now takes ____5.5____ clocks per (original) loop iteration Part II (5of 15 points) : Use software pipelining based on up to four loop unrollings to minimize stalls. Startup and cleanup code is not required. Indicate any stalls in your answer. Note: Do not unroll more than four times for the basis of the pipeline code. S.D F14,-24(R1) MUL.D F14,F12,F SUB.D F12,F4,F L.D F8,0(R1) DADDIU R1,R1,# BNE R1,R3, Loop L.D F4,56(R1) The software pipelined version of the code now takes ____7____ clocks per (original) loop iteration
  1. (10 points) Consider the program segment below running on a single-issue machine using Tomasulo’s Algorithm. Fill in the clock cycle number in the table below assuming the latencies shown in the table below the program. LOOP: L.D F6, 0(R1) L.D F4, 0(R2) DIV.D F2, F6, F SUB.D F4, F4, F MUL.D F4, F6, F ADD.D F8, F8, F DADDIU R1, R1, # - BNE R1, R3 LOOP Details of Functional Units: Unit Latency (in Execute) Reservation Stations FP Add/Sub 4 2 FP Mult 7 2 FP Div 14 2 FP Load/Store 2 2 each Load/Store buffers Integer Unit 1 None Note: The FP arithmetic units are NOT pipelined – i.e. you must wait for the current operation to finish execution before using the unit again. You can do a new FP load/store every clock cycle. The WB stage takes only 1 clock cycle and during that cycle the new data appears on the (single) CDB and at all reservation stations. Instruction Issue Execute WB L.D F6, 0(R1) 0 1-2 3 L.D F4, 0(R2) 1 2-3 4 DIV.D F2, F6, F4 2 5-18 19 SUB.D F4, F4, F10 3 5-8 9 MUL.D F4, F6, F2 4 20-26 27 ADD.D F8, F8, F4 5 28-31 32 DADDIU R1, R1, #-8 6 7 8 BNE R1, R3 LOOP 9 10