06.08.2013 Views

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Summary so far<br />

An essential property of parallel C programs is that we have ordered all<br />

memory accesses through <strong>the</strong> happens before relation which will be<br />

expla<strong>in</strong>ed <strong>in</strong> detail soon.<br />

If you use mutexes to order <strong>the</strong> accesses, you will be safe.<br />

Atomic objects and fences are <strong>in</strong>tended for use when:<br />

Mutexes don’t give sufficient performance.<br />

You implement o<strong>the</strong>r high level synchronization primitives.<br />

We will next expla<strong>in</strong> <strong>the</strong> happens before relation <strong>in</strong> detail.<br />

Then we will show concrete examples of us<strong>in</strong>g atomic objects<br />

<strong>in</strong>clud<strong>in</strong>g implementation details for Power processors.<br />

Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 26 / 70

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!