Green threads

Green threads is the practice of using one instance of an underlying thread representation (such as an OS thread) to represent several threads of a higher abstraction layer (such as java.lang.Threads). While this is simple and fast for uncomplicated applications, there are plenty of problems with this approach. The most serious one has to do with handling threads and the acquisition of locks. In native code, where no control can be exerted over the threads, or when threads are waiting for I/O, deadlocks can occur. If the need arises to put a green thread to sleep, usually the entire OS thread below it has to go to sleep as well, trapping all other green threads in that particular OS thread.

See also NxM threads.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.141.219