开发者

What is the relation between kernel threading and user threading?

I am learning the Computer OS, I am confused about the real relationship between kernel level threads and the user level thread, The staff just said they开发者_开发问答 are mapped. I just wonder how they mapped, and what's that for? Thank you.


Every code at some point executes at a kernel level thread. A user level thread can be thought of as an abstraction, they work as if they are kernel threads but it is up to the language or platform implementing those user threads to define how they're gonna work.

They might be mapped on a 1:1 basis to a kernel thread, but there might be a number of user threads sharing the same kernel thread (and in this case the platform/language that provides the user threads that takes care of switching between different user threads during the processor time given to the single kernel thread running them)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜