jvm « Development « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Development » jvm 

1. How good is the JVM at parallel processing? When should I create my own Threads and Runnables? Why might threads interfere?    stackoverflow.com

I have a Java program that runs many small simulations. It runs a genetic algorithm, where each fitness function is a simulation using parameters on each chromosome. Each one takes maybe ...

2. Multi java processes by jvm?    stackoverflow.com

If I want to run several processes in the same jvm without synchronizing (I don't care about multi things running at the same time... I only want to avoid re-instanciating the ...

3. Creating multiple thread in JVM to fulfil high user load    stackoverflow.com

I have a C program that will be storing and retrieving alot of data in a Java store. I am putting alot of stress in my C program and multiple threads ...

4. JVMXM008: Error occured while initialising System ClassException in thread "main" Could not create the Java virtual machine    stackoverflow.com

I am unable to execute the java command in a specific folder , throwing error as below

JVMXM008: Error occured while initialising System ClassException in thread "main" Could not create the Java ...

5. Would a multithreaded Java application exploit a multi-core machine very well?    stackoverflow.com

Say I have a dual-core windows laptop and I run a multithreaded application on it. Does the JVM run only on one core or do the JVM and the OS somehow ...

6. Do Linux JVMs actually implement Thread priorities?    stackoverflow.com

Wrote a quick Java proggy to spawn 10 threads with each priority and calculate pi (4*atan(1) method) with BigDecimals 500,000 times each, join on each thread and report the elapsed time ...

7. Why do some JVM/Linux Kernels show each java thread as a process and other not? How can I determine beforehand what the behavior will be?    stackoverflow.com

I have two machines, one running 2.4.18 and one running 2.4.20. Both run Java 1.5 build 13. On one machine (2.4.18), each thread shows up as a separate process ...

8. Distinguish Java threads and OS threads?    stackoverflow.com

In Production system,like Banking application running in Linux environment, How do I distinguish running Java threads and native threads? In Linux there will be Parent process for every child process, and they say ...

9. JVM - Heap and Stack    stackoverflow.com

Whenever a class is loaded, what are stored in the heap and what are stored in the stack ? Also where does the threads reside ?

10. Is it possible to change the current time of a thread or jvm instance in java?    stackoverflow.com

I want to test some class methods that contain logic dependent on the current time it is running. I'd like to set the thread/jvm/system time to a specific future date in ...

11. Lots of ThreadLocalMap entries in memory    stackoverflow.com

Consider a very large Java VM with a great many threads running a web server. Now consider a sample of the output generated by jmap -histo that looks something like this:

  ...

12. JVM signal chaining SIGPIPE    stackoverflow.com

We have a C++ application with an embedded JVM (Sun's). Because we register our own signal handlers, it's recommended we do so before initializing the JVM since it installs its own ...

13. JVM and Java Linux process    stackoverflow.com

This question may be very basic about Java JVM. If I've a Java standalone program and if, for example, 5 processes of this program are running at a particular time ...

14. Tools to monitor java thread execution    stackoverflow.com

I've a java web application running on an Tomcat server(Linux). In the production environment I'm facing some performance issue. At random intervals the jsvc process on which tomcat is running starts ...

15. Deterministic execution of Java Threads, Tool support    stackoverflow.com

I am looking for a tool or api which allows deterministic execution of Java threads for testing purposes. Thus, allowing context switches in java code at certain locations in byte code. ...

16. Sleeping a thread inside an ExecutorService (Java/Clojure)    stackoverflow.com

I have a rather massive number of threads being created inside a clojure program:

(import '(java.util.concurrent Executors)) 
(def *pool*   
  (Executors/newCachedThreadPool))

(defn do-something []
  ; work
  Thread/sleep 200
 ...

17. JNI - problem with threads and jobject    stackoverflow.com

I have called a native program which creates another thread, which attaches itself to the JVM. Now I want to access the methods of the JVM, but it fails. Here is ...

18. How Java multi-threaded program is able to use multiple CPU cores?    stackoverflow.com

Could someone please provide explanation how Java multi-threaded program (e.g. Tomcat servlet container) is able to use all cores of CPU when JVM is only single process on linux? Is there ...

19. How can assigning a variable result in a serious performance drop while the execution order is (nearly) untouched?    stackoverflow.com

When playing around with multithreading, I could observe some unexpected but serious performance issues related to AtomicLong (and classes using it, such as java.util.Random), for which I currently have no explanation. ...

20. JNI - automatically attach all newly spawned threads from process to JVM?    stackoverflow.com

I call a dll from Java using JNI. The DLL calls another thirdparty library which spawns a bunch of threads and sends callbacks to my dll. I want these callbacks to ...

21. A lot of threads in java process    stackoverflow.com

Why Java simple GUI application creates such a lot of threads... enter image description here

22. Java threads monitoring\profiling\measurement    stackoverflow.com

I am familiar with

http://download.oracle.com/javase/6/docs/api/java/lang/management/ThreadMXBean.html
I would like to test\profile\measure how many CPU time did the thread get. I added the following to the my thread constructor:
ManagementFactory.getThreadMXBean().setThreadCpuTimeEnabled(true);
if(!ManagementFactory.getThreadMXBean().isCurrentThreadCpuTimeSupported())
   ...

23. Java JVM profiling, thread status - what does "Monitoring" status mean?    stackoverflow.com

enter image description here hi: I use visualVM connect a multi thread Java application, thread has 4 status, namely running, sleeping, wait, Monitor. What does this Monitoring status mean? What's ...

24. Java thread stack size on 64-bit linux    stackoverflow.com

My goal is to come up with figure of max threads which can run in parallel. I was pointed to many links by Google, where they give simple math by dividing ...

25. Multiple Execution Paths with limited Threads    stackoverflow.com

I have a challenging asynchronous programming task, wonder if anyone did anything like that with Java. Let's assume I'm developing a framework which will be used like this:

  1. Do some custom Java ...

26. JVM + Linux + Intel's Hyperthreading =     stackoverflow.com

I noticed that JVM threads run as processes under Linux for some reasons (correct me if I'm wrong). Furthermore, it is a fact that Intel's Hyperthreading provides additional parallelization only for ...

27. Inspecting Java Processes within the JVM    coderanch.com

Hi, Is it possible to access the internal variables of a JVM, which is executing a Java process. I understand that the JVM treats each process as a separate thread. The solution I would appreciate should allow me a run time inspection rather than using gdb and getting a dump .Thanks in advance

28. Thread with static resources fails in Sun JVM. Why?    coderanch.com

Here is it: Resource declaration: public static Hashtable stateTable = new Hashtable(); public static Vector vtElementOrder = new Vector(); 2 methods to add/remove resource elements private static void addElementHashTable(String ObjectName, ViewPanel viewPanel) { try { stateTable.put(ObjectName, viewPanel); vtElementOrder.addElement(ObjectName); } catch(Exception _ex) { } } private static void removeElementHashTable(String s) { try { for(; stateTable.containsKey(s); stateTable.remove(s)); for(; vtElementOrder.contains(s); vtElementOrder.removeElement(s)); } catch(Exception _ex) ...

29. Multiple JVM, Shared Memory, Single Thread    coderanch.com

I've been asked to research a potentially disasterous situation. We have 25 JVM's processing requests. We jave an executable that is single threaded although is being accessed via JNI by 1 or more of the 25 JVM's. The class that accesses this executable has been modified so that the method is synchronized as to only allow a single request at a ...

30. Monitor Threads running in JVM    coderanch.com

Hi, We are running Threads in our application. The Thread status are being are stored in a database. But for some issue fix, people are changing the thread staus in the database and running the threads again. It creats problem in our application. The application is running in UNIX. What we would like to know is, is there any mechanism to ...

31. Will thread priorities within JVM affect JVM process priorities?    coderanch.com

I got a doubt on thread priorities, Assume that I have only two JVMs(JVM-A and JVM-B) running in a single physical machine. Since these two JVMs are the only process to the OS, lets assume that the processor cycles is 50:50 for each JVMs, meaning the share the CPU cycles equally. Suppose I have 5 threads in each JVM and JVM-A's ...

32. JVM & Java Threads Scheduling    coderanch.com

Hi everyone, I have read a article that when it comes to multi processor systems , we can't get the advantage of running multiple threads simultaneously since every threads are in a single JVM process. Indeed when I go further, I got to know that some JVM implementations are built to map Java thread to OS level native threads. My question ...

33. Question about JVM Scheduler behaviour & a thread    forums.oracle.com

Thanks for the reply. Ok so supposing the Scheduler butts in before the Thread.sleep(), does that mean the thread goes back into the runnable pool? i.e. the Thread.sleep() won't be invoked? Is run() continued on (at the point the Scheduler interrupted) when the thread becomes a thread of execution again? Hope im making sense. Best regards

35. JVm and Linux Threads    forums.oracle.com

Greetings all im sorry if som1 finds my question weird. my leacturer gave me this question in an exam and i couldnt solve it. i need to know the difference between linux threads and JVm threads. i've read couple of articles on JVM on sun site and a few on linux pthreads but i am unable to find somthing that could ...

36. IS a thread scheduler part of JVM or OS ?    forums.oracle.com

Hi Folks, Just curious if the thread scheduler is a part of the JVM or OS, or either or both ? I tried few thread pages in JLS,but couldnot locate the exact sentence describing this. However some other resources have given me contradicting information. For example, [Reference1|http://www.deitel.com/articles/java_tutorials/20051126/JavaMultithreading_Tutorial_Part3.html] states that it is a part of the OS,whereas [Reference2|http://book.javanb.com/java-threads-3rd/jthreads3-CHP-9-SECT-1.html] states that it is ...

37. Extract thread context from JVM    forums.oracle.com

38. Thread Scheduler in JVM    forums.oracle.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.