Resolved Question
what is a green thread?
 
Details:
  asked by: mrjustice  on: Sep 25, 2009  
 Best Answer ! ! !
tkdg3 's Answer  ( this answer is maked as best answer of this question at: Oct 3, 2009 )


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.
4 comments  answered on: Oct 1, 2009 
Other Answer (3)
satya has given best answer.
  hippo93   answered on£ºSep 26, 2009  0 comments

Can I know What is daemon thread?

  georgetkl   answered on£ºSep 28, 2009  0 comments

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
  pcygigasu   answered on£ºSep 30, 2009  0 comments

Hot Questions

Contact Us - IT-Interview