开发者

Java's or C#'s Threads are based on User-Space Threads or Kernel-Space Threads?

Are Java's and C#'s 开发者_运维知识库Threads based on User-Space Threads or Kernel-Space Threads?


In C#, threads are OS threads, or backed by a thread pool, which is composed of OS threads anyways. An OS thread uses both user and kernel resources.


In Linux, I understand that they are user space threads.

Linux kernel space threads are effectively part of the operating system, and typically run with high privilege so that they can access the address space of any process. Implementing Java or C# threads on Linux using kernel-space threads is unnecessary, and would be highly dangerous. (This assumes that it is technically possible ... which I don't think is the case.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜