Need help understanding In-Order/Out-of-Order CPU Architechtures

vanquished

Limp Gawd
Joined
Oct 29, 2002
Messages
359
heya guys, I've been reading some articles about multi core processors and the words In order and Out-of-Order cpu architechtures have been popping out. While i can kinda understand the idea behind an in order architechture, i am completely stumped by the out of order architechture. can someone explain to me how a program and be run 'out of order'? surely because of dependencies, and out of order architechture wouldn't be viable?
 
Can you cite the article so we have some context?

The ordering I know about is memory access ordering; there hasn't been a PC-class processor that guaranteed program order for memory access in quite a while.

Or are you taking about the pipeline ordering of actual instruction execution? There's a decent article on wikipedia about it, but it unfortunately doesn't include any references.
 
hey sorry, i was visiting japan last week so i had no internet access. Well i was reading the article on anandtech about PS3's cell processor. It's somewhere in the middle of the article where it mentions the in order/out of order stuff

thanks
 
Many CPUs reorder instructions to optimize performance. Suppose you've got a piece of code like this:
a = b + c
a = a + 5
d = e + f
These add instructions can be run in one cycle but take a lot more cycles to work thier way through the pipeline. (12 on an A64. I think it's 30 or so on a Prescott but I forget the exact number) That forces the CPU to wait until #1 is done before starting on #2. Since the second instruction depends on the result of the first and the third doesn't, it's faster to execute them in the order 1, 3, 2.
 
so the CPU has some kind of controller which can determine dependencies and reorder the code in the best way to maximise performance?
 
vanquished said:
so the CPU has some kind of controller which can determine dependencies and reorder the code in the best way to maximise performance?
You said it. It gets complicated because not only does one need hardware to detect reorder oportunities, but sometimes you need to put things back in the right order again once everything is done being computed (there are some guarantees about which order it appears as though instructions are processed).
 
Back
Top