Take the 2-minute tour ×

It roughly three weeks I will be taking a Parallel programming class that is taught using C for the assignments. I have a fairly strong interest in the subject at present and my C skills aren't terrible but I feel like I need to brush up on C as the last class I had that actively required programming in it was 8 months ago. I took an Embedded Systems course in the spring so I understand the concept of deadlock, semaphores and the "shared data" problem. It was primarily iOS programming code wise so my C skills haven't seen loads of use from that context either.

If I had to guess as to an area of especially stringent re-study I would select pointers and memory allocation as that seems to be the primary challenge. I believe the class covers MPI and OpenMP so I may take a look at those in advance. Am I on the right track or am I missing something entirely?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You will need threads for concurrent programming, and they are not part of the C language proper. Rather, they are part of the operating system. See here for more information about how to use threads on Unix and Linux.

Now that you're into threading, there is a paper that talks specifically about the problems and pitfalls of concurrent programming using threads here:

The Problem with Threads

share|improve this answer
Threads aren't required for concurrent programming, as long as processes are available. Processes require sharing to be explicit, alleviating many (but not all) of the problems with threads. –  Joey Adams Aug 4 '11 at 3:46
add comment

After years of hard realtime embedded developemnt, the only advise is that you cannot test the correctness of concurrent / parallel / multitrheaded applications.

The best you can do with test is prove the presence of concurrency issues. Therefore you need to understand where you interactions are happeneing, and prove though design they are robust. The biggest gotcha is not limiting the interactions to the bare minimum needed to do the job, and spinning more threads than needed because it's easy.

share|improve this answer
add comment

Your Answer


