Hardware thread against soft threads?

I read that in a multi-core processor each core contains 2 hardware threads, for example, in a dual-core processor 4, hardware threads work. Now, if I create 2 threads in java, are those threads that will be displayed using two hardware threads, or are those two java threads executed by the same hardware thread of a certain kernel?

+7
source share
1 answer

It depends on many things, however 2 hardware threads per core that you are talking about is Intel HyperThreading technology. This technology allows the processor to have two thread contexts in memory and simultaneously share execution resources.

What threads are executed where OS execution depends on and are mostly allowed by the Scheduler Thread algorithm of your operating system.

+3
source

All Articles