Skip to content
Snippets Groups Projects
Commit 5adda840 authored by Chao Zhan's avatar Chao Zhan
Browse files

add amdahl's law exercises

parent 6b229985
No related branches found
No related tags found
No related merge requests found
slides/images/execution-model.png

9.66 KiB

...@@ -155,10 +155,10 @@ title: Recap IV ...@@ -155,10 +155,10 @@ title: Recap IV
</div> </div>
--- ---
title: Recap III title: Recap IV
--- ---
### Amdahl's Law II ### Amdahl's Law (cont.)
**What happens when $n \rightarrow \infty$?** **What happens when $n \rightarrow \infty$?**
...@@ -191,3 +191,43 @@ title: Recap III ...@@ -191,3 +191,43 @@ title: Recap III
</v-click> </v-click>
---
title: Recap V
---
### Amdahl's Law - Exercise 1
How is **system performance** altered when **some component** is changed?
Program execution time is made up of **75% CPU time** and **25% I/O time**. Which is the better enhancement:
- a) Increasing the CPU speed by 50% or
- b) Reducing the I/O time by 50%?
<div class="container flex justify-center mt-5">
<img src="/images/execution-model.png" class="block w-lg"/>
</div>
**Hint:** Use Amdahl's Law and derive the speedup for each case.
---
title: Recap V
---
### Amdahl's Law - Exercise 2
A program made up of **10% serial initialization and finalization code** and it has a **fully parallelizable loop of N iterations**.
Assumption: **fork/join** overhead is negligible, execution time for parallelizable loop is scales linearly with N, that is:
- For p processors, each processor executes $N/p$ iterations
- Parallel time for executing the loop is: $T_{serial} = \frac{N}{p}$
Given: $T_{serial} = 0.1T$ and $T_{loop} = 0.9T$, answer the following questions:
- a) What is the speedup of the program with 4 processors?
- b) What is the maximum speedup of the program?
- c) What can we conclude from this?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment