
(This was back when desktops/laptops were uniprocessor systems, with a single-core CPU in their 1 physical socket, and SMP machines mostly only existed as multi-socket.) There's still a Wiki article which explains the origin and meaning. What is the difference between concurrent programming and parallel programming?īack in the early days of Java at least, user-level threads were called "green threads", to implement Java threading on OSes that didn't support native threading.What is difference between User space and Kernel space?.What is the difference between a thread and a fiber?.Understanding java's native threads and the jvm.FYI: In Java, user-level threads – the multithreading you do in your programs – are mapped to kernel-level threads by the JVM, i.e. I think, this is what the statement refers to. If one of those paths blocks, recall that user-level threads need to yield the execution, then the executing (kernel-level) thread blocks, which causes all other assigned paths to also be effectively blocked. In the latter mapping, you let multiple concurrent execution paths be executed by a single thread "as we know it". You could also map many user-level to one kernel-level thread. You could map each user-level to a separate kernel-level thread. User-level threads are mapped to kernel-level threads.Īs user-level threads need to be mapped to kernel-level threads, you need to choose a suiteable mapping. switching from one user-level to another user-level thread is done explicitly by the program. In contrast to kernel-level threads, they need to "yield the execution", i.e. They are also called fibers or coroutines in some contexts. User-level threads: Threads that are managed by the program itself.That's what probably most of us think of threads. They are what is executed on the processor. Kernel-level threads: Threads that are managed by the operating system, including scheduling.There is a difference between kernel-level and user-level threads. These are resouces where I found the statements: Moreover, I cannot find this statement in books, like Galvin's or maybe in William Stalling's COA book where threads have been discussed. Like the example given in Galvin's Operating Systems book, I wouldn't want the thread which is handling my typing to be blocked if the spell checking thread cannot connect to some online dictionary, perhaps.Įither I am understanding this concept wrong, or all these websites have just copied some old thread differences over the years. I find it very unconvincing, since all modern OS have thread control blocks with a thread ID, even if it is valid only within the memory space of the parent process. The reason given is that since the OS doesn't differentiate between the various threads of a given parent process, it blocks all of them at once.

What would be the sense of concurrency if a scheduler cannot switch between a blocked thread and a ready/runnable thread. If a user level thread gets blocked, all of its peer threads also get If a process gets blocked, remaining processes can continue execution.


I was reading about differences between threads and processes, and literally everywhere online, one difference is commonly written without much explanation:
