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
How you Returning Values From Methods in java ? It's frequent meaningful to have a method return a value to the class which is known as it. This is accomplished through the ret

What are Access Specifiers available in Java? Java has four access specifiers, which are enlisted below: Public: public methods, classes and fields can be accessed by ever

A one page website where a user can input the information including Company Name, Title, Activity, R/S, I also need the user to select the start date, end date, and check poi

Taking in Command Line Arguments In Java, the program can be written to accept command-line-arguments. Example Code:  command-line arguments /*  This

A NEW Dynamic Website I have the subsequent requirement which needs to be designed in 30 days (Max). 1) Construct a website which is a dynamic, means allow me to change conte

How instant messaging works? Write the steps involved in this process? The Instant Messaging services available permit us to manage a list of people (contacts) that we interact

Implement a class  Book  (Book.java). A book will have three instance variables: a  title  (a String, for example: "Big Java" or "The Hitchhiker's Guide to the Galaxy"), an  author

SudCell and Simple Sudoku Implementation We describe, fully, the SudCell class that will represent each of the 81 cells or boxes in a Sudoku puzzle.  Then we will

I want Android App Notes Project Description: Seeking a developer to create a simple note application I don't need all the visualize features. I just want the user to t

Java SDK is not so comfortable with people used to command line interpreter. IDEs contain compilers, editors, debugging facilities, drag and drop methods, etc. This compiler strive