Based on the text I quoted above, when the state of a thread is waiting, blocked or sleeping, is the thread eligible to run?
Ankitt Gupta
Ranch Hand
Joined: Feb 19, 2009
Posts: 101
posted
0
Paolo Dina wrote:Based on the text I quoted above, when the state of a thread is waiting, blocked or sleeping, is the thread eligible to run?
In the waiting state the thread is alive and after when the thread gets it's opportunity it again goes back to the runnable state.It doesn't mean that it be instantly be running.It schedule depends upon the scheduler.
The same is true for sleeping state.When the sleep time is up it again goes back to runnable state
Senthil Kumaran
Ranch Hand
Joined: Aug 24, 2008
Posts: 32
posted
0
its a silly doubt ya, read once more the thread concepts given in K&B , if you cant understand then, post exact doubt.
Priyam Srivastava
Ranch Hand
Joined: Oct 29, 2006
Posts: 169
posted
0
Senthil Kumaran wrote:its a silly doubt ya, read once more the thread concepts given in K&B , if you cant understand then, post exact doubt.
nothing is silly... it only lies in the eyes of the perceiver.
"History would be kind to me, for I intend to write it."
Senthil Kumaran
Ranch Hand
Joined: Aug 24, 2008
Posts: 32
posted
0
i expected this sir, anyway i apologise sir,
Ruben Soto
Ranch Hand
Joined: Dec 16, 2008
Posts: 1032
posted
0
Think about this in simple terms. In order for a thread to be eligible to run it must be in the runnable state. If it is in any other state it is not eligible to run.
All code in my posts, unless a source is explicitly mentioned, is my own.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.