1 tomasulo’s algorithm and ibm 360 srivathsan soundararajan

18
1 Tomasulo’s Tomasulo’s Algorithm and IBM Algorithm and IBM 360 360 Srivathsan Soundararajan Srivathsan Soundararajan

Upload: parker-petteys

Post on 16-Dec-2015

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

11

Tomasulo’s Algorithm Tomasulo’s Algorithm and IBM 360and IBM 360

Srivathsan SoundararajanSrivathsan Soundararajan

Page 2: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

22

What we have seen till now!!!What we have seen till now!!!

Single-cycle datapath.Single-cycle datapath.

Multi-cycle datapath.Multi-cycle datapath.

N-stage Pipelined datapath.N-stage Pipelined datapath.

Page 3: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

33

Tomasulo's algorithmTomasulo's algorithm

A hardware algorithm for controlling the A hardware algorithm for controlling the execution of multiple functional units with execution of multiple functional units with varying latencies in a pipelined CPU varying latencies in a pipelined CPU micro-architecture. micro-architecture. A general mechanism for register A general mechanism for register forwarding and hazard detection.forwarding and hazard detection.The key idea is to virtually execute each The key idea is to virtually execute each instruction in a single cycle.instruction in a single cycle.Out-of-order execution of instructions.Out-of-order execution of instructions.

Page 4: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

44

So what is so special???So what is so special???

Let instructions behind stall proceed.Let instructions behind stall proceed.

Decode instructions and check for Decode instructions and check for structural hazard.structural hazard.

Wait until no data hazard and then read Wait until no data hazard and then read operands.operands.

Page 5: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

55

Three StagesThree Stages

Issue – if reservation station free (i.e. no Issue – if reservation station free (i.e. no structural hazard), control issues instruction and structural hazard), control issues instruction and sends operands (renames registers).sends operands (renames registers).

Execution – if both operands ready, then Execution – if both operands ready, then execute. If not, watch common data bus for execute. If not, watch common data bus for result.result.

Write result – if CDB available, write on common Write result – if CDB available, write on common data bus to all awaiting units; mark reservation data bus to all awaiting units; mark reservation status availablestatus available

Page 6: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

66

Virtual result – a promissory noteVirtual result – a promissory note

All registers are modified so that they can either All registers are modified so that they can either hold a true result or a virtual result.hold a true result or a virtual result.

When an instruction is issued, a virtual result is When an instruction is issued, a virtual result is placed in the instruction's destination register.placed in the instruction's destination register.

A functional unit is assigned to compute the real A functional unit is assigned to compute the real result. result.

The virtual result is replaced by the real result The virtual result is replaced by the real result when the functional unit has completed its when the functional unit has completed its computation.computation.

Page 7: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

77

Tomasulo OrganizationTomasulo Organization

Page 8: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

88

The conceptThe concept

Each instruction, as it arrives, fetches its Each instruction, as it arrives, fetches its operands from a special register file. operands from a special register file. Each register in this file holds either an actual Each register in this file holds either an actual value, or a “tag” indicating the reservation value, or a “tag” indicating the reservation station that will produce the register value when station that will produce the register value when it completes. it completes. The instruction and its operands (either values The instruction and its operands (either values or tags) are stored in a reservation station (RS).or tags) are stored in a reservation station (RS).The RS watches the results returning from the The RS watches the results returning from the execution pipelines, and when a result's tag execution pipelines, and when a result's tag matches one of its operands, it records the value matches one of its operands, it records the value in place of the tag in place of the tag

Page 9: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

99

A good exampleA good example

http://www.cs.umd.edu/users/saltz/cmsc41http://www.cs.umd.edu/users/saltz/cmsc411-s97/tomasulo.htm1-s97/tomasulo.htm

Page 10: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1010

Why Tomasulo’s AlgorithmWhy Tomasulo’s Algorithm

Hazard detection.Hazard detection.

Dynamic Scheduling (i.e. Hardware Dynamic Scheduling (i.e. Hardware reorganizes instructions)reorganizes instructions)

Page 11: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1111

IBM 360IBM 360

The IBM 360 introduced many new The IBM 360 introduced many new concepts, including dynamic detection of concepts, including dynamic detection of memory hazards, generalized forwarding, memory hazards, generalized forwarding, and reservation stations.and reservation stations.

The approach is normally named The approach is normally named Tomasulo’s algorithmTomasulo’s algorithm

Page 12: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1212

Installation of the IBM 360/91 in the Columbia Computer Center Installation of the IBM 360/91 in the Columbia Computer Center machine room in February or March 1969 machine room in February or March 1969

Photo: AIS archive.

Page 13: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1313

IBM 360IBM 360

Was introduced by the team led by Michael Flynn in Was introduced by the team led by Michael Flynn in 1966.1966.The internal organization of the 360/91 shares many The internal organization of the 360/91 shares many features with the Pentium III and Pentium 4, as well as features with the Pentium III and Pentium 4, as well as several other microprocessors. several other microprocessors. One major difference was that there was no branch One major difference was that there was no branch prediction in the 360/91 and hence no speculation.prediction in the 360/91 and hence no speculation.Another major difference was that there was no commit Another major difference was that there was no commit unit, so once the instructions finished execution, they unit, so once the instructions finished execution, they updated the registers. Out-of-order instruction commit updated the registers. Out-of-order instruction commit led to led to imprecise interruptsimprecise interrupts, which proved to be unpopular , which proved to be unpopular and led to the commit units in dynamically scheduled and led to the commit units in dynamically scheduled pipelined processors since that time.pipelined processors since that time.

Page 14: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1414

IBM 360IBM 360

Although the 360/91 was not a success, the key Although the 360/91 was not a success, the key ideas were resurrected later and exist in some ideas were resurrected later and exist in some form in the majority of microprocessors like form in the majority of microprocessors like Pentium II, Power PC 604 etc...Pentium II, Power PC 604 etc...

It ran under Operating System/360 -- a powerful It ran under Operating System/360 -- a powerful programming package of approximately 1.5 programming package of approximately 1.5 million instructions that enabled the system to million instructions that enabled the system to

operate with virtually no manual intervention.operate with virtually no manual intervention.

Page 15: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1515

IBM 360IBM 360

Within the central processing unit (CPU), there Within the central processing unit (CPU), there were five highly autonomous execution units were five highly autonomous execution units which allowed the machine to overlap operations which allowed the machine to overlap operations and process many instructions simultaneously. and process many instructions simultaneously.

The five units were processor storage, storage The five units were processor storage, storage bus control, instruction processor, fixed-point bus control, instruction processor, fixed-point processor and floating-point processor. Not only processor and floating-point processor. Not only could these units operate concurrently, they could these units operate concurrently, they could also perform several functions at the same could also perform several functions at the same time.time.

Page 16: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1616

Some usesSome uses

The IBM-360 family of computers ranged The IBM-360 family of computers ranged from the model 20 minicomputer (which from the model 20 minicomputer (which typically had 24 KB of memory) to the typically had 24 KB of memory) to the model 91 supercomputer which was built model 91 supercomputer which was built for the North American missile defense for the North American missile defense system.system.

Page 17: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1717

Quite huge isnt it???Quite huge isnt it???

Page 18: 1 Tomasulo’s Algorithm and IBM 360 Srivathsan Soundararajan

1818

ReferencesReferences

http://www.d.umn.edu/~gshute/cs2521/arch/tomasulo.htmlhttp://www.d.umn.edu/~gshute/cs2521/arch/tomasulo.htmlhttp://euler.ecs.umass.edu/arch/parts/Part6-tomasulo.pdfhttp://euler.ecs.umass.edu/arch/parts/Part6-tomasulo.pdfhttp://www.cs.indiana.edu/classes/p415-sjoh/readings/smv/Cadencehttp://www.cs.indiana.edu/classes/p415-sjoh/readings/smv/CadenceSMV-docs/smv/tutorial/node36.html#tomasulo1SMV-docs/smv/tutorial/node36.html#tomasulo1http://www.beagle-ears.com/lars/engineer/comphist/ibm360.htmhttp://www.beagle-ears.com/lars/engineer/comphist/ibm360.htmhttp://www.eecs.ucf.edu/~lboloni/Teaching/EEL5708_2006/slides/http://www.eecs.ucf.edu/~lboloni/Teaching/EEL5708_2006/slides/Tomasulo.ppt#268,9,Three Stages of Tomasulo AlgorithmTomasulo.ppt#268,9,Three Stages of Tomasulo Algorithmhttp://www.cs.unc.edu/~montek/teaching/fall-03/lectures/lecture-http://www.cs.unc.edu/~montek/teaching/fall-03/lectures/lecture-11.ppt#723,4,Tomasulo: Organization11.ppt#723,4,Tomasulo: Organizationhttp://www.ece.cmu.edu/~jhoe/distribution/2005/741/proj3.pdfhttp://www.ece.cmu.edu/~jhoe/distribution/2005/741/proj3.pdfhttp://www.columbia.edu/acis/history/36091.htmlhttp://www.columbia.edu/acis/history/36091.html