Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Questions_and_answers_in_Computer_Arch_a

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
04-08-2024
Geschreven in
2024/2025

Chapter 1 Quiz Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows: (a) Calculate the average CPI for each machine, M1, and M2. For Machine M1: Clocks per Instruction = (60/100)* 1 + (30/100)*2 + (10/100)*4 = 1.6 For Machine M2: Clocks per Instruction = (60/100)*2 + (30/100)*3 + (10/100)*4 = 2.5 (b) Calculate the average MIPS ratings for each machine, M1 and M2. For Machine M1: Average MIPS rating = Clock Rate/(CPI * 106) = (80 * 106) / (1.6*106) = 50.0 For Machine M2: Average MIPS rating = Clock Rate/(CPI * 106) = (100 * 106) / (2.5*106) = 40.0 (c) Which machine has a smaller MIPS rating ? Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating (you can only change the CPI for one of the instruction classes on the slower machine)? Machine M2 has a smaller MIPS rating. If we change the CPI of instru

Meer zien Lees minder
Instelling
Computer_Arch_a
Vak
Computer_Arch_a

Voorbeeld van de inhoud

Chapter 1 Quiz

Consider two different implementations, M1 and M2, of the same instruction set. There are three
classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and
M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and
their frequencies (for a typical program) are as follows:




(a) Calculate the average CPI for each machine, M1, and M2.

For Machine M1:
Clocks per Instruction = (60/100)* 1 + (30/100)*2 + (10/100)*4
= 1.6
For Machine M2:
Clocks per Instruction = (60/100)*2 + (30/100)*3 + (10/100)*4
= 2.5

(b) Calculate the average MIPS ratings for each machine, M1 and M2.

For Machine M1:
Average MIPS rating = Clock Rate/(CPI * 106)
= (80 * 106) / (1.6*106)
= 50.0
For Machine M2:
Average MIPS rating = Clock Rate/(CPI * 106)
= (100 * 106) / (2.5*106)
= 40.0

(c) Which machine has a smaller MIPS rating ? Which individual instruction class CPI do you
need to change, and by how much, to have this machine have the same or better performance as
the machine with the higher MIPS rating (you can only change the CPI for one of the instruction
classes on the slower machine)?
Machine M2 has a smaller MIPS rating. If we change the CPI of instruction class A for Machine
M2 to 1, we can have a better MIPS rating than M1 as follows:
Clocks per Instruction = (60/100)*1 + (30/100)*3 + (10/100)*4 = 1.9
Average MIPS rating = Clock Rate/(CPI * 106) = (100 * 106) / (1.9*106) = 52.6

, 2. Suppose you have a machine which executes a program consisting of 50% floating point
multiply, 20% floating point divide, and the remaining 30% are from other instructions.

(a) Management wants the machine to run 4 times faster. You can make the divide run at most 3
times faster and the multiply run at most 8 times faster. Can you meet management’s goal by
making only one improvement, and which one?

Amdahl’s Law states:
Execution time after improvement =
(Execution time affected by improvement)/(Amount of Improvement) +
Execution time unaffected
Assuming initially that the floating point multiply, floating point divide and the other instructions
had
the same CPI,
Execution time after Improvement with Divide = (20)/3 + (50 + 30) = 86.67
Execution time after Improvement with Multiply = (50)/8 + (20 + 30) = 66.67
The management’s goal can be met by making the improvement with Multiply alone

3. Suppose that we can improve the floating point instruction performance of machine by a
factor of 15 (the same floating point instructions run 15 times faster on this new machine). What
percent of the instructions must be floating point to achieve a Speedup of at least 4?

We will use Amdahl’s Law again for this question.
Let x be percentage of floating point instructions. Since the speedup is 4, if the original program
executed in 100 cycles, the new program runs in 100/4 = 25 cycles.
(100)/4 = (x)/15 + (100 – x)
Solving for x, we get:
x = 80.36

The percent of floating point instructions need to be 80.36.

4. Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600MHz.
Computer B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We have a particular
program we wish to run. When compiled for computer A, this program has exactly 100,000
instructions. How many instructions would the program need to have when compiled for
Computer B, in order for the two computers to have exactly the same execution time for this
program

(CPUTime)A = (Instruction count)A * (CPI)A * (Clock cycle Time)A
= (100,000)*(1.3)/(600*106) ns
(CPUTime)B = (Instruction count)B * (CPI)B * (Clock cycle Time)B
= (I)B*(2.5)/(750*106) ns
Since (CPUTime)A = (CPUTime)B,
we have to solve for (I)B and get 65000

Geschreven voor

Instelling
Computer_Arch_a
Vak
Computer_Arch_a

Documentinformatie

Geüpload op
4 augustus 2024
Aantal pagina's
5
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$17.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
StudyCenter1 Teachme2-tutor
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
227
Lid sinds
2 jaar
Aantal volgers
91
Documenten
3850
Laatst verkocht
6 dagen geleden
Nursing school is hard! Im here to simply the information and make it easier!

My mission is to be your LIGHT in the dark. If you"re worried or having trouble in nursing school, I really want my notes to be your guide! I know they have helped countless others get through and thats all i want for YOU! Stay with me and you will find everything you need to study and pass any tests,quizzes abd exams!

4.3

28 beoordelingen

5
18
4
4
3
4
2
0
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen