Understanding various parallel programming paradigms
Now that we have explored some of the different models used for building parallel programs, it is time to move to a more abstract classification and learn about the fundamental styles or principles of how to code parallel programs by exploring the different parallel programming language paradigms.
Synchronous programming
A synchronous programming language is used to build programs where code is executed in a strict sequential order. While one instruction is being executed, the program remains blocked until the instruction finishes. In other words, there is no multitasking. This makes the code easier to understand and debug.
However, this behavior makes the program unresponsive to external events while it is blocked while running an instruction and difficult to scale.
This is the traditional paradigm used by most programming languages such as C, Python, or Java.
This paradigm is especially useful for reactive or embedded...