64 bits native types atomicy and memory bus?

I have read at some point that native types are atomic as long as they are not wider than the memory bus and aligned. I may be very wrong on this, but isn't a memory bus usually 64-bits even for a 32bits CPU (http://en.wikipedia.org/wiki/Front-side_bus)? In which case the above statement would mean that a read or write or an aligned 64bits native type would be atomic right? I looked into intel's documentation and it says x86 is guaranteed to be atomic for 32 bits and below only - but I wanted to make sure I understand the memory bus width part correctly.

Thanks!

Answers


The width of the memory bus has nothing whatsoever to do with the atomicity of memory accesses. You could have a one-bit memory bus and still have atomic 64-bit memory accesses by holding the bus through 64 reads or writes. You could have a 64-bit bus but not atomic 64-bit memory accesses if the path between the CPU and the cache was 32-bits and the cache could not be locked.


Need Your Help

Can I change chat id?

google-app-engine

I'm using the appengine. I'm going to use an app named Square for this example.

How to delete a large record from SQL Server?

sql sql-server-2008 sql-update sql-delete

In a database for a forum I mistakenly set the body to nvarchar(MAX). Well, someone posted the Encyclopedia Britanica, of course. So now there is a forum topic that won't load because of this one p...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.