You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current design for this is a combination of a synchronous sendrecv() method that transfers execution to another thread temporarily, and an asychronous semaphore system.
The text was updated successfully, but these errors were encountered:
sendrecv() logically takes a thread id to send to and some registers.
It sends the registers directly to the given thread and immediately
switches stacks to that thread. Once that is done, the sending thread
becomes a receiving thread and doesn't wake up until it receives a
message back.
The send can only succeed if the thread provided is currently blocked
in another sendrecv() call. In order to bootstrap this, a thread can
'send' a message to the kernel via thread id 0, which simply puts that
thread into receiving mode without sending anything (it becomes a
daemon).
If all the remaining threads are in receiving mode, they are assumed to
all be daemons and the system shuts down. This is symmetric to the
bootstrapping behavior before - otherwise it would be impossible to shut
the system down after any thread called sendrecv() in daemon mode.
First PR of #77
Our current design for this is a combination of a synchronous sendrecv() method that transfers execution to another thread temporarily, and an asychronous semaphore system.
The text was updated successfully, but these errors were encountered: