Define high-level thread states?, JAVA Programming

The state chart diagram given below defines the thread states.




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
What is "My Personal Agent"? My personal agent is a computer programme which work automatically and have voice interface.

Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design. ? JavaBeans components for managing application state and behavior. ? Eve

Explain Parentheses in Java ? Sometimes the default sequence of evaluation isn't what you want. For example, the formula to change a Fahrenheit temperature to a Celsius tempera

What is Constraints explain with example? One of the purposes to use constructors and setter techniques rather than directly accessing fields is to enforce constraints. For exa

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

In the lectures, we have written programs for bond pricing in discrete time. We have also talked about the theory for bond pricing and yields in continuous time. In this exercise,

There are two significant bean lifecycle methods. The first one is setup which is called when the bean is loaded on to the container. The second method is the teardown method which

Define network organization? What are important features of network organization? Network Organization : Network organization is an inter firm organization in which is charac

Question 1 What are the different types of data types in java? Question 2 Write a note on Operator Precedence Question 3 Write a note on Random access files