Sie sind auf Seite 1von 10

I HC QUC GIA TP.

H CH MINH TRNG I HC CNG NGH THNG TIN LP AN NINH THNG TIN

BI TP CHNG I
MN KIN TRC MY TNH NHM SV THC HIN : NHM 4

Nhm 4 : 12520189 : Trn Tr Khang 12520060 : Nguyn Thnh t 12520040 : Ng Tun Cng 12520320 : V Hong Phc 12520255 : L Duy Mnh

Ghi ch : CR : clock rate CC : clock cycle IPC : instruction per cycle CPI : clock cycle per instruction MIPS : million instruction per second

Problem 2. Give an equation relating the performance measure MIPS, IPC, and the cycle time c. If from one generation of processors to the next c decreases by 50%, how should the value of IPC change so that MIPS is doubled? In view of the results of Exercises 3 and 4, do you think this is possible?

Vi CC gim i mt na (50%) v MIPS tng gp i, ta c : ( )

Problem 4. Consider two implementations M1 and M2 of the same ISA. We are interested in the performances of two programs P1 and P2, which have the following instruction mixes: Operations Load/stor e ALU Branches 50% 10% 20% 30% P1 40% P2 50%

The CPIs for each machine are: Operations Loadstore ALU Branches a. M1 2 1 3 M2 2 2 2

Assume that the clock rate of M1 is 2 GHz. What should be the clock

rate of M2 so that both machines have the same execution time for P1? ( ( ) )

CPU Time M1 = CPU Time M2 CR = 2.5Hz

b.

Assume now that both machines have the same clock rate and that P1

and P2 execute the same number of instructions. Which machine is faster for a workload consisting of equal runs of P1 and P2? Ta c : ( ( ( ( ) ) ) ) ( ( ( ( ) ) ) )

Li c : ( ( ) ) ( ( ) )

My 1 chy nhanh hn my 2

c. Gi

Find a workload (using only P1 and P2) that makes M1 and M2 have the Load/Store : x ALU : y Branches : z

same performance when they have the same clock rate

Ta c :

CPU Time M1 = CPU Time M2 x + y + z = 1 (2) Gii (1) v (2)

yz=0

y = z (1)

nh vy 2 my c cng hiu sut th chng trnh phi c

ALU = Branches v ALU + Load/Store + Branches =1 VD : (P) Load/Store : 60% ALU :20% Branches :20%

Problem 6. Construct an example whereby two systems have the same MIPS rating but one of them has an execution time of CPU (EXCPU) smaller than the other one. V d : 2 computer A, B thc hin 1 chng trnh vi: Computer A Instruciton Count Clock rate CPI 5 triu 2GHz 1 Computer B 6 triu 2GHz 1

Khi :

Vy EXCPU A < EXCPU B

Problem 8. With sequential execution occurring 15% of the time: Theo bi: Sequential execution = 15% time Parallel execution = P = 1 S = 1 0.15 = 0.85 a. What is the maximum speedup with an innite number of processors? S = 0.15

Theo nh lut Amdahl ta c:

b. speedup?

How many processors are required to be within 20% of the maximum

20% Speedupmax = 20% * Ta c : ( )

vi N l s lng processor N= 1.4167

Vy ta cn 2 processor t c Speedup l 20% ca Speedup ti a. c. speedup? 2% Speedupmax = 2%* Ta c : ( ) = How many processors are required to be within 2% of the maximum

vi N l s lng processor N= 0.1156

Vy ta cn 1 processor (v processor ny khng cn hot ng ht cng sut) t c Speedup l 20% ca Speedup ti a.

Problem 9. For each of themetrics specied, indicate which of the (weighted) arithmetic, harmonic, or geometric mean you would use: Ta c : Weighted arithmetic mean = Weighted harmonic mean = Geometric mean = S: the corresponding time on the reference machine a. An experiment where you have run the SPEC CPU2006 integer benchmark on your laptop and noted the execution times of each program in the suite. Laptop c thng s nh sau : Intel Core i5-2320 CPU MHz: 3000, 4 cores, 1 chip, 4 cores/chip Memory: 4 GB (2 x 2 GB 2Rx4 PC3-10600U-9) Disk Subsystem: 1 TB SATA, 7200 RPM Operating System: Microsoft Windows 7 Ultimate 6.1.7601 Service Pack 1 Build 7601 Benchmarks perlbench bzip2 gcc mcf gobmk hmmer sjeng libquantum h264ref omnetpp astar xalancbmk Run Time 372 438 302 148 440 186 468 26.1 420 266 270 195

b. Same experiment as in (a), but now you also run the suite on a computer in your lab at the University. How do you compare the speeds of the two machines? My tnh c thng s nh sau:

CPU Name: Intel Core 2 Duo E7200 CPU MHz: 2533, 2 cores, 1 chip, 2 cores/chip Memory: 4 GB (4x1GB DDR2-800 CL5) Disk Subsystem: Seagate 320 GB SATA, 7200RPM Operating System: Windows Vista Ultimate w/ SP1 (64-bit) Benchmarks perlbench bzip2 gcc mcf gobmk hmmer sjeng libquantum h264ref omnetpp astar xalancbmk Run Time 601 718 500 352 628 652 695 234 792 441 556 370

so snh, ta s dng cc cng thc geometric. Tuy nhin, khng th so snh 2 my vi nhau m phi thng qua mt my tham chiu. My tham chiu ny cng c benchmark vi suite nh 2 my trn. Tham kho trn trang www.spec.org, ta c kt qu i vi my tham chiu nh sau : Benchmarks perlbench bzip2 gcc mcf gobmk hmmer sjeng libquantum h264ref omnetpp astar Run Time 9770 9650 8050 9120 10490 9330 12100 20720 22130 6250 7020

xalancbmk - Vi laptop : Geometric mean = - Vi my tnh lab : Geometric mean =

6900

= 41.77

= 19.66

Vy laptop chy nhanh hn my tnh phng lab. c. d. An experiment where you have simulated 100 million instructions in Same experiment as in (c), but now you report in terms of IPC. each of 12 programs and measured CPI for each simulation.

Das könnte Ihnen auch gefallen