McDonalds and CPU Architecture

pm

Elite Member Mobile Devices
Jan 25, 2000
7,419
22
81
This was posted to an Intel internal newsgroup. The responses to it were almost as funny. The author gave tacit approval for outside posting, so I'm posting it here (if you forward, keep the original author).

My apologies if you don't think it's funny. If nothing else it can be used as an analogy for highly-technical CPU architecture terms.

It's about a McDonald's drive-thru on a street called Cornell in an area west of Portland, OR - somewhere near Beaverton, I gather. I've never been there myself, but I can imagine. They implemented a new setup where there are 2 ordering systems merging into the drive-thru so 2 people can order at a time.

----------------------------------------------------------------------------------------------

It seems to me that McDonalds could use a serious lesson in pipeline
architecture. They started out well. They recognized that their
classic 2 stage drive through pipeline (order, execute) could be
optimized by extending it to a 3 deep pipeline splitting the execute
stage into pay and pickup stages since the execute stage typically
had a higher latency than the order stage assuming well behaved
instructions whose operands are known at order time thus avoiding
an order stall condition. So they had a high performance 3 stage
pipeline (order, pay, pickup) which worked rather well in my humble
opinion. But they couldn't leave well enough alone. They decided to
attempt to get really fancy with a full blown out of order machine
(apart from the catastrophy avoidance out-of-order "penalty box" for
inordinately high latency instructions which has existed for as long
as I can remember). Now they have a 2 wide order unit feeding the
rest of the pipeline allowing them to simultaneously process the
order stage of 2 instructions (I guess they thought that the order
stage had become the critical latency in the pipe by a large enough
amount to warrant such an architectural change...). The problem is
that the execution engine can not keep up with a 2-wide front end.
Invariably the pipeline stalls in execution and leaves instructions
which have already completed the order stage stuck in the pipe
preventing subsequent instructions from entering. With the older
system during peak processing times the execution engine would
have trouble keeping matching the throughput of a single order
unit, making any benefit from a higher throughput front end
miniscule at best during high load times. In an almost empty
system (perhaps that is the condition they are designing to) there
may be a moderate improvement in throughput, but I can't imagine the
overall benefit being worthwhile.

Another problem is the lack of an arbitration mux to schedule
instructions from the front end into the execution pipeline. The
combination of a lack of collision avoidance logic with the fact
that there are almost always 2 instructions stalled and waiting to
enter the execution pipeline is a fault waiting to happen...
Additionally, the absence of scheduled control of entry for
instructions from the front end into the execution pipe prevents
the instruction queue from being able to correlate operands with
instructions in the (frequent) event of a collision. This results
in a increased risk of instructions executing with other
instructions' operands and an added "confirm" logic latency in
the pay pipestage. All in all the new design strikes me as an
overly ambitious attempt at optimization which has resulted in a
drive-through model which offers no significant benefit over the
simpler model but plenty of drawbacks.

Of course, the analogy does have (at least) one gaping hole. In
a CPU pipeline an instruction doesn't get irritated when 3 other
instructions which were issued behind it end up executing before
it, dramatically increasing its latency through the system. *grumble*

I'd be really interested in seeing some system latency, throughput,
and error rate data comparing the old system to the new. I can't
imagine the new system shows any real benefit (although maybe I just
don't have a wild enough imagination). I suspect it is simply an
overarchitected mess. I hope they have someone doing performance
validation on it.


Jim Vaught

 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
thats great :D. but i haven't seen any mcdonald's such as the one described... all the ones around here are 3 stage, usually operating in a 2 stage "mode" where pay and pickup are combined, with the 3rd stage interface closed.
 

BD231

Lifer
Feb 26, 2001
10,568
138
106
When your hungry i'm sure the thought of how many windows a Micky D's has isent crossing your mind, and if you actualy cared you would obviously have to much free time on your hands. I'd say a critical thought like, "Why TF are there so many damn windows in the drive thru", is normal. Very amusing read ;)
 

Elledan

Banned
Jul 24, 2000
8,880
0
0
That one was great! :D

So that's what Intel engineers do when they're bored: looking for similarities between the chips they work on and the world around them (well, at least the world they're familiar with). I like that =)
 

kuk

Platinum Member
Jul 20, 2000
2,925
0
0
My guess is that this guy doesn't work for the P4 development team.


<< So they had a high performance 3 stage pipeline (order, pay, pickup) which worked rather well in my humble opinion. They decided to attempt to get really fancy ... >>



Not a flame, just food for thought. ;)

PS: very nice post pm :)
 

Agent004

Senior member
Mar 22, 2001
492
0
0


<< Not a flame, just food for thought >>



LOL :D

That's an excellent real example of piplining :)

But with 3 stages ;)
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Yea, a couple of the McDonalds around here have gone to this sort of system. I think the motivation is not to speed up processing so much as it is to form a double line of cars so the line doesn't back up into the street at the lunch rush.
 

Sohcan

Platinum Member
Oct 10, 1999
2,127
0
0


<< Additionally, the absence of scheduled control of entry for
instructions from the front end into the execution pipe prevents
the instruction queue from being able to correlate operands with
instructions in the (frequent) event of a collision. This results
in a increased risk of instructions executing with other
instructions' operands and an added "confirm" logic latency in
the pay pipestage.
>>

LOL, I got a kick out of that. :D

Perhaps McDonalds needs to be introduced to multiple reservation stations feeding specialized execution units (short orders vs. long orders?). And how do they expect the pipeline to deal with interrupts (worker shift changes? Bill Clinton issues an order? :)) and exceptions? (out of fries? catastrophic ketchup dispenser malfunctions?) :)
 

Shalmanese

Platinum Member
Sep 29, 2000
2,157
0
0
Phew, I thought you discovered that the secret sauce is actually a room temperature superconductor when combined with 2 cm^3 of sundae...

Oh sh!t, I've said too much...

But Cmon, Mcdonalds is dying for thread level parrelism, Software engineers would sell their mothers to be able to have an application so suited to parrelism. If you were ambitios, you could even implement hyperthreading which would reduce cost but increase latency slightly.

Anyway, If I were to ever like Mcdonalds food, my geeky engineer dream would be to be able to order my food via a wireless connection while travelling at 100Km/hr to a small booth which was wired into the main station and then have some osrt of overhead canapult sort of thing fire my food at 100Km/hr so that the food falls into my car via the sunroof/side windows. Of course, adequate design aspects would have to be considered so that the food can survive a acceleration up to 100Km/hr in a short amount of time and the ability to be dropped approximately 1 mr (remember, it is stationary relative to the car.

BTW: What ketchup disaster? Our ketchup comes in little packets.

 

pm

Elite Member Mobile Devices
Jan 25, 2000
7,419
22
81
I wasn't sure if it was HT, but I'm sure it's not OT.
 

Elledan

Banned
Jul 24, 2000
8,880
0
0


<< I wasn't sure if it was HT, but I'm sure it's not OT. >>

Seeing the comments added to this thread after its unfortunate move from HT to OT, I tend to agree with you.

I think the responsible mod read 'McDonalds' and immediately thought 'OT'.

Perhaps we need a new mod for HT only (I know, it has been suggested countless times before!).

Ah well, if anyone cares to take this issue to FI, go ahead :)