|
Multithreading: green thread and native thread |
|
|
|
|
Written by Sleepy Egg
|
|
Thursday, 23 June 2005 |
|
Native thread uses OS multi-threaded processes; kernal schedul and manage native threads. Green thread emulate multi-threaded enviromnent in user space, not kernal space. Native thread takes up one entry in process table. It may look like a process, but actually a native thread. Green thread emulate multi-threaded environment using one native process thread. It only can utilize one CPU when multi-CPUs is avalible. It has no control over how kernal is going to schedule and manage this particular native thread. All green threads behave the same in different OS in a same JVM. The implementation of green thread vary from one JVM to another.
|