
How Many Computers Are in Your Computer? - wrinkl3
https://www.gwern.net/Turing-complete#how-many-computers-are-in-your-computer
======
kev009
The cpu also has typically multiple independent CPUs to control things like
power saving and turbo boost. Modern intel cpus have multiple 486-class CPUs,
one for this, one for the ME, and one that vendors can use that has SMM access
(which is as scary or more so than the ME).

OpenPOWER is pretty neat because you can actually see what commercially
relevant implementations of these firmwares look like
[https://github.com/open-power/occ](https://github.com/open-power/occ)

A lot of NICs are also completely based on multiple general purpose MIPS cores
like Broadcom and Mellanox. The most common SAS HBA from LSI/Broadcom was a
PowerPC SoC. And SATA/SAS drives are running multiple ARM Cortex M series MCUs
for the bus interface, drive geometry, and FTL in the case of flash.

The BMC (IPMI) is also a self sufficient ARM computer.

~~~
kees99
> And SATA/SAS drives are running multiple ARM Cortex M series MCUs

[http://spritesmods.com/?art=hddhack](http://spritesmods.com/?art=hddhack)

~~~
13of40
Compare it to the straightforward days of yore, when my hard drive controller
only had a Z80 and my printer an MC68000.

~~~
kalleboo
Or my floppy drive had the same CPU and roughly the same clock as the
computer...

~~~
monocasa
C64? Or was there some other system that was true for?

------
ianhowson
There are probably another order of magnitude more computers in a 'computer'
than Gwern estimates.

Consider:

\- Power management chips (of which there are dozens) each containing
programmable MCUs

\- Batteries, of course, contain one or more MCUs each

\- Clocks

\- 'Glue' MCUs for things like DMA controllers and USB controllers. (USB
controller firmware has been exploited from the port side, and it's not
upgradeable)

\- Supervisors

\- RGB LEDs (!)

\- SD cards have several (see Bunnie's work)

\- Ethernet, WiFi and Bluetooth controllers contain several small and usually
a few large computers each

Some of these have fully-baked ROM code, some are programmed and modifiable
through flash, and some have firmware written at driver load time to save
money.

~~~
leggomylibro
Many of those chips are not programmable though, or are 'programmed' through
things like voltage dividers.

At what point do you consider a chip a 'computer'? Would something like a
voltage regulator or mux/demux count as an ASIC?

~~~
xobs
Many of those /are/ programmable. Here's the code we used to get code
execution on an SD card bought at the markets in Shenzhen (the project I did
with bunnie, referenced above): [https://github.com/xobs/ax2xx-
code](https://github.com/xobs/ax2xx-code)

The factory needs to get code on there somehow, and usually the method isn't
documented. Oftentimes it's not locked down.

~~~
acqq
The blog entry "On Hacking MicroSD Cards" (2013):

[https://www.bunniestudios.com/blog/?p=3554](https://www.bunniestudios.com/blog/?p=3554)

------
moyix
To add a one more: the Macbook charging bricks have an MSP430 in them [1],
"roughly as powerful as the processor inside the original Macintosh". It's
definitely Turing complete; you may not get tons of access to the rest of the
machine, but it might serve as a vantage point from which to launch power-
based side channel attacks [2] (yes, you only get the overall power draw from
this but that's no barrier [3]).

[1] [http://www.righto.com/2015/11/macbook-charger-teardown-
surpr...](http://www.righto.com/2015/11/macbook-charger-teardown-
surprising.html)

[2]
[https://en.wikipedia.org/wiki/Power_analysis](https://en.wikipedia.org/wiki/Power_analysis)

[3]
[https://m.tau.ac.il/~tromer/handsoff/](https://m.tau.ac.il/~tromer/handsoff/)
"Our attacks use novel side channels and are based on the observation that the
"ground" electric potential in many computers fluctuates in a computation-
dependent way."

------
arcanus
Also interesting to consider: how many organisms are in a human being?

We think of ourselves as a single entity, but we are composed of many life
forms: Mitochondria, viruses, gut bacteria...

~~~
kibwen
Some human beings even have whole other human beings inside of them, though
for the moment computer manufacturing is a bit more sterile than all that.

~~~
rounce
Modern CPUs have other CPUs inside them, they never give birth though.

------
pjscott
A paper linked from that page, "MOV is Turing-complete", is as hilarious as it
is clever.

[https://www.cl.cam.ac.uk/~sd601/papers/mov.pdf](https://www.cl.cam.ac.uk/~sd601/papers/mov.pdf)

If you've ever wanted someone to accuse the x86 architecture of having too
_few_ registers, this is your URL.

~~~
ohazi
It's not just a paper... there's a reference implementation!

[https://github.com/xoreaxeaxeax/movfuscator](https://github.com/xoreaxeaxeax/movfuscator)

~~~
pjscott
And an implementation of Doom at merely 7 hours per frame!

[https://github.com/xoreaxeaxeax/movfuscator/tree/master/vali...](https://github.com/xoreaxeaxeax/movfuscator/tree/master/validation/doom)

------
Nokinside
If you own a modern a car, they typically have 50-70 microcontroller units.
Some of them have several cores and DSP units. At the lower end you have 8051,
Atmel AVR or 8 - 16 -bit Renesans chips.

~~~
blattimwind
Anything with a CAN or LIN bus connection has _at least one_ MCU in it.

------
riskneutral
This is a very good article about the different computing units inside servers
and smartphones. However I found the discussion of AI and neural nets to be
confusing and seemingly unrelated.

------
cbkeller
> any floating point unit may be Turing-complete through encoding into
> floating-point operations in the spirit of FRACTRAN

Well that's the most interesting thing I learned today

------
kazinator
MMU page faults and floating-point units are not independent programmable
machines; their actions are coordinated by the processor into which they are
integrated.

~~~
monocasa
The page table walking hardware on x86 is pretty distinct from the main core,
and is Turing complete.

[https://github.com/jbangert/trapcc](https://github.com/jbangert/trapcc)

~~~
kazinator
Can you run this software if the core is removed or disabled?

~~~
gwern
Can you start or run your computer if the BIOS is removed or disabled? Or the
power cord? No? Then does that mean the BIOS or power cord are the computer
and the CPU is not a computer? Being necessary does not establish sufficiency,
much less identity...

~~~
kazinator
To remain within the scope, content and intent of my argument, I would say
that the pieces identified as "BIOS", "power cord" and "CPU" do not constitute
three separate computers.

I believe there is only one, but "at most one" is a compromise that works for
me.

------
exikyut
The part of this that leapt out at me that I wish there were comments about
was:

> ... _custom on-die silicon (implemented by Intel on Xeon chips for a number
> of its biggest customers)_...

I'm only aware of Amazon having custom CPUs, but I know no details about _what
's_ been customized.

Where might I be able to read more about this sort of thing?

------
amelius
... and how many are controlled by you?

~~~
saagarjha
None, probably, if you’re taking the definition of “open hardware” where you
have full access to the microcode running on it and can modify it yourself.

~~~
pkaye
What if it has no microcode running?

~~~
shawnz
Microcode is necessary to decode instructions. When you give the CPU
instructions, it decodes them into microcode which is what actually specifies
the sequence of electrical operations required to process that instruction.

~~~
wnoise
CPUs without microcode exist. While microcode isn't exactly a new innovation,
early mass-market CPUs were not implemented that way.

~~~
pjmlp
Microcode free CPUs was mostly a RISC thing, and basic CPUs like Z80 and 6502,
almost everyone else always had some form of microcode in them.

~~~
shakna
> CPUs without microcode exist. While microcode isn't exactly a new
> innovation, early mass-market CPUs were not implemented that way.

> Microcode free CPUs was mostly a RISC thing, and basic CPUs like Z80 and
> 6502

Those quotes aren't incompatible - the 6502 and Z80 are core to the early
mass-market computer movement.

So whilst microcode-free may be rare now, there was a time when it was the
norm.

~~~
pjmlp
The norm in the context of 8 bit home micros.

------
phoboslab
> Each of the 2-8 main CPU cores (...) has its own private cache (bigger than
> most computers’ RAM up to even recently)

That sounds odd. I take it the author is not talking about the L1, L2 L3
caches, as they are typically only a few MB in size? So what is meant by this
statement?

~~~
gwern
I remember when desktop computers had total RAM measured in single megabytes.
It wasn't _that_ long ago. (Get off my lawn, you kids!)

~~~
glandium
Single digit megabytes? Get off my lawn kid. I'm not _that_ old but I remember
when computers had total RAM measured in TWO digit KILObytes.

------
jakevn
Huh. I personally have never treated the word computer as a synonym of CPU,
APU, GPU, Turing Machine, etc. To me this article reads more like, "I want to
redefine what computer means and then tell you all of the things that fall
under my definition."

But yes, there are indeed many components that make up the modern computers
that are our smartphones, laptops, et cetera.

~~~
pbhjpbhj
No, a computer of course is a person who performs calculations.

[https://en.m.wikipedia.org/wiki/Human_computer](https://en.m.wikipedia.org/wiki/Human_computer)

------
akjetma
Don't mean to nitpick, just wasn't able to parse this:

> Each of the 2-8 main CPU cores can run independently, shutting on or off as
> necessary, and has its own private cache (bigger than most computers’ RAM up
> to even recently) ...

Aren't CPU caches necessarily much smaller than RAM?

~~~
BurningFrog
Yes, but caches _now_ are bigger than RAM was _before_.

~~~
akjetma
Ahhh, that makes sense, thanks!

------
baybal2
Indeed, in worst case scenario, a PC can hold like 20+ pieces of silicon
running their own OSes. Even something as primitive as a PMIC, signal switch,
or a USB hub can hold a fully features RTOS

------
fulafel
There can also be analog computers, those might be harder to recognise.

------
suzzer99
They really dropped the ball not embedding an Xzibit in this paper.

~~~
exikyut
> _Alvin Nathaniel Joiner (born September 18, 1974), better known by the stage
> name Xzibit (pronounced "exzibit"), is an American rapper and broadcaster._

I'm not getting anything else from Google except
[https://en.wikipedia.org/wiki/Xzibit](https://en.wikipedia.org/wiki/Xzibit)

~~~
gordo4
Yo Dawg" is an image macro series based on portrait shots of American hip hop
artist Alvin Nathaniel Joiner (better known by his stage name Xzibit) and
humorous captions that are composed around the recursive phrasal template "Yo
Dawg, I herd you like (noun X), so I put an (noun X) in your (noun Y) so you
can (verb Z) while you (verb Z)." Since rising to popularity in early 2007,
the series has been considered one of the most well-known and longest lasting
examples of recursive humor on the Internet.

[https://knowyourmeme.com/memes/xzibit-yo-
dawg?full=1](https://knowyourmeme.com/memes/xzibit-yo-dawg?full=1)

~~~
exikyut
HN is the best place to find quality, (frequently) low-noise information about
_everything_!

I was aware of the meme, but not its origin. Thanks.

------
officialjunk
it’s computers all the way down.

------
gexcolo
im a computer computer

------
tkahnoski
"How many companies inside your computer?" is the more concerning problem to
me. But that's just my tinfoil hat talking.

~~~
naikrovek
Ooh, watch out. If you have a talking tin foil hat, it was likely provided to
you by a corporate entity. (This is a poor joke about sourcing tin foil hats)

~~~
crwalker
Is the tin from a conflict-free source? How can you be sure without a
blockchain to ensure provenance? (This is an even poorer joke)

~~~
autarch
(This is the poorest joke)

------
tabtab
"640 computers inside a computer ought to be enough for anyone." -Gill Bates

------
kibwen
_> Each of the 2-8 main CPU cores can run independently, shutting on or off as
necessary, and has its own private cache (bigger than most computers’ RAM up
to even recently)_

Can someone elaborate on this? Do CPUs really have gigs of on-die RAM for
their own private use? What are those used for? Or is this just roundaboutly
referring to the usual cache hierarchy? If it's the latter, AFAIK CPUs have
under tens of megabytes of cache, and it's been decades since the average
desktop had 32 MB of RAM--a bit far from recent.

~~~
aeturnum
He's talking about "recently" in the age of computing hardware, not the last
few years. You need to wait until around 1995[1] to find a mac with more
standard RAM than an i9 has in its L2 cache[2].

[1]
[https://en.wikipedia.org/wiki/Power_Macintosh_5200_LC](https://en.wikipedia.org/wiki/Power_Macintosh_5200_LC)
[2]
[https://en.wikichip.org/wiki/intel/core_i9/i9-7900x](https://en.wikichip.org/wiki/intel/core_i9/i9-7900x)

~~~
kibwen
I see. I was hoping there was something more interesting going on, such as
CPU-private bookkeeping... or perhaps supporting that JVM that lives in the
management engine. :)

