Define high-level thread states?, JAVA Programming

Assignment Help:

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.

 


Related Discussions:- Define high-level thread states?

Compile, If any of the above conditions does not met, then the program will...

If any of the above conditions does not met, then the program will generate compilation errors. Today Rahul has written his first program "Hello World", but he is not sure about th

Program with eclipse and enumeration , Problem Definition A new Met Of...

Problem Definition A new Met Office web application will allow users of their web site to view rainfall statistics for months and years in the UK. The application allows the m

For what purposes ftp is used in networks, For what purposes FTP is used in...

For what purposes FTP is used in networks? FTP is known as file transfer protocol it is basically used to download or upload files / data to a remote computer.

Simple sudoku implementation, SudCell and Simple Sudoku Implementation ...

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

Polymoethism, write a java program to test for class Person Student facult...

write a java program to test for class Person Student faculty Employee

Explanation of EM algorithm, try { pa="weblog"; pa...

try { pa="weblog"; pas="weblog"; Connection c; Statement st;

Develop a simple polling web application , Develop a simple polling (voting...

Develop a simple polling (voting) web application according to the following specifications: 1. Initially a page should be presented to the user where he can enter his/her

What is actionform, An ActionForm is a JavaBean that extends org.apache.str...

An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm.  ActionForm handles the session state for web application and the ActionForm object is automatically p

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd