1 / 16

Laundry Model

Laundry Model. Washer Drier Store Basket Wardrobe. running. idle. time. idle. running. time. Process Steps. 9.00. 10.00. 11.00. Load the washer at 9.00 Done at 10, load the drier Drier Done at 11. Wash then Dry 1 load takes 2 hours. 0.5. time.

Download Presentation

Laundry Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Laundry Model Washer Drier Store Basket Wardrobe Comp 3014 The Nature of Computing

  2. running idle time idle running time Process Steps 9.00 10.00 11.00 • Load the washer at 9.00 • Done at 10, load the drier • Drier Done at 11 Wash then Dry 1 load takes 2 hours 0.5 Comp 3014 The Nature of Computing

  3. time Sequential Process 13.00 15.00 9.00 11.00 • Load washer at 9.00 • Done at 10, load drier • Drier Done at 11 • Reload washer at 11 • Done at 12, load drier • Drier done at 13 • Reload washer at 13 • Done at 14, load drier • Done at 15 3 loads takes 6 hours 0.5 Comp 3014 The Nature of Computing

  4. time Overlapping Process 13.00 15.00 9.00 11.00 • Load washer at 9.00 • Done at 10, load drier reload washer • Both Done at 11. Reload drier reload washer • Both done at 12. Reload drier • Drier done at 13 From 10.00 till 11.00 both washer and dryer running concurrently 3 loads takes 4 hours 0.75 Comp 3014 The Nature of Computing

  5. time Washing Pipeline Filling 9.00 11.00 13.00 15.00 17.00 18.00 • 5 Cycles !!! • Get washing • Wash • Dry • Store • Put away 5 loads in 9 hours 0.55 Comp 3014 The Nature of Computing

  6. time Washing Pipeline Full 9.00 11.00 13.00 15.00 17.00 Pipe Full gives 1 load per hour 1.0 Comp 3014 The Nature of Computing

  7. Instruction reg X Y 0 X r0 1 Y r1 Code Memory r2 mdr W Data Memory ALU mar 7 W Can we Pipeline SAM ? 1.Fetch 2.Dec/Reg 3.ALU 4.Mem 5.RW Comp 3014 The Nature of Computing

  8. Pipelined Sam4 0 1 X Y X r0 Y r1 r2 Code Memory W Data Memory 7 time W 1.Fetch 2.Dec/Reg 3.ALU 4.Mem 5.RW Buffer Comp 3014 The Nature of Computing

  9. Mem Mem Reg Reg ALU time 5 Stages in Pipeline 1.Fetch 3.ALU 4.Mem 5.RW 2.Dec/Reg r1,r2 r3 add r3,r1,r2 add Let’s take the instruction add r3,r1,r2 and show which stage is needed for each part of the instruction. Comp 3014 The Nature of Computing

  10. ld add Mem r3 r4 r0 r1,r2 ALU time Two Instructions r0 ld r3,[r0+2] 2 add r4,r1,r2 Two instructions into the pipeline Comp 3014 The Nature of Computing

  11. Mem Mem Mem Mem Mem Mem Mem Mem Mem Mem Reg Reg Reg Reg Reg Reg Reg Reg Reg Reg ALU ALU ALU ALU ALU Structural Hazard Write (store) Here we are being asked to read from memory and write to it simultaneously. Impossible! st r0,[5] Solution – Use separate code and data memories add r4,r1,r2 Read (fetch) Comp 3014 The Nature of Computing

  12. time Hazardous Washing 9.00 11.00 13.00 15.00 17.00 18.00 Washing basket containes both clean and dirty washing! Comp 3014 The Nature of Computing

  13. Mem Mem Reg Reg ALU Mem Mem Reg Reg ALU Mem Mem Reg Reg ALU Mem Mem Reg Reg ALU Mem Mem Reg Reg ALU Code and Data Memories Comp 3014 The Nature of Computing

  14. add add r3 r4 r1,r2 r1,r3 time Data Hazard r3 set here add r3,r1,r2 add r4,r1,r3 but need r3 here EARLIER ! Comp 3014 The Nature of Computing

  15. Mem Mem Mem Mem Mem Mem Mem Mem Mem Mem Reg Reg Reg Reg Reg Reg Reg Reg Reg Reg ALU ALU ALU ALU ALU Data Hazard Need value of r3 for second instruction before the first is complete. add r3,r1,r2 add r4,r1,r3 Comp 3014 The Nature of Computing

  16. Mem Reg Reg ALU Mem Mem Mem Mem Mem Mem Mem Mem Reg Reg Reg Reg Reg Reg Reg Reg ALU ALU ALU ALU Pipeline Stalls add r3,r1,r2 Stall Mem Stall add r4,r1,r3 Resolve Hazard – Insert delay into second instruction stream. ‘Stall’ Cycles. But this needs extra electronics on the chip. Complex and Costly. Comp 3014 The Nature of Computing

More Related