Concurrency in Java or some similar languages is achieved through threads or task level parallelism. But under the hood does the hardware or run time also use ILP to achieve best performance.
Little further elaboration: In a multi core processor (say 4 per system) with multiple threads (say 2 per core) ( i.e total 8 threads per system), a java thread is executed in one of the several (8 in this case) processor threads. But if the system determines that all or several other threads are doing nothing but staying ideal, can the hardware or runtime do any legal re-orderings and execute them in other threads on same or other cores and fetch the results back(or in to main memory)
I am bothered about does java implementation allow this or even otherwise it is up to hardware to handle this independently even with out the JVM even knowing anything.
Asked
Active
Viewed 329 times
0

samshers
- 1
- 6
- 37
- 84
-
There's more than one implementation of the Java language, and there's more than one hardware platform for which Java implementations are available. They don't all have to work in exactly the same way: They only have to faithfully implement the Java Language Specification (JLS). None of what you are asking about is mentioned in the JLS. – Solomon Slow Sep 02 '16 at 11:24
1 Answers
2
It's a little unclear what you're asking, but I don't think it has much to do with Java.
I think you're talking about (at least) two different things:
"ILP" is generally used to refer to a set of techniques that occur within a single core (such as pipelining and branch prediction), and has little to do with threading or multi-core. These techniques are transparent implementation details of the CPU, and typically not exposed in a way that you (or the runtime) can interact with directly.
Threads are swapped on and off cores by the kernel scheduler if they become blocked (and even if they're not, to ensure fairness).

Oliver Charlesworth
- 267,707
- 33
- 569
- 680
-
i see what you are saying, and #1 just simplifies the things. Is there any reference you can point to ILP internals( beyond wiki) ( I will really appreciate any further info) . so each core does it own ILP (if at all) and this is independent with other cores IPL's or operations. And if there is only one data/computation intensive operation happening in one thread and others are effectively doing nothing or sitting idle, there is no way for the other cores or processor threads to interfere or help in expediting the computation. – samshers Sep 02 '16 at 16:08
-
#2 - threads switching from one processor (or processor thread if using HT) to another seems fine when there are several threads contending for same resources. There is definitely lot of context switching and scheduler may assign a new core or same every time. – samshers Sep 02 '16 at 16:11
-
so IPL is a measure of a single/individual core or a single/individual thread (in HT) but not of the multi-processor on a whole. Right?? – samshers Sep 02 '16 at 16:40
-
I think you answered it. But am just thinking what does **transparent implementation** means here or in general. – samshers Sep 08 '16 at 18:02