You are on page 1of 3

Computer Architecture and organization

Lecture: 5, 6

‫ دوة ﻋﻠﻰ ﮳ﺣﻬﺎز ﮲ﺎ ﻫ ﮵ ﮲‬running ‫﮳ﲁ ﮳ﺴﺎﻃﻪ اﺣ ﮲ﺎ ﻋﺎ ﮵ ﮲ﺮ ﮵ ﮲ﮟ ﮲ﻌﺮف اﻟ ﮳ﺮ ﮲ﺎﻣﺢ اﻟﻠﻰ اﺣ ﮲ﺎ ﻋﺎﻣﻠ ﮵ ﮲ﮟ ﻟ ﮵ﻪ‬
‫ ﻟﺬﻟﻚ‬execution time ‫ﺎﺣﺪ اد ا ﮵ﻪ‬
cpu ‫ﺎﺣﺪ م‬
‫ ﮳ ﮵ ﮲‬instruction ‫ﺎﺣ ﮵ ﮲ﮟ ﮲ﻌﺮف ﰻ‬‫ وﻣﺤ ﮳‬instruction ‫ﺎﺣ ﮵ﮟ ﻌﺮف اﻟ ﮳ﺮ ﺎﻣﺢ ﮲ ﮵ﻪ م‬
‫﮲‬ ‫﮲ ﮲‬
‫اﺣ ﺎ ﻟﻮ ﮲ ﻜﺮ ﺎ ﻫ ﻼ ﮴ ﻰ اﻻ ﻰ ﻣﺤ ﮳‬
‫﮴‬ ‫﮴‬ ‫﮴‬ ‫﮲ ﮲‬ ‫﮲‬
: ‫ ﻟﺬﻟﻚ ﮲ ﮴ ﺪر ﮲ ﮲ﺼﻊ ﻫﺬا اﻟ ﮴ ﺎ ﮲ﻮن‬cpu cycle time ‫ وال‬cycle

CPU execution time for a program = CPU clock cycles for a program * Clock cycle time

1
Clock cycle time =
Clock Rate

CPU clock cycles for a program


CPU execution time for a program =
Clock Rate

‫ ﮳ ﮴ ﮲‬cpu cycle
‫ ﻫ ﮲ﺎ اﺣ ﮲ﺎ ﮳ ﮲ﺤﺴﺐ ﰻ‬instruction ‫ﺎﺣﺪ م‬

CPU clock cycles for a program = Instruction_Count * CPI

Or CPU clock cycles for a program =

‫ ﮲‬clock‫ ﻟ ﮵ﻬﺎ‬instruction ‫﮳ﺴ ﮴ ﮲ﺤﺪم اﻟ ﮴ ﺎ ﮲ﻮن ده‬


‫ﻣﺤ ﮴ﻠﻒ‬
‫ﻟﻮﰻ‬

 Instruction_Count = instruction ‫ﻋﺪد‬


 CPI (Clock per instruction)

‫ﻋﺴﺎن ﮴ﺮن ﮳ﺮ ﮲ﺎﻣﺢ ﻣﻌ ﮵ﮟ ﻫ ﮵ﺴﺎوى ﻋﺪد‬ ‫﮳ ﮵‬ ‫﮳‬ ‫﮵‬ ‫﮲ ﮵‬


‫واﺣ ﺮا ﮲ﺴ ﮴ ﮲ ﮴ﺢ اﻟ ﮴ ﺎ ﮲ﻮن اﻟ ﮲ﻬﺎ ٔﻰ ﺣ ﺚ ان اﻟﻮ ﮴ ﺖ اﻟﻠﻰ ﮴ ﮲ﺤﺪه اﻟﺴﻰ ﻰ ﻮ ﮶‬
‫﮲‬
‫ﻣﺼﺮو ﮳ﻪ ﮲ ﻰ ﮴ﺎ ﮵ﻢ اﻟﺴﻰ ﮳ﻰ ﮵ﻮ‬
‫ﺮﻛﺴ ﮲ﮟ ﮲‬ ‫﮳ ﮵ ﮵‬
‫ﻣﺼﺮوب ﮲ ﻰ ﻋﺪد اﻟﺴﻰ ﻰ ﻮ ﺳ ﳫﺲ ﻟﲁ ا ﮲ﺴ ﮴ ﮶‬ ‫ﺮﻛﺴ ﮲ ﮲ﺮ ﮲ ﻰ اﻟ ﮳ﺮ ﮲ﺎﻣﺢ دوة ﮲‬ ‫اﻻ ﮲ﺴ ﮴ ﮶‬
‫اﻟﺴ ﮵ﲁ اﻟﻮاﺣﺪه‬

Instruction_Count * CPI
∴ CPU execution time for a program =
Clock Rate
Boso 3al el Examples deh: chapter 1 page 32, 34, 35

Benchmarks: ‫وﺳ ﮵ﻠﺔ ﮴ ﮵ﺎس‬

‫ ﻛﻮﺳ ﮵ﻠﺔ ﮴ ﮵ﺎس ﻟﻞ ﮳ﺮوﺳ ﮵ﺴﻮر ﮵‬instruction‫ﻣﺤﻤﻮﻋﺔ ﻣﮟ‬


‫ﻋﻠﻰ ﺳ ﮳ ﮵ﻞ اﻟﻤ ﮶ﺎل‬ ‫ﻫﻌﻤﻞ ﮳‬
‫﮲‬

Fallacies: ‫ﺎﻃﻰ‬
‫اﻋ ﮴ ﮴ ﺎد ﮲ﺣ ﮵‬

- Computers at low utilization use little power

Pitfalls: ‫ﻣﮟ اﻟﺴﻬﻞ اﻟﻮ ﮴ ﻮع ﮲ ﮵ﻪ‬


‫﮲‬
Ex: Expecting the improvement of one aspect of a computer to increase overall performance by an
amount proportional to the size of the improvement

Amadahl law: the performance enhancement possible with a given improvement is limited by the
amount that the improved feature is used.

Execution time after improvement = Execution time unaffected +


Execution tome affected by improvement
amount of improvement

EX: Suppose a program runs in 100 seconds on a computer, with multiply operations responsible for
80 seconds of this time. How much do I have to improve the speed of multiplication if I want my
program five times faster?

Amount of improvement?

Solution:

Execution time after improvement = Execution time unaffected +


Execution tome affected by improvement
amount of improvement
80
100/5 = (100-80) +
Amount of improvement

80
0=
Amount of improvement

∴Amount of improvement = ∞

∴there is no amount by which we can improve program five times faster

You might also like