user3728867
user3728867

Reputation: 21

Is mesi cache coherence protocol applicable for single processor with 2 logical cores?

I am using Intel Atom Processor (Genuine Intel (R) CPU). I have done cat/proc/cpuinfo. It is showing two processors but for physical and core id, it is showing 0. I did grep "^core id" /proc/cpuinfo | sort -u | wc -l to find no of cpu cores. It is showing 1. What does that mean? Is it has only one physical core and 2 logical cores? Is mesi cache coherence protocol is applicable in this case?

Upvotes: 2

Views: 309

Answers (1)

Massimiliano
Massimiliano

Reputation: 16980

From Intel's Architecture Manual, Volume 3:

8.7.13.1 "Processor Caches"

For processors supporting Intel Hyper-Threading Technology, the caches are shared. Any cache manipulation instruction that is executed on one logical processor has a global effect on the cache hierarchy of the physical processor.

In my understanding, it means that you have 1 physical core, with Hyper-Threading enabled, giving you 2 logical cores. These logical cores share almost all of the resources of the physical core, including all the caches, therefore there is no need for cache coherence protocols, both cores always see the same cache state.

An interesting side-effect of this is mentioned on http://en.wikipedia.org/wiki/Hyper-threading:

In May 2005 Colin Percival demonstrated that on the Pentium 4, a malicious thread can use a timing attack to monitor the memory access patterns of another thread with which it shares a cache, allowing the theft of cryptographic information.

Upvotes: 2

Related Questions