Unit I — Introduction to Parallel Processing

Why Parallelism?

Session 01 • 2311CSC501J — Parallel Processing

What You'll Learn

  • Why the "free lunch" of faster chips ended
  • Concurrency vs parallelism vs multitasking
  • Latency vs throughput
  • Why not everything can be parallelized

"Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once."

— Rob Pike

The Free Lunch Is Over

For 40 years, code got faster for free

Then, around 2005, the wall

Dennard scaling broke. Push the clock higher and the chip becomes a tiny electric heater. Intel cancelled its 4 GHz Pentium. We hit the Power Wall.

Clock speed over time (simplified)

3+ GHz  |               ________________  ← flat since ~2005
        |             /
        |           /
        |         /
        |       /
  1 MHz |_____/
        +----------------------------------
        1975       2005            today
        "free lunch"    "the multicore era"

Moore's Law kept giving us more transistors — but we could no longer spend them on speed. So we spent them on more cores.

Every Device You Own Is Parallel

6–8
cores in your phone
8–16
cores in your laptop
1000s
cores in a GPU
10,000s
GPUs to train an AI model

The catch: a program not written for multiple cores uses only one of them.

A 16-core laptop running bad code = 1/16th of the machine. Parallel processing is the skill of using all of it.

Three Words People Confuse

Term Meaning Needs many cores?
ConcurrencyDealing with many things at once (structure)No
ParallelismDoing many things at once (execution)Yes
MultitaskingOS switching between tasks on shared coresNo

The Chef Analogy (remember this)

1 chef, 1 dish

Sequential. No concurrency, no parallelism.

1 chef, 3 dishes, juggling

Concurrency. One core, but progress on many tasks by switching cleverly.

3 chefs, 3 dishes, at once

Parallelism. Real simultaneous work. Needs 3 chefs (3 cores).

Watch: Concurrency Is Not Parallelism

Rob Pike (co-creator of Go) — the definitive mental model. Show the first ~10 minutes.

You can have concurrency without parallelism (one core switching fast). You generally can't get useful parallelism without concurrency — you must split the work first.

Latency vs Throughput

Latency

How long one task takes.

How fast is one car through the toll booth?

Throughput

How many tasks finish per unit time.

How many cars per minute overall?

Opening more toll booths doesn't make any single car faster (latency unchanged) — but far more cars get through per minute (throughput up).

Most parallelism is a throughput win, not a latency win. A GPU doesn't compute one pixel faster — it computes millions at once.

Parallelism Already Runs Your Life

You do this… …parallelism makes it possible
Google a queryThousands of servers search different slices of the web at once, merge in ~0.5s
Play BGMI / GTAThe GPU shades millions of pixels in parallel, 60+ times a second
Ask ChatGPTTrained across tens of thousands of GPUs running in parallel for months
Pay via UPI at peakMillions of transactions processed concurrently across many machines
Check the weatherSupercomputers split the atmosphere into a grid, simulate each cell in parallel

Parallel computing isn't niche. It is the foundation of every system that operates at scale — which is every system you actually use.

Watch: CPU vs GPU, Visually

NVIDIA / Mythbusters — 1:30 that makes data parallelism unforgettable.

A CPU is a few very smart painters. A GPU is one giant machine that paints the entire picture in a single shot. Different tools for different jobs — we'll see why in Unit II.

Two Flavors of Parallelism

Data Parallelism

Same operation, lots of data.

"Add 1 to every element of a million-item array." Split the array; each core does its chunk. This is what GPUs are built for.

100 students each grade one page of the same exam.

Task Parallelism

Different operations, running together.

One thread loads the file, another compresses it, another uploads it. Different jobs, same time.

One person chops, another fries, another plates.

Most real systems mix both. We go deep in Unit III.

The Catch: Not Everything Speeds Up

"Nine women can't make a baby in one month."

Amdahl's Law (preview, Session 08): if 90% parallelizes but 10% can't, then even with infinite cores you can never beat 10×. That stubborn 10% is the ceiling.

And parallelism creates brand-new bugs

Race condition

Two cores update the same variable at once; result depends on luck.

Deadlock

Two cores each wait for the other, forever.

Load imbalance

One core gets 90% of the work while others sit idle.

A First Feel for Speedup

                time on 1 core
   Speedup  =  ---------------------
                time on N cores

100s on 1 core → 25s on 4 cores

= 4× speedup (perfect!)

100s on 1 core → 40s on 4 cores

= 2.5× (real life)

Perfect (linear) speedup = N× on N cores. It's the dream, rarely achieved — the sequential parts and coordination overhead eat into it. Session 08 turns this into real formulas.

Recap & What's Next

Key Takeaways

Homework

Next session: Flynn's Taxonomy & Memory Models

How we classify every parallel machine ever built.