News for hackers. Stuff that matters.
Re:Context switching costs more than we give it credit for by Uberphallus on Monday January 18, 2021 @04:51AM (#25820070)
If you think about it, it won't leave your brain: McDonalds restaurants are basically CPUs, especially now with the pandemic.

Instruction fetch: ordering on the touchscreen.

Instruction decoding: each component of the order gets routed to the functional unit that can handle it.

Separate functional units: fries, burger flipping, burger assembly, fridge, etc.

Superscalar: multiple functional units to do the same operation (flipping, assembly)

Pipelines: different phases (fetch/decoding/execution/store in register) happen in parallel for different instructions.

Speculative execution: the most common sub-orders (e.g. Big Mac, basic cheeseburgers) are executed before they are ordered and wait in the sub-pipeline (rack slide) until completion.

Write to register: take the results from the different funcitonal units and putting them in your bag.

Re:Context switching costs more than we give it credit for by Thev00d00 on Monday January 18, 2021 @05:45AM (#25820377)
I wish you could favourite comments on HN, this is great.

Edit: TIL You can! Click its timestamp, then favourite at the top.