Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Computer 

Organisation and
Architecture

PRESENTATION
TO :- MRS. ANUPMA SANGWAN

PREPARED BY :-

HARDIK (190010130040) CSE-I


PREMGARG (190010130093) CSE-II
YATIN YADAV (190010130136) CSE-II
Amdahl's Law

 Amdhals law is a law governing the speedup of using parallel processors on a


problem , versus using only one serial processor, under the assumption that the
problem size remains same the same when parallelized
Speed up
 
𝑶𝒍𝒅 𝑻𝒊𝒎𝒆
𝑺𝒑𝒆𝒆𝒅𝒖𝒑=
𝑵𝒆𝒘 𝑻𝒊𝒎𝒆

 A program used to take 20 minutes to run. Now it takes 15. What is the
speedup?

  𝟐𝟎
𝑺𝒑𝒆𝒆𝒅𝒖𝒑 = =𝟏 . 𝟑𝟑
1.33 times or 33% 𝟏𝟓
Gene Amdahl
Amdhal’s law:speed up performance law
 Originally formulated by gene amdhal’s on 1960’s.

01/18/2022
 It is one of the speedup performance law.
 It is based on a fixed problem size.
 Actually to keep the efficiency of a system fixed we have to increase both the
size of the problem and the no. of processor simultaneously .
 Amdhal’s law tells that for a given problem size ,the speedup doesn’t
increase linearly as the number of processor increases.In fact ,speed up
tends to become saturated.
 Amdhal’s law states that a small portion of the program which cannot be
parallelized(serial part) ,will limit the overall speed up,available from
parallelization.
 Computation problem = serial part + parallel part
01/18/2022
01/18/2022
Amdahl's Law

 Describes overall speedup of a system when we speed up


one part of a system

 
𝟏
𝑺=
𝒑
( 𝟏 − 𝒑)+
𝒏
Amdahl's Law
 Describes overall speedup of a system when we speed up
one part of a system

p:part of program which is parallel


 
𝟏
n : total number of 𝑺=
processors 𝒑
(𝟏 − 𝒑)+
1 – p :serial part of program
𝒏
S : speed up
Example

 On a large system, suppose we can upgrade


its disk drives for $7,000 to make them 150%
faster. Processes spend 70% of their time
running in the CPU and 30% of their time
waiting for disk service.

 What would the expected speedup be?


Example
…upgrade its disk drives for $7,000 to make them 150% faster.
Processes spend 70% of their time running in the CPU and 30% of
their time waiting for disk service

 
p:part of program which is parallel 𝟏
𝑺=
n : total number of 𝒑
processors (𝟏 − 𝒑)+
𝒏
1 – p :serial part of program
S : speed up
Example
…upgrade its disk drives for $7,000 to make them 150% faster.
Processes spend 70% of their time running in the CPU and 30% of
their time waiting for disk service

 
p:part of program which is parallel 𝟏
𝑺=
n : total number of . 𝟑𝟎
processors
( 𝟏 − . 𝟑𝟎 ) +
𝟐 . 𝟓𝟎
1 – p :serial part of program
S : speed up
150% increase on 100% = 250%
Example
…upgrade its disk drives for $7,000 to make them 150% faster.
Processes spend 70% of their time running in the CPU and 30% of
their time waiting for disk service
 
𝟏
𝑺=
Speed up is ~ 22% . 𝟕𝟎+. 𝟏𝟐
 
𝟏
𝑺=
. 𝟖𝟐
 
𝑺=𝟏 . 𝟐𝟏𝟗𝟓𝟏
Example

 On a large system, suppose we can upgrade its disk


drives for $7,000 to make them 150% faster.
Processes spend 70% of their time running in the CPU
and 30% of their time waiting for disk service.
 Or we could spend $10,000 to upgrade the CPU to be
50% faster…
Example
…upgrade its CPU to run 50% faster. Processes spend 70% of their
time running in the CPU and 30% of their time waiting for disk service

f : fraction of time
part is limiting factor
 
𝟏
𝑺=
k : speedup of that . 𝟕𝟎
part ( 𝟏 − . 𝟕𝟎 ) +
𝟏 . 𝟓𝟎
1 – f : fraction of time
doing other stuff
S : speed up
Example
…upgrade its CPU to run 50% faster. Processes spend 70% of their
time running in the CPU and 30% of their time waiting for disk service

 
𝟏
Speed up is ~ 30% 𝑺=
. 𝟑𝟎+. 𝟒𝟔 𝟔
 
𝟏
𝑺=
. 𝟕𝟔 𝟔
 
𝑺=𝟏 . 𝟑𝟎𝟒
Choices

Disks: 22% speedup for $7,000


~ $318 per %

CPU : 30% speedup for $10,000


~ $333 per %
Non IO

 Protein String Matching Code


 4 days execution time on current machine
 20% of time doing integer instructions
 35% percent of time doing I/O
 Which is the better tradeoff?
 Compiler optimization that reduces number of integer instructions
by 25%
 Hardware optimization that reduces the latency of each IO
operations from 6us to 5us.
Non IO
Reduce instructions by • Reduce IO from 6us
25% = 33% speedup to 5us = 20%
(1/.75) speedup (6/5)
  𝟏   𝟏
𝑺= 𝑺=
. 𝟐𝟎 . 𝟑𝟓
( 𝟏 − . 𝟐𝟎 ) + ( 𝟏 − . 𝟑𝟓 ) +
𝟏 . 𝟑𝟑𝟑 𝟏 . 𝟐𝟎

 
1.0526  
1.0619
Limitations of Amdahl's Law

 Amdahl's Law doesn't take into account


interactions
 Speeding up one part of process may
change the % of time it is limiting factor

You might also like