Atomic operations

Hi,

I was reading my book "Professional C++ 3rd Edition" by Marc Gregoire on the Atomic operations library and the multithreading library provided by the C++ standard. This book does not go very much into detail on these two subjects, especially on the atomic operations library. This irritates me very much. To give you an idea, they didn't give a definition for the c++ attribute [[carries_dependency]] because it was too "exotic". I tried looking up some stuff on this website's reference pages, but I was completely confused (What the heck is a dependency tree?). Does someone know of a resource, book, pdf, or anything that is (not a reference website or an encyclopedia) a tutorial page on the atomic operations and multithreading library?
Well, I cannot remember one on top on my head, but I'll try to look into it.

In the meantime you cna study this link (it is a reference, but it might shed some light on ordering operations)
http://en.cppreference.com/w/cpp/atomic/memory_order
Thanks. I found a book on multithreading. It is called C++ Concurrency in Action. It talks a bit about memory orderings as well, but doesn't go into details on [[carries_dependency]] and whatnot. I will also post the link to a YouTube video I found about the c++ memory model so that future viewers that see this thread will be able to watch the video. I am still looking for some resources on dependencies.
> I found a book on multithreading. It is called C++ Concurrency in Action.

It is the best book on the topic.


> It talks a bit about memory orderings as well, but doesn't go into details on [[carries_dependency]]

These papers may contain more information.

Thread Basics: http://www.hpl.hp.com/techreports/2009/HPL-2009-259html.html

Atomics and Memory Model: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2556.html

Function Annotation: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2782.htm
Concurrency in action is a good book. It is on The Definitive C++ Book Guide and List
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
doesn't go into details on [[carries_dependency]] and whatnot
I believe it is because of that:
Note that currently (2/2015) no known production compilers track dependency chains: consume operations are lifted to acquire operations.
It literally does nothing now. As it takes more practical approach, it skips over topics which are not implemented and unlikely to be implemented in near future. (like no book will talk about exporting templates: no one support that)

Last edited on
FWIW, 'C++ Templates: The Complete Guide' (Vandevoorde and Josuttis) did cover the C++ template separation model and the export keyword in excruciating detail. At that time, support was limited to compilers with an EDG front-end (Comeau, ICC and perhaps the HP compiler).

It's history now; C++11 removed the feature altogether.
The export keyword is unused but is reserved for future use.
A valid C ++ 2003 declaration containing export is ill-formed in this International Standard.
Thanks to everyone that replied to this thread. For future viewers, here are two books that are very helpful:

https://books.google.com/books?id=J5-ckoCgc3IC&pg=PA26&lpg=PA26&dq=dependency+chains+concurrency&source=bl&ots=6VKC6sD-cz&sig=rs0mr8w8WBKIakS7keU80DHh9pk&hl=en&sa=X&ei=7tmeVa2kE8yq-AGNjpWABQ&ved=0CCIQ6AEwAg#v=onepage&q=dependency%20chains%20concurrency&f=false

This book gives a general view on multithreading

C++: Concurrency in Action

This book gives a much more in depth look on memory orderings , atomic operations, and thread synchronization.
Topic archived. No new replies allowed.