Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The simple thing to do is read a little. The following list contains some stuff to look at and research.</p> <ol> <li>Spend time reading the <a href="http://www.opengroup.org/onlinepubs/9699919799/" rel="noreferrer">Open Group Base Specification</a> particularly the <a href="http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html" rel="noreferrer">General Information</a> section and the <a href="http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09" rel="noreferrer">subsection on threads</a>. This is the basis information for multithreading under most UN*X-alike systems.</li> <li>Learn the <a href="http://koti.mbnet.fi/niclasw/MutexSemaphore.html" rel="noreferrer">difference between a mutex and a semaphore</a></li> <li>Realize that everything that is shared <em>MUST</em> be protected. This applies to global variables, <code>static</code> variables, and any shared dynamically allocated memory.</li> <li>Replace global state flags with <a href="http://en.wikipedia.org/wiki/Condition_variables" rel="noreferrer">condition variables</a>. These are implemented using <a href="http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_destroy.html" rel="noreferrer"><code>pthread_cond_init</code></a> and related functions.</li> </ol> <p>Once you understand the basics, learn about the common problems so that you can identify them <em>when</em> they occur:</p> <ul> <li><a href="http://www.justsoftwaresolutions.co.uk/threading/acquiring-multiple-locks-without-deadlock.html" rel="noreferrer">Lock inversion deadlocks</a></li> <li><a href="http://www.embedded.com/story/OEG20020321S0023" rel="noreferrer">Priority inversion</a> - if you are interested in a real life scenario, then <a href="http://research.microsoft.com/en-us/um/people/mbj/mars_pathfinder/mars_pathfinder.html" rel="noreferrer">read this snippet about the Mars Pathfinder</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload