No history yet

Introduction to Parallel Computing

The End of the Free Lunch

For decades, software got faster for free. Programmers could write code, wait a year or two, and new computers with faster single processors would run it twice as fast. This was thanks to Moore's Law, which observed that the number of transistors on a chip doubled roughly every two years. More transistors meant more powerful processors.

But around the mid-2000s, this free lunch ended. Making single processors faster hit physical walls. Pushing more electricity through smaller circuits generated too much heat and consumed too much power. Processor speeds flatlined. To keep improving performance, engineers had to change their strategy. Instead of building one incredibly fast brain, they started putting multiple brains—or cores—onto a single chip.

What Is Parallel Computing?

This shift to multi-core processors made parallel computing essential. Instead of running a list of instructions one by one (serial processing), parallel computing breaks a problem into smaller pieces and works on them at the same time.

Parallel computing is the use of multiple processing units to execute parts of a program simultaneously.

Think of building a house. A single builder working alone would have to do everything in sequence: lay the foundation, frame the walls, put on the roof, and so on. This is serial processing. It works, but it's slow.

Now imagine a team of builders. One group lays the foundation while another frames pre-built walls and a third prepares roofing materials. They are all working in parallel. The house gets built much faster. This is the core idea of parallel computing.

Lesson image

The main benefits are straightforward but powerful:

  • Performance: For complex problems like weather forecasting or drug discovery, parallel computing can slash the time it takes to get a result from years to days, or from hours to minutes.
  • Efficiency: Using multiple cores can be more power-efficient than trying to make a single core run faster. It’s like having a team of workers instead of one overworked superstar.
  • Scalability: If you have a bigger problem, you can often solve it by throwing more processors at it. This allows systems to handle massive datasets and complex simulations that would be impossible for a single processor.

How It All Connects

How do these multiple processors work together? They generally follow one of two main architectural models: shared memory or distributed systems.

In a shared memory system, all processors have access to a common pool of memory. Think of it as a team of architects working around a single, large drafting table. Everyone can see and modify the same blueprint. This makes communication incredibly fast—if one architect makes a change, everyone else sees it instantly. The challenge is coordination. You need rules to prevent two architects from trying to erase and redraw the same line at the exact same moment.

The other model is the distributed system. In this setup, each processor has its own private memory. It's like a team of architects where each has their own personal drafting table and blueprint. To collaborate, they have to send messages to each other, perhaps by phone or email. Communication is slower and more deliberate, but you can scale the system to a massive size by simply adding more architects with their own tables. This is how large supercomputers and cloud computing data centers are often built.

FeatureShared MemoryDistributed System
MemorySingle, shared address spaceEach processor has its own private memory
CommunicationFast, via memory accessSlower, via network messages
ScalabilityLimited by bus trafficHighly scalable
Key ChallengeMemory access synchronizationNetwork communication overhead

Understanding these fundamental concepts is the first step into the world of high-performance computing. Let's review what we've covered.

Quiz Questions 1/5

Why did the 'free lunch' of CPUs getting faster on their own end around the mid-2000s?

Quiz Questions 2/5

Based on the house-building analogy, which of the following best represents parallel computing?

As software demands continue to grow, parallel computing will only become more important for building fast, efficient, and powerful applications.