aboutsummaryrefslogtreecommitdiff
path: root/TCB.txt
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-01-06 17:41:38 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-01-06 17:41:38 +0200
commit513a8d20beeacb3a7fc2c3c140d014f7fb25cd6f (patch)
treea4d2cc6cc0bd0990c282d6163767fbfaa12d0718 /TCB.txt
parent6f052e236715846b1a14f9fe59f89346efb809e6 (diff)
downloadkmi-513a8d20beeacb3a7fc2c3c140d014f7fb25cd6f.tar.gz
kmi-513a8d20beeacb3a7fc2c3c140d014f7fb25cd6f.zip
Jump back to kernelspace tested
+ Added automated categories to debugging, bug/info/warn/error etc. Now I should just try to use them here and there :D
Diffstat (limited to 'TCB.txt')
-rw-r--r--TCB.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/TCB.txt b/TCB.txt
new file mode 100644
index 0000000..4f262b4
--- /dev/null
+++ b/TCB.txt
@@ -0,0 +1,16 @@
+Alright, so my general idea of creating/killing threads is as follows:
+
+When a new thread is spawned, it happens through fork, so the new thread gets a
+new thread ID but keeps the process ID of the parent process. The new thread is
+added to a doubly linked list of thread IDs with the same common process ID.
+When a thread is promoted to a process, the process ID becomes that thread ID
+(helps with finding threads and corresponding process IDs). Should check that no
+other process is using that ID, but it should be exeedingly rare if not
+impossible. (can't think of how you would launch 4B threads on one machine but I
+guess that's not impossible?)
+
+All threads share a common (struct vm_branch), and only when a thread is
+elevated to a process is a new one allocated. Only when the last thread in a
+process is released is the memory released. Will still need to figure out
+exactly how device memory should be freed, since it's handled globally instead
+of per thread atm.