Skip to content
Snippets Groups Projects
Commit 98370552 authored by Dominik Zobel's avatar Dominik Zobel
Browse files

Add visualization for memory models

parent f4c3fa6b
No related branches found
No related tags found
1 merge request!74Memory hierarchies lecture
Pipeline #71673 passed
Showing
with 85 additions and 12 deletions
......@@ -173,18 +173,44 @@ Time in seconds using a 2 GB numpy array ($128 \times 128 \times 128 \times 128$
- Here just focus on latency
## Memory access time model (1/3)
## First model version
:::{.r-stack}
![](static/concepts_model01.png){.fragment width=100% fragment-index=1}
![](static/concepts_model02.png){.fragment width=100% fragment-index=2}
![](static/concepts_model03.png){.fragment width=100% fragment-index=3}
:::
## Memory access time for first version
| Cache | Access Time | Hit Ratio |
| ------ | ------------ | ---------- |
| $L_1$ | $T_1$ | $H_1$ |
| $L_2$ | $T_2$ | |
| Memory | $T_M$ | $H_M$ |
| Disk | $T_D$ | |
- Parallel and serial requests possible
## Second model version
:::{.r-stack}
## Memory access time model (2/3)
![](static/concepts_model03.png){.fragment width=100% fragment-index=1}
![](static/concepts_model04.png){.fragment width=100% fragment-index=2}
:::
## Memory access time for second version (1/2)
| Cache | Access Time | Hit Ratio |
| ------ | ------------ | ---------- |
......@@ -194,7 +220,7 @@ Time in seconds using a 2 GB numpy array ($128 \times 128 \times 128 \times 128$
## Memory access time model (3/3)
## Memory access time for second version (2/2)
- Average memory access time $T_{avg,p}$ for parallel access (processor connected to all caches)
......@@ -216,17 +242,25 @@ T_{avg,s} &= H_1 T_1 + ((1-H_1)\cdot H_2)\cdot(T_1+T_2)\\
# Behind the scenes
# Processor techniques
## Processor techniques
## Third model version
- Caching
- Prefetching
- Branch prediction
:::{.r-stack}
![](static/concepts_model04.png){.fragment width=100% fragment-index=1}
![](static/concepts_model05.png){.fragment width=100% fragment-index=2}
![](static/concepts_model06.png){.fragment width=100% fragment-index=3}
:::
## Unavailable data
## Unavailable data (1/2)
If data is not available in the current memory level
......@@ -234,9 +268,48 @@ If data is not available in the current memory level
- cache missing (cache -> main memory)
- page fault (main memory -> disk)
Miss description
## Unavailable data (2/2)
:::{.r-stack}
![](static/concepts_model06.png){.fragment width=100% fragment-index=1}
![](static/concepts_model07.png){.fragment width=100% fragment-index=2}
![](static/concepts_model08.png){.fragment width=100% fragment-index=3}
![](static/concepts_model09.png){.fragment width=100% fragment-index=4}
![](static/concepts_model10.png){.fragment width=100% fragment-index=5}
:::
## Available data (1/2)
Techniques to provide data ahead of time
- caching
- prefetching
- branch prediction
## Available data (2/2)
:::{.r-stack}
![](static/concepts_model10.png){.fragment width=100% fragment-index=1}
![](static/concepts_model11.png){.fragment width=100% fragment-index=2}
![](static/concepts_model12.png){.fragment width=100% fragment-index=3}
:::
# Visualization of memory hierarchies
......
lectures/memory-hierarchies/static/concepts_model01.png

18.5 KiB

lectures/memory-hierarchies/static/concepts_model02.png

16.1 KiB

lectures/memory-hierarchies/static/concepts_model03.png

11.8 KiB

lectures/memory-hierarchies/static/concepts_model04.png

13.6 KiB

lectures/memory-hierarchies/static/concepts_model05.png

17.5 KiB

lectures/memory-hierarchies/static/concepts_model06.png

50.1 KiB

lectures/memory-hierarchies/static/concepts_model07.png

56.1 KiB

lectures/memory-hierarchies/static/concepts_model08.png

57.3 KiB

lectures/memory-hierarchies/static/concepts_model09.png

77.3 KiB

lectures/memory-hierarchies/static/concepts_model10.png

78.1 KiB

lectures/memory-hierarchies/static/concepts_model11.png

83.8 KiB

lectures/memory-hierarchies/static/concepts_model12.png

78.1 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment