hyperthreading

Why is execution time of a process shorter when another process shares the same HT core

血红的双手。 提交于 2021-02-04 19:00:49
问题 I have an Intel CPU with 4 HT cores (8 logical CPUs) and I built two simple processes. The first one: int main() { for(int i=0;i<1000000;++i) for(int j=0;j<100000;++j); } The second one: int main() { while(1); } Both are compiled with gcc without special options. (I.e. with the default of -O0 : no optimization debug mode, keeping variables in memory instead of registers.) When I run the first one on the first logical CPU (CPU0), and when the other logical CPUs have a load charge near 0%, the

Why is execution time of a process shorter when another process shares the same HT core

家住魔仙堡 提交于 2021-02-04 18:59:07
问题 I have an Intel CPU with 4 HT cores (8 logical CPUs) and I built two simple processes. The first one: int main() { for(int i=0;i<1000000;++i) for(int j=0;j<100000;++j); } The second one: int main() { while(1); } Both are compiled with gcc without special options. (I.e. with the default of -O0 : no optimization debug mode, keeping variables in memory instead of registers.) When I run the first one on the first logical CPU (CPU0), and when the other logical CPUs have a load charge near 0%, the

Can two processes simultaneously run on one CPU core?

邮差的信 提交于 2021-02-04 14:49:28
问题 Can two processes simultaneously run on one CPU core, which has hyper threading? I learn from the Internet. But, I do not see a clear straight answer. Edit: Thanks for discussion and sharing! My purse to post my question here is not to discuss about parallel computing. It will be too big to be discussed here. I just want to know if a multithread application can benefit more from hyper threading than a multi process application. After further reading, I have following as my learning notes. 1)

What is a CPU thread and how is it related to logical threads in code?

爱⌒轻易说出口 提交于 2021-01-18 12:50:51
问题 I have been seeing in the literature for some of the newer CPU's such as the Intel Xeon "Nehalem-EX" as having 8 cores and 16 threads. What are they talking about here? I saw mention of this in reference so SPARCS too, surely this isn't the kind of logical threads spawned by code ? Is this hyperthreading re-named? 回答1: Yes, Nehalem-based processors implement Hyper-threading. The new Nehalem-EX which you refer to has 8 physical cores where each core can be seen as 2 logical cores for a total

What is a CPU thread and how is it related to logical threads in code?

纵然是瞬间 提交于 2021-01-18 12:50:44
问题 I have been seeing in the literature for some of the newer CPU's such as the Intel Xeon "Nehalem-EX" as having 8 cores and 16 threads. What are they talking about here? I saw mention of this in reference so SPARCS too, surely this isn't the kind of logical threads spawned by code ? Is this hyperthreading re-named? 回答1: Yes, Nehalem-based processors implement Hyper-threading. The new Nehalem-EX which you refer to has 8 physical cores where each core can be seen as 2 logical cores for a total

Can a hyper-threaded processor core execute two threads at the exact same time?

孤街浪徒 提交于 2020-12-27 05:29:20
问题 I'm having a hard time understanding hyper-threading. If the logical core doesn't actually exist, what's the point of using hyper-threading?. The wikipedia article states that: For each processor core that is physically present, the operating system addresses two virtual (logical) cores and shares the workload between them when possible. If the two logical cores share the same execution unit, that means one of the threads will have to be put on hold while the other executes, that being said,

Can a hyper-threaded processor core execute two threads at the exact same time?

心已入冬 提交于 2020-12-27 05:27:15
问题 I'm having a hard time understanding hyper-threading. If the logical core doesn't actually exist, what's the point of using hyper-threading?. The wikipedia article states that: For each processor core that is physically present, the operating system addresses two virtual (logical) cores and shares the workload between them when possible. If the two logical cores share the same execution unit, that means one of the threads will have to be put on hold while the other executes, that being said,

Can a hyper-threaded processor core execute two threads at the exact same time?

我的未来我决定 提交于 2020-12-27 05:26:55
问题 I'm having a hard time understanding hyper-threading. If the logical core doesn't actually exist, what's the point of using hyper-threading?. The wikipedia article states that: For each processor core that is physically present, the operating system addresses two virtual (logical) cores and shares the workload between them when possible. If the two logical cores share the same execution unit, that means one of the threads will have to be put on hold while the other executes, that being said,

About Adaptive Mode for L1 Cache in Hyper-threading

混江龙づ霸主 提交于 2020-12-03 04:09:51
问题 I'm a student doing some research on Hyper-threading recently. I'm a little confused about the feature - L1 Data Cache Context Mode. In the architecture optimization manual, it was described that L1 cache can operate in two modes: The first level cache can operate in two modes depending on a context-ID bit: Shared mode: The L1 data cache is fully shared by two logical processors. Adaptive mode: In adaptive mode, memory accesses using the page directory is mapped identically across logical

About Adaptive Mode for L1 Cache in Hyper-threading

独自空忆成欢 提交于 2020-12-03 04:07:02
问题 I'm a student doing some research on Hyper-threading recently. I'm a little confused about the feature - L1 Data Cache Context Mode. In the architecture optimization manual, it was described that L1 cache can operate in two modes: The first level cache can operate in two modes depending on a context-ID bit: Shared mode: The L1 data cache is fully shared by two logical processors. Adaptive mode: In adaptive mode, memory accesses using the page directory is mapped identically across logical