Parallelism In Programming
Paralleism is a powerful tool that utilizes the multi core architecture of modern day processors to run multiple processes at the same time. The benefit in doing this is a dramatic increase in computation speed of large algortithims.One of the most common examples of parallelism at work occurs when implemented in loops. Parallelism allows multiple sequential iterations of the loop to run at the same time, then recombines the run data at then end of the loop.
The course on parallelism was taught using C as the primary programming language as it allows a much greater degree of control over computer hardware than other large language models. It is also difficult to learn for that same reason, requiring manual inputs of processes that other languages can handle innately. This course was my first exposure to C as a programming language, and was a steep learning curve to handle as I balanced learning the language with completing labs.
Parallelism Labs
We covered multiple, well known algorithims in this class we had to make from scratch in a parallel fashion for this course. The first was a zero player game called "Conway's Game of Life" which is a zero player game where a grid is established, then a colony is formed that must follow these rules:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
The end result should look something like this: