2

This might be a really stupid question, but I don't really find answers online (Not that I can understand at least), I only found some benchmarks results like these with specific benchmark software.

Let me give a bit of context: I am currently developing a java multithread program on a Ubuntu machine, I have a Windows 10 machine in the Office for test purposes, and the program is supposed to run in a Windows 7 machine connected to a production line.

I am not interested in Ubuntu performance in this case, as the customer wants to use it on a Windows machine. When I test the software on the Windows 10 machine, it just "feels like" it runs faster than on the Windows 7 PC, I must say that I don't have total access to the Windows 7 machine, so I can't take the time to test it, also, as far as I know, the machines have the exact same hardware components and run the same Java version (Always the last update of Java 8).

Does this make sense? Can updating windows from Windows 7 to Windows 10 make a Java program run better? (by optimizing threads maybe?). This questions is based on pure speculation and no actual data at all, so I am sorry if it makes no sense.

Thank you all for your patience.

5
  • Are windows 10 and windows 7 machines have equal hardware? Commented Sep 13, 2016 at 14:26
  • 4
    When it comes to performance, measure. Don't go for feelings. Commented Sep 13, 2016 at 14:27
  • 2
    Sorry, but this is way too broad. And you know, normally I am not shy putting down answers for such questions; but well: in your case, the answers can be yes, no, maybe, sure, never. Thing is: nobody can tell that. The only thing that really makes sense: measure. Create a well-defined test setup, and run repeated tests; and see what you get. Anything else is pure speculation and of no real value. Commented Sep 13, 2016 at 14:28
  • I know I can't rely on "feelings", I am not asking if that's what is happening, I only ask if it CAN happen. Commented Sep 13, 2016 at 14:29
  • @AntonMalyshev Yes, that's what the customer told us. Same hardware in both machines. Commented Sep 13, 2016 at 14:30

2 Answers 2

1

Yes, the order of thread execution is not guaranteed by the JVM which can be influenced by the other processes handled by an OS.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm sorry but I don't see how this addresses the question. What does it have to do with order of execution?
I actually think this is the best answer, simple and direct, I just wanted to know if different OS can influence performance in multithreaded Java applications/programs, and he answered that question. I DID NOT ask if MY SOFTWARE specifically was affected, I did not even provide code or actual data (Because I am not allowed), I just wanted to know if it is possible.
1

YES OS will have effect on threads performance as the Java threads execute on the threads of the JVM and JVM indeed will be allocated threads from OS on to which it runs, As JVM can not interact with the processor's thread directly. So the multi-threaded program's performance will be effected by underlying OS which allocates threads to the respective JVM.

1 Comment

Java threads are the JVM's threads. They execute using the thread primitives of the OS. Also, the processor doesn't have threads. Threads run on processors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.