Hardware thread vs soft threads?

I have read that in a multi core processor each core contains 2 hardware threads for example in dual core processor 4 hardware threads are running. Now if i create 2 threads in java are those threads going to map with 2 hardware threads or those 2 java threads are executed by single hardware thread of a particular core ?


That is dependent on a lot of things, however the 2 hardware threads per core you are referring to is the Intel HyperThreading technology. This technology enables the CPU to have two Thread Context's in memory and be executing simultaneously, sharing execution resources.

What threads run where is OS implemention dependent and mostly resolved by the Thread Scheduler algorithm of your OS.

链接地址: http://www.djcxy.com/p/6280.html

上一篇: Linux和Windows的IO超时值?

下一篇: 硬件线程vs软线程?