Woke up late today.
The kernel likely does not need a set of threads, but more of a list. This is
made for embedded systems and having a hash set for a few elements might just
be overkill. I could however have a
Set which is backed by an array or
Basically when a call into the kernel is made, for access checks it will get the current thread along with process and then use that to determine if a process is allowed to do something.
However, for the
HashSet I can just use that directly. My implementation
however would be efficient for low memory systems and such.
Then the event queue can be given to processes instead of the actual kernel. Then processes can just read their own event queue and such.
This also means I need a secure event manager along with the console view. Only the process which owns the event manager/console should be able to access the queue details and such. Otherwise, other processes can just happily add events to other processes including the kernel.
Going to need a more advanced permission checker also. It will need to check if something is permitted by a process and then potentially ask the user using the user interface if it should be allowed to do so.
I will need to be careful when it comes to permissions so that there are no exploits. I would also need a way to have extra permission managers, for example with drivers (device IO) and such.
Did some busy real life things, rather drained of physical energy.