aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/2023-01-14-xpost-matcha-threads/yield.drawio
blob: 1a254d1531d19a1ad8a027a8c314f4ddf6db4798 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<mxfile host="Electron" modified="2024-12-18T14:59:49.684Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.1.5 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="skZcgHJZXzQU042ml1U4" version="23.1.5" type="device">
  <diagram name="Page-1" id="eupsqoG42ICuPfNcTmHv">
    <mxGraphModel dx="225" dy="410" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="eODdzWfbsgeiVxMC9DDa-1" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="400" width="120" height="240" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-2" value="&lt;font&gt;process address space&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="240" y="360" width="120" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-3" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="470" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="600" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-10" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;fontColor=default;comic=0;gradientColor=none;gradientDirection=west;" parent="1" vertex="1">
          <mxGeometry x="240" y="430" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-12" value="&lt;font face=&quot;monospace&quot;&gt;stack A&lt;/font&gt;" style="text;whiteSpace=wrap;rotation=-90;html=1;" parent="1" vertex="1">
          <mxGeometry x="350" y="445" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-14" value="&lt;font face=&quot;monospace&quot;&gt;stack B&lt;/font&gt;" style="text;whiteSpace=wrap;rotation=-90;html=1;" parent="1" vertex="1">
          <mxGeometry x="350" y="570" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-15" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;comic=0;gradientColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="540" width="120" height="40" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-17" value="core" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;align=center;verticalAlign=top;" parent="1" vertex="1">
          <mxGeometry x="80" y="440" width="80" height="60" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-20" target="eODdzWfbsgeiVxMC9DDa-25" edge="1">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="200" y="485" />
              <mxPoint x="200" y="470" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-20" value="sp" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="135" y="475" width="20" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-20" target="eODdzWfbsgeiVxMC9DDa-20" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-25" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;callee-saved regs&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#50FA7B;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="240" y="450" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-26" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;callee-saved regs&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#ff55ff;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="240" y="580" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-29" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="605" y="400" width="120" height="240" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-30" value="&lt;font&gt;process address space&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="605" y="360" width="120" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-31" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="605" y="470" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-32" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="605" y="600" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-33" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;comic=0;gradientColor=none;" parent="1" vertex="1">
          <mxGeometry x="605" y="430" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-34" value="stack A" style="text;whiteSpace=wrap;rotation=-90;fillColor=none;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="715" y="445" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-35" value="stack B" style="text;whiteSpace=wrap;rotation=-90;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="715" y="570" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-36" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;comic=0;gradientColor=none;" parent="1" vertex="1">
          <mxGeometry x="605" y="540" width="120" height="40" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-72" target="eODdzWfbsgeiVxMC9DDa-48" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="520" y="490.5099999999999" as="sourcePoint" />
            <mxPoint x="605" y="580" as="targetPoint" />
            <Array as="points">
              <mxPoint x="565" y="485" />
              <mxPoint x="565" y="600" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-42" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;callee-saved regs&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#50FA7B;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="605" y="450" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-19" value="regs" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#50FA7B;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="85" y="475" width="45" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-48" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;callee-saved regs&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#ff55ff;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="605" y="580" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-49" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="720" width="120" height="260" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-50" value="&lt;font&gt;process address space&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="240" y="680" width="120" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-51" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="240" y="790" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-52" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="900" width="120" height="40" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-53" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;fontColor=default;comic=0;gradientColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="750" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-54" value="stack A" style="text;whiteSpace=wrap;rotation=-90;fillColor=none;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="350" y="765" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-55" value="stack B" style="text;whiteSpace=wrap;rotation=-90;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="350" y="890" width="55" height="30" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-56" value="" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=#F0F0F0;shadow=0;glass=0;fillStyle=hatch;comic=0;gradientColor=none;" parent="1" vertex="1">
          <mxGeometry x="240" y="860" width="120" height="40" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-58" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-80" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="240" y="900" as="targetPoint" />
            <Array as="points">
              <mxPoint x="200" y="805" />
              <mxPoint x="200" y="900" />
            </Array>
            <mxPoint x="160" y="809" as="sourcePoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-61" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;callee-saved regs&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#50FA7B;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="240" y="770" width="120" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-64" value="&lt;font&gt;&lt;i&gt;(1) save callee-saved registers of current thread&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="80" y="360" width="140" height="60" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-65" value="&lt;font&gt;&lt;i&gt;(2) move to new stack pointer&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="440" y="360" width="140" height="50" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-66" value="&lt;font&gt;&lt;i&gt;(3) restore callee-saved registers of new thread&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=monospace;" parent="1" vertex="1">
          <mxGeometry x="80" y="680" width="140" height="60" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-71" value="core" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#FFFFFF;fillColor=none;align=center;verticalAlign=top;" parent="1" vertex="1">
          <mxGeometry x="440" y="440" width="80" height="60" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-72" value="sp" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#ffffff;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="495" y="475" width="20" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-73" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-72" target="eODdzWfbsgeiVxMC9DDa-72" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-74" value="regs" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#50FA7B;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="445" y="475" width="45" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-79" value="core" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;align=center;verticalAlign=top;" parent="1" vertex="1">
          <mxGeometry x="80" y="760" width="80" height="60" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-80" value="sp" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=default;fillColor=none;" parent="1" vertex="1">
          <mxGeometry x="135" y="795" width="20" height="20" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-81" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="eODdzWfbsgeiVxMC9DDa-80" target="eODdzWfbsgeiVxMC9DDa-80" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="eODdzWfbsgeiVxMC9DDa-82" value="regs" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=monospace;strokeColor=#FF55FF;fillColor=none;fontColor=default;" parent="1" vertex="1">
          <mxGeometry x="85" y="795" width="45" height="20" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>