diff --git a/slides/images/execution-model.png b/slides/images/execution-model.png new file mode 100644 index 0000000000000000000000000000000000000000..e523e97c0938d61b471a0b003a7d4f3ae8c3cf5a Binary files /dev/null and b/slides/images/execution-model.png differ diff --git a/slides/pages/recap.md b/slides/pages/recap.md index 12fa0b60e31a1a4c34f7d7323afc12f8bf571209..8d6a926279f950a334562f0820bf2037da063854 100644 --- a/slides/pages/recap.md +++ b/slides/pages/recap.md @@ -155,10 +155,10 @@ title: Recap IV </div> --- -title: Recap III +title: Recap IV --- -### Amdahl's Law II +### Amdahl's Law (cont.) **What happens when $n \rightarrow \infty$?** @@ -191,3 +191,43 @@ title: Recap III </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?