Midterm I SOLUTIONS March 30Th, 2011 CS252 Graduate Computer Architecture

Total Page:16

File Type:pdf, Size:1020Kb

Midterm I SOLUTIONS March 30Th, 2011 CS252 Graduate Computer Architecture University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2011 John Kubiatowicz Midterm I SOLUTIONS March 30th, 2011 CS252 Graduate Computer Architecture Your Name: SID Number: Problem Possible Score 1 20 2 30 3 30 4 20 Total 100 CS252 Graduate Computer Architecture Spring 2011 [ This page left for ] 3.141592653589793238462643383279502884197169399375105820974944 2 CS252 Graduate Computer Architecture Spring 2011 Question #1: Short Answer [20pts] Problem 1a[3pts]: Explain the difference between implicit and explicit register renaming. Can an architecture with Tomasulo scheduling use explicit register renaming? Explain. Implicit register renaming occurs as a consequence of scheduling, as evidenced by the original Tomasulo algorithm for the 360/91. It changes programmer-visible registers into internal tags or values. Explicit register renaming replaces user-visible register names with internal, physical register names. Often explicit register renaming is performed in a separate stage between the fetch stage and decoding / scheduling stages. Yes, an architecture with Tomasulo scheduling could use explicit register renaming on the entrance to the pipeline (to remove WAR/WAW hazards), then use reservation-stations to schedule instructions (removing RAW hazards); the scheduling would work with physical register names instead of tags. Problem 1b[3pts]: What are precise exceptions? Explain how precise exceptions are achieved in an architecture with explicit register renaming (such as the R10000 or 21264, both discussed in class)? Precise Exceptions are interruptions in the flow of instructions with a single identifiable instruction such that (1) all instructions prior to that instruction have committed their state and (2) neither the identified instruction nor any following instructions have altered the state of the machine. Machines with explicit register renaming can restore the state of the machine to a precise exception point by restoring the register rename mapping table (and freelist) to the value it had at the precise exception point. (i.e. such machines do not have to restore actual register values, since the correct values are still in the physical register file). Problem 1c[3pts]: What is simultaneous multithreading? What is the basic argument for using simultaneous multithreading? Simultaneous Multithreading is a multithreading technique that mixes instructions from multiple threads into a single superscalar pipeline, thereby getting higher utilization of the functional units. Instructions from different threads can be issued in the same cycle to the pipeline (the “simultaneous” part of SMT). The basic justification for simultaneous multithreading is that high- issue-rate processors typically have a lot of wasted issue slots. Problem 1d[2pts]: What was one of the main insights of the RISC work? Hint: simply reducing instructions was a consequence, not an insight. One of the most important lessons of the RISC work was that computer designers should consider the whole picture (including both software and hardware layers) rather than micro-optimizing any one layer (such as the hardware). RISC also placed a strong focus on measurement and benchmarks as providing objective mechanisms for evaluating performance. 3 CS252 Graduate Computer Architecture Spring 2011 Problem 1e[3pts]: Yeh and Patt described two different types of branch predictors: those that exploit correlation between successive branches (global history) and those that exploit the past behavior of each branch in isolation (local history). Does it make sense to combine these ideas in some way? Why or why not? How would you combine them? Explain with a block diagram. Yes, it makes sense to combine both GA and PA styles of branch prediction; we read at least two papers that showed that different branches are best handled by different algorithms (because they have different behavior). The easiest way to combine them is to use a tournament branch predictor the uses one predictor to determine the type of prediction to use for each branch, then uses two other predictors to perform each type of prediction. A generic diagram for a tournament predictor is as follows: addr history chooser Predictor A Predictor B Problem 1f[3pts]: Why does it make sense to use trace scheduling with a VLIW? What is the structure of the resulting code? Is there any relationship between trace scheduling and branch prediction? Since a VLIW is statically scheduled, every operation that is put into a single instruction must be able to actually be run in parallel (no stalling). Unfortunately, with typical programs, there are very few instructions in each block of code from which to choose a set of operations to run in parallel (typical code has a branch every 5 instructions). Trace scheduling picks a “high-probability” trace through the code and schedules all of the instructions along the trace as if they were in the same block (i.e. no branches). The resulting code has a lot of instructions running in parallel, with many potential exit points (where the original branches might disagree with the selected trace). The resulting code executes blocks of instructions followed by “fixup code” to handle undoing the result of incorrectly executed instructions along the trace. Yes, there is a relationship between trace scheduling and branch prediction: the trace represents a group of co-predicted branches (they are predicted to follow the trace). Problem 1g[3pts]: Why is it advantageous to speculate on memory dependencies between load and store instructions? Describe two techniques for performing such speculation. Most of the time, loads do not depend on stores that are in the pipeline at the same time. Thus, a conservative strategy that never launches loads until all dependencies are computed (i.e. addresses are known) can potentially lose performance (especially since we would like to start loads early to deal with cache misses). Assuming that one has a mechanism for recovering from mis-speculation (i.e. ROB), two possibilities are : (1) guess that loads with unknown dependencies never depend on prior stores (“naïve speculation”) or (2) try to learn the dependencies between loads and stores by starting with naïve speculation, then keeping extra information when such speculation fails (using extra bits in the cache or “store-sets” to track which stores a given load depends on). 4 CS252 Graduate Computer Architecture Spring 2011 EX1 EX2 EX3 … … F1/F2 D RROBOp FP1 FP2 FP3 FP4 FP5 Execution Pipeline 1 EX1 EX2 EX3 (Explicit) and Fetch and Initial Decode Initial Execution Pipeline 2 Selection Logic Selection Operand Operand Fetch Ready Instruction Register Writeback Reorder Buffer and Register Renaming Ready Branch Target Buffer Branch Target Renamed EX EX EX … Instructions Instructions 1 2 3 Addr MEM1 MEM2 TagC Execution Pipeline 3 Problem #2: Out-of-Order Superscalar Processor [30pts] In this problem, we will explore a three-way superscalar processor. As shown in the above figure, this processor has two execution pipelines – each of which is slightly different. All three pipelines can execute Integer operations in a single cycle (such as arithmetic ops or branch conditions) and can execute Galois Field operations in 3 cycles. In addition, Pipeline 1 can execute floating point operations: addf (2 cycles), multf (3 cycles), divf (5 cycles). Further, Pipeline 3 can execute memory operations in 4 cycles, the first cycle of which computes the address, the second two cycles of which perform the actual data cache operation, and the fourth cycle of which performs a “Tag Check” to match the current memory operation against the data cache. All operations are fully pipelined. Thus, for instance, multiple load operations can be in different stages of Pipe 3 at the same time. The earlier part of the pipeline, namely instruction management consists of 6 stages: Stages F1 and F2 handle fetching up to three instructions at a time from the instruction cache and are completely pipelined (the instruction cache takes two cycles to fetch instructions). A Branch Target Buffer (BTB) helps to compute the next address. Stage D begins decoding the instructions and computing target addresses Stage R explicitly renames registers for three instructions at a time. This stage also performs an initial instruction decode and checks the instruction cache tags. Stage ROB is a Reorder buffer and Ready Instruction Selection stage. The ROB stage can select up to three instructions to pass onto the Op stage. The ROB stage must make sure that the instructions that it selects are ready to go (i.e. will have all arguments by the time they exit the Op stage) and that they can all execute simultaneously (e.g. it cannot select two floating point instructions in same cycle). Stage Op fetches operands for three instructions from the register file and/or other stages of the processor. It further decodes the instructions. Problem 2a[2pts]: What is the minimum number of instructions that we must flush on a branch misprediction? Explain, assuming that branches are completed in the EX1 stage. If we assume that the branch is the latest instruction in its group of three fetched instructions (i.e. no instructions were fetched after the branch during the cycle in which we fetched the branch), then the answer is 18: if the branch makes it through execution in the fastest possible number of cycles, then it will be done in 7 cycles (from fetch to execution). This 7 cycles includes 6×3=18 instructions after the branch.
Recommended publications
  • Review Memory Disambiguation Review Explicit Register Renaming
    5HYLHZ5HRUGHU%XIIHU 52% &6 *UDGXDWH&RPSXWHU$UFKLWHFWXUH 8VHRIUHRUGHUEXIIHU /HFWXUH ² ,QRUGHULVVXH2XWRIRUGHUH[HFXWLRQ,QRUGHUFRPPLW ² +ROGVUHVXOWVXQWLOWKH\FDQEHFRPPLWWHGLQRUGHU ,QVWUXFWLRQ/HYHO3DUDOOHOLVP ª 6HUYHVDVVRXUFHRIYDOXHVXQWLOLQVWUXFWLRQVFRPPLWWHG ² 3URYLGHVVXSSRUWIRUSUHFLVHH[FHSWLRQV6SHFXODWLRQVLPSO\WKURZRXW *HWWLQJWKH&3, LQVWUXFWLRQVODWHUWKDQH[FHSWHGLQVWUXFWLRQ ² &RPPLWVXVHUYLVLEOHVWDWHLQLQVWUXFWLRQRUGHU ² 6WRUHVVHQWWRPHPRU\V\VWHPRQO\ZKHQWKH\UHDFKKHDGRIEXIIHU 6HSWHPEHU ,Q2UGHU&RPPLW LVLPSRUWDQWEHFDXVH 3URI-RKQ.XELDWRZLF] ² $OORZVWKHJHQHUDWLRQRISUHFLVHH[FHSWLRQV ² $OORZVVSHFXODWLRQDFURVVEUDQFKHV &6.XELDWRZLF] &6.XELDWRZLF] /HF /HF 5HYLHZ0HPRU\'LVDPELJXDWLRQ 5HYLHZ([SOLFLW5HJLVWHU5HQDPLQJ 4XHVWLRQ*LYHQDORDGWKDWIROORZVDVWRUHLQSURJUDP 0DNHXVHRIDSK\VLFDO UHJLVWHUILOHWKDWLVODUJHUWKDQ RUGHUDUHWKHWZRUHODWHG" QXPEHURIUHJLVWHUVVSHFLILHGE\,6$ ² 7U\LQJWRGHWHFW5$:KD]DUGVWKURXJKPHPRU\ .H\LQVLJKW$OORFDWHDQHZSK\VLFDOGHVWLQDWLRQUHJLVWHU ² 6WRUHVFRPPLWLQRUGHU 52% VRQR:$5:$:PHPRU\KD]DUGV IRUHYHU\LQVWUXFWLRQWKDWZULWHV ,PSOHPHQWDWLRQ ² 5HPRYHVDOOFKDQFHRI:$5RU:$:KD]DUGV ² .HHSTXHXHRIVWRUHVLQSURJRUGHU ² 6LPLODUWRFRPSLOHUWUDQVIRUPDWLRQFDOOHG6WDWLF6LQJOH$VVLJQPHQW ² :DWFKIRUSRVLWLRQRIQHZORDGVUHODWLYHWRH[LVWLQJVWRUHV ª /LNHKDUGZDUHEDVHGG\QDPLFFRPSLODWLRQ" :KHQKDYHDGGUHVVIRUORDGFKHFNVWRUHTXHXH 0HFKDQLVP".HHSDWUDQVODWLRQWDEOH ² ,IDQ\ VWRUHSULRUWRORDGLVZDLWLQJIRULWVDGGUHVVVWDOOORDG ² ,6$UHJLVWHU⇒ SK\VLFDOUHJLVWHUPDSSLQJ ² ,IORDGDGGUHVVPDWFKHVHDUOLHUVWRUHDGGUHVV DVVRFLDWLYHORRNXS ² :KHQUHJLVWHUZULWWHQUHSODFHHQWU\ZLWKQHZUHJLVWHUIURPIUHHOLVW WKHQZHKDYHDPHPRU\LQGXFHG
    [Show full text]
  • Computer Science 246 Computer Architecture Spring 2010 Harvard University
    Computer Science 246 Computer Architecture Spring 2010 Harvard University Instructor: Prof. David Brooks [email protected] Dynamic Branch Prediction, Speculation, and Multiple Issue Computer Science 246 David Brooks Lecture Outline • Tomasulo’s Algorithm Review (3.1-3.3) • Pointer-Based Renaming (MIPS R10000) • Dynamic Branch Prediction (3.4) • Other Front-end Optimizations (3.5) – Branch Target Buffers/Return Address Stack Computer Science 246 David Brooks Tomasulo Review • Reservation Stations – Distribute RAW hazard detection – Renaming eliminates WAW hazards – Buffering values in Reservation Stations removes WARs – Tag match in CDB requires many associative compares • Common Data Bus – Achilles heal of Tomasulo – Multiple writebacks (multiple CDBs) expensive • Load/Store reordering – Load address compared with store address in store buffer Computer Science 246 David Brooks Tomasulo Organization From Mem FP Op FP Registers Queue Load Buffers Load1 Load2 Load3 Load4 Load5 Store Load6 Buffers Add1 Add2 Mult1 Add3 Mult2 Reservation To Mem Stations FP adders FP multipliers Common Data Bus (CDB) Tomasulo Review 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 LD F0, 0(R1) Iss M1 M2 M3 M4 M5 M6 M7 M8 Wb MUL F4, F0, F2 Iss Iss Iss Iss Iss Iss Iss Iss Iss Ex Ex Ex Ex Wb SD 0(R1), F0 Iss Iss Iss Iss Iss Iss Iss Iss Iss Iss Iss Iss Iss M1 M2 M3 Wb SUBI R1, R1, 8 Iss Ex Wb BNEZ R1, Loop Iss Ex Wb LD F0, 0(R1) Iss Iss Iss Iss M Wb MUL F4, F0, F2 Iss Iss Iss Iss Iss Ex Ex Ex Ex Wb SD 0(R1), F0 Iss Iss Iss Iss Iss Iss Iss Iss Iss M1 M2
    [Show full text]
  • ARM Cortex-A* Brian Eccles, Riley Larkins, Kevin Mee, Fred Silberberg, Alex Solomon, Mitchell Wills
    ARM Cortex-A* Brian Eccles, Riley Larkins, Kevin Mee, Fred Silberberg, Alex Solomon, Mitchell Wills The ARM Cortex­A product line has changed significantly since the introduction of the Cortex­A8 in 2005. ARM’s next major leap came with the Cortex­A9 which was the first design to incorporate multiple cores. The next advance was the development of the big.LITTLE architecture, which incorporates both high performance (A15) and high efficiency(A7) cores. Most recently the A57 and A53 have added 64­bit support to the product line. The ARM Cortex series cores are all made up of the main processing unit, a L1 instruction cache, a L1 data cache, an advanced SIMD core and a floating point core. Each processor then has an additional L2 cache shared between all cores (if there are multiple), debug support and an interface bus for communicating with the rest of the system. Multi­core processors (such as the A53 and A57) also include additional hardware to facilitate coherency between cores. The ARM Cortex­A57 is a 64­bit processor that supports 1 to 4 cores. The instruction pipeline in each core supports fetching up to three instructions per cycle to send down the pipeline. The instruction pipeline is made up of a 12 stage in order pipeline and a collection of parallel pipelines that range in size from 3 to 15 stages as seen below. The ARM Cortex­A53 is similar to the A57, but is designed to be more power efficient at the cost of processing power. The A57 in order pipeline is made up of 5 stages of instruction fetch and 7 stages of instruction decode and register renaming.
    [Show full text]
  • Sections 3.2 and 3.3 Dynamic Scheduling – Tomasulo's Algorithm
    EEF011 Computer Architecture 計算機結構 Sections 3.2 and 3.3 Dynamic Scheduling – Tomasulo’s Algorithm 吳俊興 高雄大學資訊工程學系 October 2004 A Dynamic Algorithm: Tomasulo’s Algorithm • For IBM 360/91 (before caches!) – 3 years after CDC • Goal: High Performance without special compilers • Small number of floating point registers (4 in 360) prevented interesting compiler scheduling of operations – This led Tomasulo to try to figure out how to get more effective registers — renaming in hardware! • Why Study 1966 Computer? • The descendants of this have flourished! – Alpha 21264, HP 8000, MIPS 10000, Pentium III, PowerPC 604, … Example to eleminate WAR and WAW by register renaming • Original DIV.D F0, F2, F4 ADD.D F6, F0, F8 S.D F6, 0(R1) SUB.D F8, F10, F14 MUL.D F6, F10, F8 WAR between ADD.D and SUB.D, WAW between ADD.D and MUL.D (Due to that DIV.D needs to take much longer cycles to get F0) • Register renaming DIV.D F0, F2, F4 ADD.D S, F0, F8 S.D S, 0(R1) SUB.D T, F10, F14 MUL.D F6, F10, T Tomasulo Algorithm • Register renaming provided – by reservation stations, which buffer the operands of instructions waiting to issue – by the issue logic • Basic idea: – a reservation station fetches and buffers an operand as soon as it is available, eliminating the need to get the operand from a register (WAR) – pending instructions designate the reservation station that will provide their input (RAW) – when successive writes to a register overlap in execution, only the last one is actually used to update the register (WAW) As instructions are issued, the register specifiers for pending operands are renamed to the names of the reservation station, which provides register renaming • more reservation stations than real registers Properties of Tomasulo Algorithm 1.
    [Show full text]
  • Multiple Instruction Issue and Completion Per Clock Cycle Using Tomasulo’S Algorithm – a Simple Example
    Multiple Instruction Issue and Completion per Clock Cycle Using Tomasulo’s Algorithm – A Simple Example Assumptions: . The processor has in-order issue but execution may be out-of-order as it is done as soon after issue as operands are available. Instructions commit as they finish execu- tion. There is no speculative execution on Branch instructions because out-of-order com- pletion prevents backing out incorrect results. The reason for the out-of-order com- pletion is that there is no buffer between results from the execution and their com- mitment in the register file. This restriction is just to keep the example simple. It is possible for at least two instructions to issue in a cycle. The processor has two integer ALU’s with one Reservation Station each. ALU op- erations complete in one cycle. We are looking at the operation during a sequence of arithmetic instructions so the only Functional Units shown are the ALU’s. NOTES: Customarily the term “issue” is the transition from ID to the window for dy- namically scheduled machines and dispatch is the transition from the window to the FU’s. Since this machine has an in-order window and dispatch with no speculation, I am using the term “issue” for the transition to the reservation stations. It is possible to have multiple reservation stations in front of a single functional unit. If two instructions are ready for execution on that unit at the same clock cycle, the lowest station number executes. There is a problem with exception processing when there is no buffering of results being committed to the register file because some register entries may be from instructions past the point at which the exception occurred.
    [Show full text]
  • Out-Of-Order Execution & Register Renaming
    Asanovic/Devadas Spring 2002 6.823 Out-of-Order Execution & Register Renaming Krste Asanovic Laboratory for Computer Science Massachusetts Institute of Technology Asanovic/Devadas Spring 2002 6.823 Scoreboard for In-order Issue Busy[unit#] : a bit-vector to indicate unit’s availability. (unit = Int, Add, Mult, Div) These bits are hardwired to FU's. WP[reg#] : a bit-vector to record the registers for which writes are pending Issue checks the instruction (opcode dest src1 src2) against the scoreboard (Busy & WP) to dispatch FU available? not Busy[FU#] RAW? WP[src1] or WP[src2] WAR? cannot arise WAW? WP[dest] Asanovic/Devadas Spring 2002 Out-of-Order Dispatch 6.823 ALU Mem IF ID Issue WB Fadd Fmul • Issue stage buffer holds multiple instructions waiting to issue. • Decode adds next instruction to buffer if there is space and the instruction does not cause a WAR or WAW hazard. • Any instruction in buffer whose RAW hazards are satisfied can be dispatched (for now, at most one dispatch per cycle). On a write back (WB), new instructions may get enabled. Asanovic/Devadas Spring 2002 6.823 Out-of-Order Issue: an example latency 1 LD F2, 34(R2) 1 1 2 2 LD F4, 45(R3) long 3 MULTD F6, F4, F2 3 4 3 4 SUBD F8, F2, F2 1 5 5 DIVD F4, F2, F8 4 6 ADDD F10, F6, F4 1 6 In-order: 1 (2,1) . 2 3 4 4 3 5 . 5 6 6 Out-of-order: 1 (2,1) 4 4 . 2 3 . 3 5 .
    [Show full text]
  • Dynamic Register Renaming Through Virtual-Physical Registers
    Dynamic Register Renaming Through Virtual-Physical Registers † Teresa Monreal [email protected] Antonio González* [email protected] Mateo Valero* [email protected] †† José González [email protected] † Víctor Viñals [email protected] †Departamento de Informática e Ing. de Sistemas. Centro Politécnico Superior - Univ. de Zaragoza, Zaragoza, Spain. *Departament d’ Arquitectura de Computadors. Universitat Politècnica de Catalunya, Barcelona, Spain. ††Departamento de Ingeniería y Tecnología de Computadores. Universidad de Murcia, Murcia, Spain. Abstract Register file access time represents one of the critical delays of current microprocessors, and it is expected to become more critical as future processors increase the instruction window size and the issue width. This paper present a novel dynamic register renaming scheme that delays the allocation of physical registers until a late stage in the pipeline. We show that it can provide important savings in number of physical registers so it can significantly shorter the register file access time. Delaying the allocation of physical registers requires some artifact to keep track of dependences. This is achieved by introducing the concept of virtual-physical registers, which are tags that do not require any storage location. The proposed renaming scheme shortens the average number of cycles that each physical register is allocated, and allows for an early execution of instructions since they can obtain a physical register for its destination earlier than with the conventional scheme. Early execution is especially beneficial for branches and memory operations, since the former can be resolved earlier and the latter can prefetch their data in advance. 1. Introduction Dynamically-scheduled superscalar processors exploit instruction-level parallelism (ILP) by overlapping the execution of instructions in an instruction window.
    [Show full text]
  • Computer Architecture Out-Of-Order Execution
    Computer Architecture Out-of-order Execution By Yoav Etsion With acknowledgement to Dan Tsafrir, Avi Mendelson, Lihu Rappoport, and Adi Yoaz 1 Computer Architecture 2013– Out-of-Order Execution The need for speed: Superscalar • Remember our goal: minimize CPU Time CPU Time = duration of clock cycle × CPI × IC • So far we have learned that in order to Minimize clock cycle ⇒ add more pipe stages Minimize CPI ⇒ utilize pipeline Minimize IC ⇒ change/improve the architecture • Why not make the pipeline deeper and deeper? Beyond some point, adding more pipe stages doesn’t help, because Control/data hazards increase, and become costlier • (Recall that in a pipelined CPU, CPI=1 only w/o hazards) • So what can we do next? Reduce the CPI by utilizing ILP (instruction level parallelism) We will need to duplicate HW for this purpose… 2 Computer Architecture 2013– Out-of-Order Execution A simple superscalar CPU • Duplicates the pipeline to accommodate ILP (IPC > 1) ILP=instruction-level parallelism • Note that duplicating HW in just one pipe stage doesn’t help e.g., when having 2 ALUs, the bottleneck moves to other stages IF ID EXE MEM WB • Conclusion: Getting IPC > 1 requires to fetch/decode/exe/retire >1 instruction per clock: IF ID EXE MEM WB 3 Computer Architecture 2013– Out-of-Order Execution Example: Pentium Processor • Pentium fetches & decodes 2 instructions per cycle • Before register file read, decide on pairing Can the two instructions be executed in parallel? (yes/no) u-pipe IF ID v-pipe • Pairing decision is based… On data
    [Show full text]
  • Tomasulo's Algorithm
    Out-of-Order Execution Several implementations • out-of-order completion • CDC 6600 with scoreboarding • IBM 360/91 with Tomasulo’s algorithm & reservation stations • out-of-order completion leads to: • imprecise interrupts • WAR hazards • WAW hazards • in-order completion • MIPS R10000/R12000 & Alpha 21264/21364 with large physical register file & register renaming • Intel Pentium Pro/Pentium III with the reorder buffer Autumn 2006 CSE P548 - Tomasulo 1 Out-of-order Hardware In order to compute correct results, need to keep track of: • which instruction is in which stage of the pipeline • which registers are being used for reading/writing & by which instructions • which operands are available • which instructions have completed Each scheme has different hardware structures & different algorithms to do this Autumn 2006 CSE P548 - Tomasulo 2 1 Tomasulo’s Algorithm Tomasulo’s Algorithm (IBM 360/91) • out-of-order execution capability plus register renaming Motivation • long FP delays • only 4 FP registers • wanted common compiler for all implementations Autumn 2006 CSE P548 - Tomasulo 3 Tomasulo’s Algorithm Key features & hardware structures • reservation stations • distributed hazard detection & execution control • forwarding to eliminate RAW hazards • register renaming to eliminate WAR & WAW hazards • deciding which instruction to execute next • common data bus • dynamic memory disambiguation Autumn 2006 CSE P548 - Tomasulo 4 2 Hardware for Tomasulo’s Algorithm Autumn 2006 CSE P548 - Tomasulo 5 Tomasulo’s Algorithm: Key Features Reservation
    [Show full text]
  • Hardware-Sensitive Database Operations - II
    Faculty of Computer Science Database and Software Engineering Group Hardware-Sensitive Database Operations - II Balasubramanian (Bala) Gurumurthy Advanced Topics in Databases, 2019/May/17 Otto-von-Guericke University of Magdeburg So Far... ● Hardware evolution and current challenges ● Hardware-oblivious vs. hardware-sensitive programming ● Pipelining in RISC computing ● Pipeline Hazards ○ Structural hazard ○ Data hazard ○ Control hazard ● Resolving hazards ○ Loop-Unrolling ○ Predication Bala Gurumurthy | Hardware-Sensitive Database Operations Part II We will see ● Vectorization ○ SIMD Execution ○ SIMD in DBMS Operation ● GPUs in DBMSs ○ Processing Model ○ Handling Synchronization Bala Gurumurthy | Hardware-Sensitive Database Operations Vectorization Leveraging Modern Processing Capabilities Hardware Parallelism One we know already: Pipelining ● Separate chip regions for individual tasks to execute independently ● Advantage: parallelism + sequential execution semantics ● We discussed problems of hazards ● VLSI tech. limits degree up to which pipelining is feasible [Kaeslin, 2008] Bala Gurumurthy | Hardware-Sensitive Database Operations Hardware Parallelism Chip area can be used for other types of parallelism: Computer systems typically use identical hardware circuits, but their function may be controlled by different instruction stream Si: Bala Gurumurthy | Hardware-Sensitive Database Operations Special instances Example of this architecture? Bala Gurumurthy | Hardware-Sensitive Database Operations Special instances Example of this architecture?
    [Show full text]
  • Trends in Processor Architecture
    A. González Trends in Processor Architecture Trends in Processor Architecture Antonio González Universitat Politècnica de Catalunya, Barcelona, Spain 1. Past Trends Processors have undergone a tremendous evolution throughout their history. A key milestone in this evolution was the introduction of the microprocessor, term that refers to a processor that is implemented in a single chip. The first microprocessor was introduced by Intel under the name of Intel 4004 in 1971. It contained about 2,300 transistors, was clocked at 740 KHz and delivered 92,000 instructions per second while dissipating around 0.5 watts. Since then, practically every year we have witnessed the launch of a new microprocessor, delivering significant performance improvements over previous ones. Some studies have estimated this growth to be exponential, in the order of about 50% per year, which results in a cumulative growth of over three orders of magnitude in a time span of two decades [12]. These improvements have been fueled by advances in the manufacturing process and innovations in processor architecture. According to several studies [4][6], both aspects contributed in a similar amount to the global gains. The manufacturing process technology has tried to follow the scaling recipe laid down by Robert N. Dennard in the early 1970s [7]. The basics of this technology scaling consists of reducing transistor dimensions by a factor of 30% every generation (typically 2 years) while keeping electric fields constant. The 30% scaling in the dimensions results in doubling the transistor density (doubling transistor density every two years was predicted in 1975 by Gordon Moore and is normally referred to as Moore’s Law [21][22]).
    [Show full text]
  • Tomasulo's Algorithm
    Lecture-12 (Tomasulo’s Algorithm) CS422-Spring 2018 Biswa@CSE-IITK Another Dynamic One: Tomasulo’s Algorithm • For IBM 360/91 about 3 years after CDC 6600 (1966) • Goal: High Performance without special compilers • Differences between IBM 360 & CDC 6600 ISA – IBM has only 2 register specifiers/instruction vs. 3 in CDC 6600 – IBM has 4 FP registers vs. 8 in CDC 6600 – IBM has memory-register ops • Why Study? lead to Alpha 21264, HP 8000, MIPS 10000, Pentium II, PowerPC 604, … CS422: Spring 2018 Biswabandan Panda, CSE@IITK 2 Tomasulo’s Organization From Mem FP Op FP Registers Queue Load Buffers Load1 Load2 Load3 Load4 Load5 Store Load6 Buffers Add1 Add2 Mult1 Add3 Mult2 Reservation To Mem Stations FP adders FP multipliers CS422: Spring 2018 Biswabandan Panda, CSE@IITK 3 Tomasulo vs Scoreboard • Control & buffers distributed with Function Units (FU) vs. centralized in scoreboard; – FU buffers called “reservation stations”; have pending operands • Registers in instructions replaced by values or pointers to reservation stations(RS); called register renaming ; – avoids WAR, WAW hazards – More reservation stations than registers, so can do optimizations compilers can’t • Results to FU from RS, not through registers, over Common Data Bus that broadcasts results to all FUs • Load and Stores treated as FUs with RSs as wells CS422: Spring 2018 Biswabandan Panda, CSE@IITK 4 Reservation Station Components Op: Operation to perform in the unit (e.g., + or –) Vj, Vk: Value of Source operands – Store buffers has V field, result to be stored Qj, Qk: Reservation stations producing source registers (value to be written) – Note: No ready flags as in Scoreboard; Qj,Qk=0 => ready – Store buffers only have Qi for RS producing result Busy: Indicates reservation station or FU is busy Register result status—Indicates which functional unit will write each register, if one exists.
    [Show full text]