Solved

Threads and Java Interpreter state

Posted on 1997-09-25
1
175 Views
Last Modified: 2011-10-03
Hello,
I have a doubt regarding threads. Suppose a Java program runs two threads. One of them gets blocked, e.g. awaiting a TCP packet, while the other one goes on running. After a while the Java Interpreter is removed from the CPU. Which is then the state of the Java Interpreter, since it has a blocked thread and a runable one. Is the interpreter blocked or runable. Please, a detailed explanation is required.
Thanks,  
0
Comment
Question by:jjescri
1 Comment
 
LVL 4

Accepted Solution

by:
rembo earned 150 total points
ID: 1227497


The process is runnable.  The way that threads work in
this instance is that the thread is not its own process,
therefore according to the operating system, the virtual
machine, which is its own process is not blocked.  

It is up to the threaded process to manage its own state
of affairs.  This means that part of the saved state of
the process when the VM is preempted by the operating
system, is the perceived state of its thread.

-Tony


0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now