Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ALP4-Tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mactavish96
ALP4-Tutorials
Commits
5adda840
Commit
5adda840
authored
2 years ago
by
Chao Zhan
Browse files
Options
Downloads
Patches
Plain Diff
add amdahl's law exercises
parent
6b229985
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
slides/images/execution-model.png
+0
-0
0 additions, 0 deletions
slides/images/execution-model.png
slides/pages/recap.md
+42
-2
42 additions, 2 deletions
slides/pages/recap.md
with
42 additions
and
2 deletions
slides/images/execution-model.png
0 → 100644
+
0
−
0
View file @
5adda840
9.66 KiB
This diff is collapsed.
Click to expand it.
slides/pages/recap.md
+
42
−
2
View file @
5adda840
...
@@ -155,10 +155,10 @@ title: Recap IV
...
@@ -155,10 +155,10 @@ title: Recap IV
</div>
</div>
---
---
title: Recap I
II
title: Recap I
V
---
---
### 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} =
\f
rac{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?
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment