Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between x86/x64/ia64 memory models on .NET

Tags:

intel

I'm looking for a reference on the differences between the memory models used by the .NET CLR/JIT on x86/x64/ia64. I know there's some differences between x86 and ia64 (instruction reordering, instruction removal, etc.), but I haven't found a reference on the differences between x86 and x64.

I have an application that is aiming for some very tight latency numbers, and will only run on x86 at this time, and maybe on x64 (definately not on ia64). I'm wondering if I can rely on some artifacts of the x86 JIT implementation and still be relatively safe on x64, or if I should be programming to the looser ia64 JIT (which will require more fields be volitile and memory barriers be inserted in several places).

Thanks in advance for any pointers.

like image 490
Jonathan Rupp Avatar asked Apr 20 '09 12:04

Jonathan Rupp


1 Answers

Two articles on the .NET memory model (which is stronger than the ECMA model, btw):

  • Vance Morrison (detailed)
  • Joe Duffy (set of rules based on the above)

Joe Duffy's book, Concurrent Programming on Windows, is also a great source of information on this topic.

like image 145
Jon Skeet Avatar answered Sep 30 '22 15:09

Jon Skeet