From 4e53dc0e6b4e2928dddac12dfdd990dbfc3befa5 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 18 Dec 2024 21:06:55 +0100 Subject: xpost: reset colors to default in figures to allow easy light/dark generation --- content/2023-01-14-xpost-matcha-threads/index.md | 4 +- .../init-stack.drawio | 23 +++-- .../2023-01-14-xpost-matcha-threads/init-stack.svg | 2 +- .../os-vs-user-threads.drawio | 8 +- .../os-vs-user-threads.svg | 2 +- .../2023-01-14-xpost-matcha-threads/yield.drawio | 108 ++++++++++----------- content/2023-01-14-xpost-matcha-threads/yield.svg | 2 +- 7 files changed, 79 insertions(+), 70 deletions(-) (limited to 'content/2023-01-14-xpost-matcha-threads') diff --git a/content/2023-01-14-xpost-matcha-threads/index.md b/content/2023-01-14-xpost-matcha-threads/index.md index a916145..bb90dfd 100644 --- a/content/2023-01-14-xpost-matcha-threads/index.md +++ b/content/2023-01-14-xpost-matcha-threads/index.md @@ -64,7 +64,7 @@ Implementations for different ISAs are available here: - [riscv64][yield-rv64]
- + Since a thread returns into the last stack-frame of the new thread after switching the stack pointers in the yield function, special care must be taken @@ -87,7 +87,7 @@ The figure below depicts *os-level* threading (left) vs *user-level* threading (right). The main difference is that in the case of user-level threading, the operating -system (os) does not now anything about the user threads. In the concrete +system (os) does not know anything about the user threads. In the concrete example, only a **single** user thread can run at any given time, whereas in the case of os-level threading, all threads can run truly parallel. diff --git a/content/2023-01-14-xpost-matcha-threads/init-stack.drawio b/content/2023-01-14-xpost-matcha-threads/init-stack.drawio index eb0859f..d52a249 100644 --- a/content/2023-01-14-xpost-matcha-threads/init-stack.drawio +++ b/content/2023-01-14-xpost-matcha-threads/init-stack.drawio @@ -1,24 +1,33 @@ - + - - + + - + - + - + - + + + + + + + + + + diff --git a/content/2023-01-14-xpost-matcha-threads/init-stack.svg b/content/2023-01-14-xpost-matcha-threads/init-stack.svg index 2abc191..dbc153c 100644 --- a/content/2023-01-14-xpost-matcha-threads/init-stack.svg +++ b/content/2023-01-14-xpost-matcha-threads/init-stack.svg @@ -1,3 +1,3 @@ -
initial
stack layout
initial...
initial values for callee-saved registers
initial values for c...
return frame
(thread_create)
return frame...
thread_create args
thread_create args
Text is not SVG - cannot display
\ No newline at end of file +
initial
stack layout
initial...
initial values for callee-saved registers
initial values for c...
return frame
(thread_create)
return frame...
thread_create args
thread_create args
grows downwards
grows downwards
Text is not SVG - cannot display
\ No newline at end of file diff --git a/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.drawio b/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.drawio index d927873..18659ee 100644 --- a/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.drawio +++ b/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.drawio @@ -1,6 +1,6 @@ - + - + @@ -25,7 +25,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.svg b/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.svg index 4ce2798..b9a8c65 100644 --- a/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.svg +++ b/content/2023-01-14-xpost-matcha-threads/os-vs-user-threads.svg @@ -1,3 +1,3 @@ -
process address space
process address space
stack A
stack A
stack B
stack B
stack C
stack C
process address space
process address space
stack S
stack S
stack A
stack A
stack C
stack C
user thread
user thread
stack B
stack B
thread
S
thread...
OS thread
OS thread
user thread
user thread
user thread
user thread
yield
yield
yield
yield
yield
yield
thread
A
thread...
thread
B
thread...
thread
C
thread...
thread
A
thread...
OS thread
OS thread
thread
B
thread...
OS thread
OS thread
thread
C
thread...
OS thread
OS thread
sp
sp
sp
sp
sp
sp
sp
sp
sp when yielding to A
sp when yielding to A
Text is not SVG - cannot display
\ No newline at end of file +
process address space
process address space
stack A
stack A
stack B
stack B
stack C
stack C
process address space
process address space
stack S
stack S
stack A
stack A
stack C
stack C
user thread
user thread
stack B
stack B
thread
S
thread...
OS thread
OS thread
user thread
user thread
user thread
user thread
yield
yield
yield
yield
yield
yield
thread
A
thread...
thread
B
thread...
thread
C
thread...
thread
A
thread...
OS thread
OS thread
thread
B
thread...
OS thread
OS thread
thread
C
thread...
OS thread
OS thread
sp
sp
sp
sp
sp
sp
sp
sp
sp when yielding to A
sp when yielding to A
Text is not SVG - cannot display
\ No newline at end of file diff --git a/content/2023-01-14-xpost-matcha-threads/yield.drawio b/content/2023-01-14-xpost-matcha-threads/yield.drawio index 164a1f1..1a254d1 100644 --- a/content/2023-01-14-xpost-matcha-threads/yield.drawio +++ b/content/2023-01-14-xpost-matcha-threads/yield.drawio @@ -1,37 +1,37 @@ - + - + - + - + - - + + - - + + - + - + - + - + - + - + @@ -39,43 +39,43 @@ - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + @@ -85,40 +85,40 @@ - + - + - + - + - + - - + + - + - + - + - + - + - + @@ -128,40 +128,40 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/content/2023-01-14-xpost-matcha-threads/yield.svg b/content/2023-01-14-xpost-matcha-threads/yield.svg index 508a163..67c2d8b 100644 --- a/content/2023-01-14-xpost-matcha-threads/yield.svg +++ b/content/2023-01-14-xpost-matcha-threads/yield.svg @@ -1,3 +1,3 @@ -
process address space
process address space
stack A
stack A
stack B
stack B
core
core
sp
sp
callee-saved regs
callee-saved regs
callee-saved regs
callee-saved regs
process address space
process address space
stack A
stack A
stack B
stack B
callee-saved regs
callee-saved regs
regs
regs
callee-saved regs
callee-saved regs
process address space
process address space
stack A
stack A
stack B
stack B
callee-saved regs
callee-saved regs
(1) save callee-saved registers of current thread
(1) save callee-saved r...
(2) move to new stack pointer
(2) move to new stack p...
(3) restore callee-saved registers of new thread
(3) restore callee-save...
core
core
sp
sp
regs
regs
core
core
sp
sp
regs
regs
Text is not SVG - cannot display
\ No newline at end of file +
process address space
process address space
stack A
stack A
stack B
stack B
core
core
sp
sp
callee-saved regs
callee-saved regs
callee-saved regs
callee-saved regs
process address space
process address space
stack A
stack A
stack B
stack B
callee-saved regs
callee-saved regs
regs
regs
callee-saved regs
callee-saved regs
process address space
process address space
stack A
stack A
stack B
stack B
callee-saved regs
callee-saved regs
(1) save callee-saved registers of current thread
(1) save callee-saved r...
(2) move to new stack pointer
(2) move to new stack p...
(3) restore callee-saved registers of new thread
(3) restore callee-save...
core
core
sp
sp
regs
regs
core
core
sp
sp
regs
regs
Text is not SVG - cannot display
\ No newline at end of file -- cgit v1.2.3