本文将简要地介绍下 Tomasulo’s Algorithm,并推荐相关资料。将从如下两个方面进行介绍:

  1. 背景知识

  2. 算法流程

1. 背景知识

在指令集流水线中,会有Data hazards发生。

Data hazards occur when instructions that exhibit data dependence modify data in different stages of a pipeline. There are three situations in which a data hazard can occur:

  1. read after write (RAW)
  2. write after read (WAR)
  3. write after write (WAW)

为了解决Data hazards,Tomasulo’s Algorithm应运而生。

2. 算法流程

Tomasulo’s algorithm is a computer architecture hardware algorithm for dynamic scheduling of instructions that allows out-of-order execution and enables more efficient use of multiple execution units.

The major innovations of Tomasulo’s algorithm include register renaming in hardware, reservation stations for all execution units, and a common data bus (CDB) on which computed values broadcast to all reservation stations that may need them.

下面的截图源于:Dynamic Scheduling Using Tomasulo’s Algorithm

ps:推荐一下Prof. Dr. Ben H. Juurlink的体系结构课程。

For more details, just watch Dynamic Scheduling Using Tomasulo’s Algorithm and Dynamic Scheduling Using Tomasulo’s Algorithm Example


参考资料:

  1. Dynamic Scheduling Using Tomasulo’s Algorithm
  2. Tomasulo algorithm wikipedia