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?

What is a portal?, A portal is a service or a Web site that gives broad ran...

A portal is a service or a Web site that gives broad range of services and resources like e-mail, forums, search engines, weather information, news, on-line shopping, stock quotes.

Explain drawing rectangles in java, Explain Drawing Rectangles in java ? ...

Explain Drawing Rectangles in java ? Drawing rectangles is easy. Begin with a Graphics object g and call its drawRect() method: public void drawRect(int x, int y, int width, i

What do you understand by instantiating an object, Question: (a) To be ...

Question: (a) To be considered object-oriented(OO), a language should support abstraction, encapsulation, inheritance and polymorphism. Explain briefly each of the terms in

MATLAB, Requested figure handle in use by another object, how do i fix this...

Requested figure handle in use by another object, how do i fix this?

What is resuscitation trolley explain their features, What is Resuscitation...

What is Resuscitation Trolley explain their features? A proper resuscitation kit is mandatory for the ICU. In addition to trolleys that can be moved around the ICU there should

What is jdbc exactly, What is JDBC exactly? Describe the steps required to ...

What is JDBC exactly? Describe the steps required to execute a SQL query using JDBC.

Explain data updates issues in data management, Explain Data Updates issues...

Explain Data Updates issues in data management? DATA UPDATES: Old titles must be removed regularly Data changes every time Prices change Transportation / shipping cost change

Simple Program in Java, Write a programme to create a webpage that prints t...

Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa

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