Does each thread have its own stack? Does each thread have its own stack? multithreading multithreading

Does each thread have its own stack?


Yes threads have their own stacks and their own kernel stacks (e.g. linux).

When a thread makes a system call, you trap into kernel mode (from user mode), you pass the arguments to the kernel, the arguments are checked, the kernel does w/e it needs to do (in the kernel stack), returns the final value back to the thread and you go back to user mode.