Chinaunix首页 | 论坛 | 博客
  • 博客访问: 347992
  • 博文数量: 105
  • 博客积分: 2730
  • 博客等级: 少校
  • 技术积分: 1110
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-20 12:09
文章分类

全部博文(105)

文章存档

2013年(3)

2012年(2)

2011年(36)

2010年(34)

2009年(6)

2008年(20)

2007年(4)

分类: IT业界

2011-05-10 16:59:40

充分体现了三个臭皮匠顶一个诸葛亮,老外的脑子都超频了吧,回的太快了.

0
I'm a little confused by the meaning of "Aliasing". First I found It's definition on wikipedia : """ However, VIVT suffers from aliasing problems, where several different virtual addresses may refer to the same physical address. Another problem is homonyms, where the same virtual address maps to several different physical addresses. """ but after a while I found another different definition on a presentation(ppt) of DAC'05: "Energy-Efficient Physically Tagged Caches for Embedded Processors with Virtual Memory" """ Cache aliasing and synonyms Alias: Same virtual address from different contexts mapped to different physical addresses Synonym: Different virtual address mapped to the same physical address (data sharing) """ As I'm not familiar with English, I cannot make sure which is correct, though I think the Wiki's definition is correct.
|||


What's your question? –  36 mins ago

which definition is correct? 1v->np or nv->1p? –  34 mins ago 


1 Answer
0

You'd need to learn about Virtual Memory first, but basically it's this:

  • The memory addresses your program uses aren't the physical addresses that the RAM uses; they're virtual addresses mapped to physical addresses by the CPU.

  • Multiple virtual addressses can point to the same physical address.

That means that you can have two copies of the same data in separate parts of the cache without knowing it... and they wouldn't be updated correctly, so you'd get wrong results.

Edit:

Exerpt of :

Cache aliasing occurs when multiple mappings to a physical page of memory have conflicting caching states, such as cached and uncached. Due to these conflicting states, data in that physical page may become corrupted when the processor's cache is flushed. If that page is being used for DMA by a driver, this can lead to hardware stability problems and system lockups.

:

On ARMv4 and ARMv5 processors, cache is organized as a virtual-indexed, virtual-tagged (VIVT) cache in which both the index and the tag are based on the virtual address. The main advantage of this method is that cache lookups are faster because the translation look-aside buffer (TLB) is not involved in matching cache lines for a virtual address. However, this caching method does require more frequent cache flushing because of cache aliasing, in which the same physical address can be mapped to multiple virtual addresses.

||


I don't see how this answers the question at all. OP wants to know if aliasing means "the same virtual addrs (in different contexts) are mapped to different physical locations" or "multiple virtual addrs are mapped to a single physical location". I suspect the answer is "both", but don't have a reference for it. –  31 mins ago

Can you explain to me which of above two definition is wrong? –  31 mins ago 

@John, @Wu: I believe Wikipedia's correct. Aliasing is a problem with the correctness of a single program, and explanation 2 doesn't make sense for that. –  28 mins ago

to John: since "Homonym" and "Synonym" cannot be homonym and synonym, I think only one can be correct. –  28 mins ago 

@Wu, @John: See my source. :) –  27 mins ago

@Mehrdad: your updated ref is a description of a BUG, It says that on "multiple mappings to a physical page of memory have conflicting caching states" circumstances, A "cache aliasing" occurred. I think it means "cache state aliasing" not the "cache address aliasing". also It's not a description not a definition. :) –  15 mins ago 

@Wu: I've never heard of "cache state aliasing" or "cache address aliasing"; all of the sources here agree that it's just called "cache aliasing", and the NVIDIA paper confirms what it means. Why they wrote the paper doesn't affect the validity of what it says. :P –  11 mins ago

for "cache state aliasing" it means multiple cache line in a "page" has different state. so you cannot tell if the page is hit or not hit, it's a mix state. we can call it "confusing state".. "cache address aliasing" means a physical address has multiple virtual-addresses and more than one of them are cached. It is different meanings. –  4 mins ago  

@Mehrdad: I argee to "the same physical address can be mapped to multiple virtual addresses " in your second update. :) while nVIDIA's works it's another question. –  25 secs ago  
阅读(1533) | 评论(0) | 转发(0) |
0

上一篇:平凡,平凡解

下一篇:Haskell 的forall

给主人留下些什么吧!~~