Closed toor closed 6 years ago
Hi @too-r thanks for the contribution!
The Vec
you see in the process creation is the kernel stack. The kernel stack is dynamically allocated for each process (and eventually each thread) to support usermode execution.
The name was misleading at first. Sorry to lead you astray! I recently changed the field from Process.stack
to Process.kstack
to make that distinction more clear.
I see, thank you for the clarification.
It seems to me that you are using a Vec as the process stack in the scheduler. Surely this is bad practice, as accessing the heap to allocate Vec's is a relatively slow process compared to stack allocation. Would it be possible to utilise the stack allocator directly rather than using vectors for stacks?