seegongsik
Saved words
Operating systems

Many kitchens, truly at once

With several kitchens it is not turns but truly working together at once.

01

What if there is more than one kitchen

Until now there was one kitchen. One worker did a bit of this, a bit of that, switching quickly.
But what if there are two kitchens, or three. There are that many workers too, each cooking in their own kitchen at the same time. Not taking turns, but truly several at once, in the same moment.
A computer calls these many kitchens cores. With several cores, several jobs really can be handled together in the same moment.

One kitchentaking turns (illusion)Several kitchenstruly at once

One kitchen means taking turns, several means truly at once

With several cores, several jobs really are handled together in the same moment.

02

Truly together, or just quick turns

Earlier we said one worker switching fast looks like doing things at once. That was an illusion. Really, only one thing was happening at any one moment.
With several kitchens it is different. Look into the very same moment, and work is truly going on at once in this kitchen and that kitchen. Not taking turns.
So a difference appears. The illusion of at-once only looks fast, while truly at-once really finishes more work in the same time.

same momentIllusion of at-onceonly one per momentTruly at onceseveral in one moment

One kitchen switching fast is an illusion, several kitchens is real at-once

One core taking turns only looks simultaneous, while several cores really run together.

03

Add more kitchens

A big pile of jobs is waiting to be finished. Change the number of kitchens yourself.
With one kitchen, jobs are handled one after another. Add kitchens and several jobs are handled at once, finishing the same amount faster.
Two kitchens take roughly half the time, four even less. Add some and watch how fast the pile shrinks.

Jobs left
Kitchens
Time00/12
Kitchens2
More kitchens finish the same work faster. But as the next tab shows, it does not speed up forever.

Change the number of kitchens and watch how fast the same work finishes

More kitchens finish the same work faster, but you soon meet a limit too.

04

Twice the kitchens is not twice as fast

Double the kitchens and it seems it should be twice as fast. But that is not always so.
Some work cannot be split. While the dough waits to rise, ten kitchens make it no faster. And if workers all want the same single ingredient at once, they have to wait for each other.
So as you add kitchens it speeds up at first, then past some point it no longer speeds up as much as you add. The work that can be split is only so much.

Speedcannot splitwaiting1248Corestwice is not twice as fast

Unsplittable work and waiting for each other mean adding cores has a limit

More cores go faster, but some work cannot be split, so it does not speed up forever.

05

Put it on one page

Just remember three things.
First, with several cores work really happens at once. Not the illusion of one worker switching fast, but together in the same moment across several kitchens.
Second, that finishes the same work faster, because the work is split among several kitchens. Third, there is still a limit. Because of unsplittable work and waiting for each other, doubling the cores does not exactly double the speed.

One
With several cores, work really happens at once. Not an illusion, but together in the same moment across kitchens.
Two
So the same work finishes faster. The work is split among several kitchens.
Three
Still a limit. Unsplittable work and waiting for each other mean doubling cores is not exactly twice as fast.

Several cores are truly at-once, so faster, but with a limit

In one lineSeveral cores split the work and handle it truly at once so it goes faster, but unsplittable work is the limit.
Was this helpful? Support seegongsik
Operating systems