Define high-level thread states?, JAVA Programming

The state chart diagram given below defines the thread states.

372_Untitled.png

 

 

1.      Runnable - waiting for its turn to be picked for performing by the thread scheduler based on thread priorities.

2.   Running: The processor is actively running the thread code. It performs until it becomes blocked, or voluntarily makes up its turn with that static function Thread.yield(). Because of context switching overhead, yield() could not be used very commonly.

3.   Waiting: A thread is in a blocked state while it waits for some external programming such as file I/O to complete.

4.   Sleeping:   Java   threads   are   forcibly   put   to   suspended (sleep)   with   this overloaded   method: Thread.sleep(milliseconds, nanoseconds), Thread.sleep(milliseconds);

5.   Blocked on I/O: Will go to runnable after I/O condition like reading bytes of data etc modifies.

6.   Blocked on synchronization: Will go to Runnable when a lock is acquired.

7.   Dead: The thread is completed working.

 

Posted Date: 7/25/2012 3:04:51 AM | Location : United States







Related Discussions:- Define high-level thread states?, Assignment Help, Ask Question on Define high-level thread states?, Get Answer, Expert's Help, Define high-level thread states? Discussions

Write discussion on Define high-level thread states?
Your posts are moderated
Related Questions
Object diagrams define instances instead of classes. They are useful for illustrating some complicated objects in detail about their recursive relationships.     When

Your task is to design a scheduler for the Sheridan Rail Corporation which keeps track of all daily scheduled trips for the railway.  Users can add new trips as well as perform sea

Your FaceBooklet application will use the classes you wrote for Program 3. Start by creating a copy of your Program 3 project with a new name (say, "Program4"). Note that you ca

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing tha

We need an OpenGL - based visualisation of an OBJ-File that was created out of Maya3D. (important: we have to use OpenGL with Java - JOGL) In other words: we have an OBJ-file (a

How to Wrapping Your Own Packages in java? Java does not limit you to using just the system supplied packages. You can write your own as well. You write packages just such as

i don''t need any code i need analysis and design only -i need 4 use cases - description - activity diagram -sequence diagram -class diagram - data base diagram

JNLP/ Java Application - GUI and Backend Projects Project Description: I am looking for assist in making changes to a complex java application. System launches from web pa

What 'System.out.println()' signifies? 'System' is a predefined class. System class gives access to the system. 'out' is the output stream. 'println' is printin

For this assignment, you will simulate a file system. You will be neither creating files nor reading or writing disk files. Rather, you will have a simulation of a file system that