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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With