summaryrefslogtreecommitdiff
path: root/documentation/kernel/applications.txt
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/kernel/applications.txt')
-rw-r--r--documentation/kernel/applications.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/documentation/kernel/applications.txt b/documentation/kernel/applications.txt
new file mode 100644
index 0000000..6890c96
--- /dev/null
+++ b/documentation/kernel/applications.txt
@@ -0,0 +1,41 @@
+globally there are:
+ an id-list of processes
+ an id-list of threads
+ a queue of paused threads
+ a single running thread
+
+a paused thread is a thread that can run, but isn't.
+a thread that is not running and is not paused is in a blocking syscall.
+
+each process has:
+ a process id
+ a list of threads
+ a list of open file streams
+ a list of open socket stream ends
+ a list of running socket listeners
+ a list of environment variables (pairs of strings)
+
+a thread has:
+ an owning process
+ optionally:
+ a stream end it is waiting to read from
+ a socket listener it is waiting to accept a connection from
+ a socket listener it is waiting to connect to
+ if not running:
+ saved cpu state
+
+a socket has:
+ two queues
+
+an open socket stream end has:
+ a list of threads waiting to read from it
+ the socket
+ its input queue
+ its output queue
+ if the other side is open:
+ the other process
+ the other stream end
+
+a running socket listener has:
+ a list of threads waiting to accept a connection from it
+ a list of threads waiting to connect to it