aboutsummaryrefslogtreecommitdiff
path: root/slides/2019-it-intro-computer-structure/img/memory.tex
blob: b15dc922dab51c57d8b7dd727fb00632d3e91606 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\begin{tikzpicture}[ mem/.style={
    draw=lightGray,
    top color=lightGray,
    bottom color=white,
    rounded rectangle,
    shading=axis,
    minimum width=2cm,
  },
  plain/.style={
    draw=none,
  },
  arrow/.style={
    thick,
    decoration={
      markings,
      mark=at position 1 with {\arrow[semithick]{open triangle 60}}
    },
   double distance=1.4pt, shorten >= 5.5pt,
   preaction = {decorate},
   postaction = {draw,line width=1.4pt, white,shorten >= 4.5pt}
  },
]
  \node at (0, 2) [mem] (hdd) {HDD};
  \node[below=12pt of hdd, mem] (ssd) {SSD};
  \node[below=12pt of ssd, mem] (ram) {RAM};
  \node[below=12pt of ram, mem] (cache) {Cache};
  \node[below=12pt of cache, mem] (register) {Register};

  \node[left=6pt of hdd, plain] {TB};
  \node[left=6pt of ssd, plain] {GB};
  \node[left=6pt of ram, plain] {GB};
  \node[left=6pt of cache, plain] {MB};
  \node[left=6pt of register, plain] {bits};

  \node[right=6pt of hdd, plain] {persistent};
  \node[right=6pt of ssd, plain] {persistent};
  \node[right=6pt of ram, plain] {volatile};
  \node[right=6pt of cache, plain] {volatile};
  \node[right=6pt of register, plain] {volatile};

  \draw[arrow]
    ($ (current bounding box.south west) + (-0.5,0) $) --
    (current bounding box.north west);
  \draw[arrow]
    ($ (current bounding box.north east) + (0.5,0) $) --
    (current bounding box.south east);

  \node[above=0pt of current bounding box.north west] {largest};
  \node[below=0pt of current bounding box.south east] {fastest};
\end{tikzpicture}