2
votes

I understand that user level threads are implemented in user space and kernel level threads in kernel space. I have also read that user level threads are mapped onto kernel level threads to actually run the user level threads.

  1. What exactly is meant by "implemented"? Does this mean the thread control blocks are defined in user and kernel space respectively?

  2. What happens when a system call is made? Which kernel thread (or user thread IDK) does this system call run on? And does each kernel level stack have its own stack?

  3. I have an understanding that threads are just parts of a process. When we deal with kernel threads, what is the corresponding process here? And what are the kernel processes and can you give examples?

I have referred to other answers as well, but haven't received satisfaction.

1

1 Answers

2
votes

It depends on the implementation of the OS.

But usually, like in Linux, the system call is executed on the thread that called it. And each thread has a user stack and a kernel stack.

See How does a system call work and How is the system call in Linux implemented? for more details. And I hope this link can clear up your question about "kernel threads".