Parallel Algorithms – Standard Pseudocode Guidelines

coding-standardsparallelismpseudocode

The common styles of pseudocode are largely intelligible, and it is more or less clear how to write pseudocode for sequential programs.

But if parallelism is not hidden behind a full library and is regarded as a regular part of programming, then it should be treated as the same way in regards to pseudo-code.

Is there a consistent and widely used style of pseudocode for parallel algorithms? Are there good, practical examples of this?

Best Answer

It depends on what level you need to reason about the code. For low-level code you may need to describe shared resources, readers, writers, and how they cooperate to prevent starvation (see the readers-writers problems). On a higher level it may be sufficient to describe system states, tasks, and how workers are synchronized.

Related Topic