Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Threads and Java Interpreter state

Posted on 1997-09-25
1
Medium Priority
?
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
rembo earned 450 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

609 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