Home => Explaining a CPU flaw with an analogy
January 5, 2018
The CPU, or Central Processing Unit, is the heart of any computer. It is what does the computing.
The current CPU flaws in the news involve the internal structure allowing a CPU to do part of its job. Rather than add 1 plus 1 and get 3, the issues involve virtual storage, page tables, a Translation Lookaside Buffer (TLB) and guessing at the outcome of an IF test (a.k.a. "out-of-order execution" or "speculative execution"). Few computer nerds fully understand the issues and those that do can't explain them, except to other nerds. To techies, there are three flaws. To most people there are only two. One of the flaws, Meltdown, lends itself to the following analogy which describes both the problem and its fix.
Consider the houses on a suburban block. They were all built by the same construction company. They all have the exact same basement. The first and second floors were customizable when the house was being built so every house is laid out differently on the top two floors.
Every house has a door and a staircase leading to the basement. It is a basic assumption, one that every homeowner takes for granted, that when they are walking on the first floor, they don't fall through to the basement.
The CPU bug is a weakness in the floor through which people can fall into the basement. And, the floor can not be fixed. In fact, the only way to fix the problem is to buy a new house.
What to do?
The solution is to build everyone a new basement but put it in the back yard. The new basement will be same as the old one. It will have the same amount of storage space and the same number of rooms and layout. But, it's in the back yard. No more using the original basement.
The new basement is a pain because it's harder to get to. Rather than simply opening a door and walking down a few steps, homeowners now have to go outside. This means pausing to get dressed, put on a coat, maybe get an umbrella if its raining, maybe put on sweaters if its cold outside, maybe get a flashlight at night, etc. It takes longer to get to and from the new thingy serving as a basement.
How much will this change the lives of the homeowners? It depends on how often they go to and from the basement.
Stepping out of the analogy
The slowdown when dealing with a basement in the back yard is spot on. Computing will be slower, but how much slower depends on how often a given computing task or workload (homeowner) needs to transfer between user mode and kernel mode (between the home and back yard).
A flaw in the analogy is that the homeowner is aware of the new basement in the back yard. In terms of computing, the homeowner (application software) is not aware that the basement has moved from underneath them to a separate structure behind the house. It's done with smoke and mirrors. On the upside, the kernel of every operating system occupies lower numbered virtual address spaces, so the basement analogy applies well.
Needless to say, for an operating system to move the basement is a big deal. It is reasonable to expect some hiccups along the way. We'll see.
UPDATE: Jan. 6, 2018: I wrote this before being aware of the problem Windows is having with some anti-virus software causing the system to crash. Issues like this were to be expected.
UPDATE: Jan 6, 2018: The Register reported that the Linux kernel team was originally going with another name for the operating system update that moved the basement out of the house and into the back yard: Forcefully Unmap Complete Kernel With Interrupt Trampolines. You can abbreviate this yourself.
UPDATE: Jan 9, 2018: I told you so: Microsoft yanks buggy Windows Meltdown/Spectre patches for AMD computers by Woody Leonhard in Computerworld January 9, 2018.
|@defensivecomput||TOP||Home => Explaining a CPU flaw with an analogy|
|michael--at--michaelhorowitz.com||Last Updated: January 11, 2018 9 PM|