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 to catch multiple exceptions explain with example? If multiple blocks match the exception type, the first block in which matches the kinds of the exception catches it. pub

Business Objects represent the data client. They are the objects that need access to the datasource to obtain and store data. Data Access Objects abstract the relying data access i


Kik Messenger is a plan mobile messenger like Skype. It's available on each major smart phone for Android and Iphone. Here is the entire process: Could be able to add multipl

Your first task is to implement the Movie class to store all the relevant information on a single DVD Movie, including its catalog number, title, year of release, rating, rental pe

It could be something simple for a good js coder. But there may be a custom design and I can give more feedback for the person who is interested in working with me. Check Invisi

iPhone /Android app implemented on a website Project Description: I need someone to implement an iPhone/Android app onto a website page, So users can be able to use the Ap

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

Explain operator precedence in java ? It's probable to combine multiple arithmetic expressions in one statement. For example the subsequent line adds the numbers one by five:

Describe Overriding Methods ? Assume that one day you've just finished your Car class. It's been plugged into your traffic simulation that is chugging along merrily simulating