Design Problem1 of CSE261 "Computer System Architecture"
Design Problem1 of CSE261 "Computer System Architecture"
LHST
Design Problem1
Of
CSE261
“Computer
System
Architecture”
(i). Given that 60% of the first application is parallelizable, how much speed
up would you achieve with that application if run in isolation?
Sol:-To solve this problem we need to use some basic speed up laws. There are a
lot of laws for this such as Amdahl’s Law, Gustsfson’s Law & Memory-bounded
speed up law by Sun and Ni.
Out of all these laws here we are going to use Amdahl’s Law to solve our problem.
Before we talk about this law let us first of all understand the problem. In this
problem the Company which has bought a system with Dual core processor, has
given us a task to optimize the software for the system. The first application needs
75% of the resources and the others need only 25% of the resources.
Now, given that 60%of the first application is parallelizable & we have to find that
how much speed up we would achieve with this if it will run in isolation.
Let us now first learn the concept of parallelizable. The degree of parallelism
reflects the extent to which software parallelism matches hardware parallelism.
Degree of parallelism:-The execution of a program on a parallel computer may use
different number of processors at different time periods during the execution of
cycle. For each time period, the number of processors used to execute a program is
defined as the degree of parallelism (DOP).this is a discrete time function,
assuming only non-negative integer values.
Now, let us discuss the Amdahl’s Law: - It is a law which is used to find the
maximum expected improvement to an overall system when only part of the
system is improved. It is often used in parallel computing to predict the theoretical
maximum speed up using multiple processors.
Amdahl's law is a model for the relationship between the expected speedup of
parallelized implementations of an algorithm relative to the serial algorithm, under
the assumption that the problem size remains the same when parallelized.
More technically, the law is concerned with the speedup achievable from an
improvement to a computation that affects a proportion Z of that computation
where the improvement has a speedup of S. Amdahl's law states that the overall
speedup of applying the improvement will be
1/ [(1-Z) +Z/S]
In the case of parallelization, Amdahl's law states that if Z is the proportion of a
program that can be made parallel (i.e. benefit from parallelization), and (1 − Z) is
the proportion that cannot be parallelized (remains serial), then the maximum
speed up that can be achieved by using N processors is
1/ [(1-Z) +Z/n]
In the limit, as N tends to infinity, the maximum speedup tends to 1 / (1 − P). In
practice, performance to price ratio falls rapidly as N is increased once there is
even a small component of (1 − P).
Solution:-
Now according to formula, substituting the values in Z & N.
Z = 60% = 0.6
N=2
Speed Up = 1/ [(1-0.6) + (0.6/2)]
Thus, Speed Up = 1/ [(0.4) + (0.3)]
=1/0.7 = 1.428
Therefore, the speedup would be achieved if 60% of the first application is
parallelizable is 1.428.
(ii). Given that 90% of the second application is parallelizable, how much
speed up would this application observe if run in isolation?
= 1 / (1-0.9) + 0.9/2
= 1/0.1+0.45
=> 1/0.55 =1.818
Therefore, the speedup would be achieved if 90% of the second application is
parallelizable is 1.818.
(iii). Given that 60% of the first application
is parallelizable, how much overall system speed up would you observe if you
parallelized it, but not the second application?
Sol:-Now, here only 60% of the first application is parallelizable, the overall
system speed up would be: -
Here, the 1st application would need 75% of resource & 2nd uses 25%.
Speed Up = 1/ [(0.25) +0.75(0.4+0.6/2)]
= 1.29
(iv). How much overall system speed up would you achieve if you parallelized
both applications, given the information in parts (i) and (ii)?
Sol:-To calculate the overall speed we will take the average of these 2.
i.e. Overall Speed up = (1.818+1.432)/2
= 1.632