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?

Javascript, Write a JavaScript program to prompt the user for the radius of...

Write a JavaScript program to prompt the user for the radius of a sphere and call function sphereVolume to calculate and display the volume of the sphere in the status bar.

What is dynaactionform, A specialized subclass of ActionForm that permits t...

A specialized subclass of ActionForm that permits the creation of form beans with dynamic sets of properties (configured in configuration file), without requiring the developer to

Describe general approaches to solve statelessness problem, Problem : (...

Problem : (a) One problem encountered when designing web applications is that HTTP is a "stateless" protocol. Describe two general approaches to solve the statelessness probl

Define when to use hashmap and when to use treemap, How do you decide when ...

How do you decide when to use HashMap and when to use TreeMap? When we want to perform deletion, insertion and locate elements in a Map then HashMap is used. Whereas TreeMa

Explain overriding methods and the solution, Explain Overriding Methods: Th...

Explain Overriding Methods: The Solution The object oriented solution to this problem is to describe a new class, call it SlowCar, that inherits from Car and imposes the additi

Explain the execute phase of java program development, Explain the Execute ...

Explain the Execute phase of Java Program Development Finally in phase computer, under the control of its CPU, interprets program one bytecode at a time. Hence performing

Are constructors inherited, Are constructors inherited ? Can a subclass ca...

Are constructors inherited ? Can a subclass call the parent class constructor and When?

Important nodes, there are N nodes in a graph, the graph isuni directional ...

there are N nodes in a graph, the graph isuni directional with M edges of these M nodes in a graph, there are K nodes which are important nodes. given initial position I within thi

Describe remote objects?, Describe Remote Objects A Remote Object is o...

Describe Remote Objects A Remote Object is one whose functions can be called from another JVM. A remote object class must execute the Remote interface. A RMI Server is an appl

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