views:

181

answers:

1

I understood the mechanism of user threads mapping on kernel threads at thread level: now I'd like to understand the mechanism at process level.

  • An user thread can access the resources of his "father" process: when the user thread is mapped on a kernel thread, what is of the user process resources? And more:
  • We're talking of "kernel threads": threads of the same process share the resources of that process. Kernel threads have to work on different resources (the specific resources of the user process corrensponding to the user thread they're mapping). So each kernel thread belongs to a different "kernel process", that inherit the resources of the user process?

Sorry for my bad english, I hope you can understand.

A: 

From what I understand,

A thread is created at Kernel level, then for user-mode, it does a mode switch and the thread runs in user-mode. Now it can access it's resources in user-mode.

When a thread is running in kernel-mode, it can still access it's resources in user-mode.

You should check out these video's that explain how a thread is created and what the difference between user-mode and kernel-mode threads.

http://academicearth.org/courses/operating-systems-and-system-programming

Then there's also 'threads' that just run in kernel mode and cannot be accessed by a user-mode process.

I hope this helps.

Tony