It may be a stupid question but I'm not able to find a clear explanation about these 2 phases of an instruction life. My initial thinking was that they are synonymous but I'm not sure anymore. I start to think that
Is this wrong ? Does anyone have 2 clears definitions of those terms ?
Cheers.
Modern processors execute much more instructions that the program flow needs. This is called "speculative execution". Then the instructions that were "proven" as indeed needed by flow are "retired". You can think about "retired" instuctions as only instructions needed by the program flow.
an instruction commits only if it and all instructions before. it have completed successfully (without an exception) • To preserve precise exceptions, a result is written into the. register file only when the instruction commits – until then, the result is saved in a temporary register in the ROB.
Out-of-order execution can be achieved by executing the instruction in an different from the original order they appear[1]. Out-of-order execution is an approach that is used in high performance microprocessors.
A re-order buffer (ROB) is used in a Tomasulo algorithm for out-of-order instruction execution. It allows instructions to be committed in-order. Normally, there are three stages of instructions: "Issue", "Execute", "Write Result".
These terms have no standard definitions. I have seen them being used to mean different things in different books or processor designs:
In Intel processors, retirement occurs when the reorder buffer entries occupied by the instruction get deallcoated. Memory stores have one additional stage called commit in which the store is actually performed. That's because Intel processors have store buffers where stores can be marked as retired.1
Hennessy and Patterson's book mostly uses the term "commit" in the chapter on out-of-order execution. Even stores get performed in the commit stage. Sometimes it uses the term "retire" but without giving a definition that would distinguish it from commit. However, in Appendix C, stores are performed in the 4th stage, called the memory stage, while register updates are performed in the 5th stage, which is called writeback.
The terms might be used to mean other things in other contexts. Generally, you can deduce what they mean from the way they are being used by the author and from the overall context.
Footnote 1: Intel has a patent on an alternate implementation that allows stores to leave the store buffer out-of-order, which they don't implement it in any of their CPUs.
It would be possible to commit stores out-of-order before retirement if the L1D is equipped with a mechanism to distinguish between the globally visible state and the locally visible state of each valid cache line in the cache. This mechanism would be needed to maintain the visible order of the stores. In this hypothetical design, it's also possible to commit stores speculatively, which would require flushing (some of or all the) locally visible states on mispredictions. A store buffer entry that holds a store could optionally be freed when the store commits even if it did not retire yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With