What is a green thread?

Showing Answers 1 - 4 of 4 Answers

Satya

  • Oct 21st, 2005
 

Native threads can switch between threads pre-emptively, switching control from a running thread to a non-running thread at any time. Green threads only switch when control is explicitly given up by a thread (Thread.yield(), Object.wait(), etc.) or a thread performs a blocking operation (read(), etc.). On multi-CPU machines, native threads can run more than one thread simultaneously by assigning different threads to different CPUs. Green threads run on only one CPU. Native threads create the appearance that many Java processes are running: each thread takes up its own entry in the process table. One clue that these are all threads of the same process is that the memory size is identical for all the threads - they are all using the same memory. Unfortunately, this behavior limits the scalability of Java on Linux. The process table is not infinitely large, and processes can only create a limited number of threads before running out of system resources or hitting configured limits.

Niraj

  • Nov 19th, 2005
 

Can I know What is daemon thread?

  Was this answer useful?  Yes

haifeng

  • Dec 31st, 2005
 

Daemon thread is a kind of threads: normally it will run forever, but when all other non-daemon threads are dead, daemon thread will be killed by JVM

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions