Computer Architecture ELEC3441
|
|
- Toby Powell
- 5 years ago
- Views:
Transcription
1 CPU-Memory Bottleeck Computer Architecture ELEC44 CPU Memory Lecture 8 Cache Dr. Hayde Kwok-Hay So Departmet of Electrical ad Electroic Egieerig Performace of high-speed computers is usually limited by memory badwidth & latecy Latecy (time for a sigle access) Memory access time >> Processor cycle time Badwidth (umber of accesses per uit time) if fractio m of istructios access memory +m memory refereces / istructio To achieve CPI =, we eed +m memory refs / cycle (assumig ISC-V ISA) d semester, '7-8 Badwidth vs Latecy Cache Memory Example: DD SDAM Latecy i the rage of 0-50 s Badwidth i the rage of.5- GT/s 0-0 GB/s CPU Cache Memory Moder processors: I the rage of - GHz clock rate Multiple istructio issues (-4 memory istructios at the same time) Multiple -8 cores Gap: Memory badwidth is -6x slower Latecy > 0x slower Same die Small, ast (SAM) Large, Slow (DAM) High speed memory that holds temporary copy of frequetly used data from mai memory Usually o the same die as the CPU Low latecy Typical: processor cycles Limited capacity (compared to mai memory) Typical: k to 0 Mbytes L cache d semester, '7-8 d semester, '7-8 4
2 Cache Operatio Overview CPU Cache Memory To access a memory locatio: Look up memory cotet from cache If foud, retur If ot foud, look ito memory Low latecy access statistically Need ways to make sure data that will be eeded are i cache d semester, '7-8 L$ L$ L$ Memory Hard Disk egister << SAM << DAM << Magetic disk Latecy egister << SAM << DAM << Magetic disk Badwidth o-chip Cost ($/bit) egister off-chip >> SAM >> >> DAM I/O bus >> Magetic disk The same cocept of creatig the illusio of fast ad large memory spas from register file to hard disk d semester, '7-8 6 eal Memory eferece Patters Capacity >> Memory Address (oe dot per access) CPU d semester, '7-8 5 Memory Hierarchy regfile Give illusio of a large + fast memory statistically Doald J. Hatfield, Jeaette Gerald: Program estructurig for Virtual Memory. IBM Systems Joural 0(): 68-9 (97) 7 Time 8
3 Typical Memory eferece Patters Two predictable properties of memory refereces: Istructio fetches Address loop iteratios Temporal Locality: If a locatio is refereced it is likely to be refereced agai i the ear future. Stack accesses subroutie call argumet access subroutie retur Spatial Locality: If a locatio is refereced it is likely that locatios ear it will be refereced i the ear future. accesses scalar accesses Time 9 0 Memory eferece Patters Caches exploit both types of predictability: Memory Address (oe dot per access) Spatial Locality Temporal Locality Exploit temporal locality by rememberig the cotets of recetly accessed locatios. Exploit spatial locality by fetchig blocks of data aroud recetly accessed locatios. Time Doald J. Hatfield, Jeaette Gerald: Program estructurig for Virtual Memory. IBM Systems Joural 0(): 68-9 (97)
4 Address Processor copy of mai memory locatio Iside a Cache Address Byte Byte Byte CACHE Address copy of mai memory locatio 0 Mai Memory Lie Block Cache Algorithm (ead) Look at Processor Address, search cache s to fid match. The either oud i cache a.k.a. HIT etur copy of data from cache Not i cache a.k.a. MISS ead block of data from Mai Memory Wait etur data to processor ad update cache 4 Desigig Cache actors to cosider whe desigig cache How big is the cache How much data to fetch from memory every time Where to put a data i the cache whe it is fetched? How to deal with coflict? Sychroizatio with memory Capacity Lie Size Cache orgaizatio eplacemet Policy read/write policies d semester, '7-8 5 d semester, '7-8 6
5 Split CPU address Lie Size ad Spatial Locality A lie is uit of trasfer betwee the cache ad memory Word0 Word Word Lie Address Word Offset 4 word lie, b= Cache Cofiguratios ully Associative Direct Map Set Associative -b bits b = lie size a.k.a lie size (i bytes) b + bits Larger lie size has distict hardware advaes less overhead exploit fast burst trasfers from DAM exploit fast burst trasfers over wide busses word => bit What are the disadvaes of icreasig lie size? ewer lies => more coflicts. Ca waste badwidth. 7 d semester, '7-8 8 ully Associative Cache Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) Cache lies ca be stored i ay locatio of the cache Offset -bit address Offset Evict (overwrite) cache lie oly whe out of space Work similar to a ideal cache except with realistic capacity limitatio Valid Cotet T ABC00E D0D0D0D0 T E0009D E0E0E0E0 CAA000E Offset Size: Size: 4 bits 8 bits Loc Valid Cotet d semester, '7-8 9 d semester, '7-8 0
6 Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) 0xBEE6 B offset Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) 0xBEE6 B offset Loc Valid Cotet 000 T DDDD DDDD DDDD DDDD Loc Valid Cotet 000 T DDDD DDDD DDDD DDDD d semester, '7-8 d semester, '7-8 Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) 0xBEE6 B 0 00 offset Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) 0xBEE6 B offset Loc Valid Cotet 000 T 0000A00 DDDD DDDD DDDD DDDD T BEE EEEE EEEE EEEE EEEE Loc Valid Cotet 000 T 0000A00 DDDD DDDD DDDD DDDD T BEE EEEE EEEE EEEE EEEE T 088A d semester, '7-8 d semester, '7-8 4
7 Example: ully Associative ully Associative with 8 etries, lie size = 4 words (b=) V ully Associative Cache 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C B Loc Valid Cotet 000 T 0000A00 DDDD DDDD DDDD DDDD T BEE EEEE EEEE EEEE EEEE T 088A offset Offset b t t = = = Word or Byte HIT d semester, ' Direct Map Cache Simple ad realistic implemetatio Each memory address may be stored at oly oe possible locatio i the cache Usually by takig k bits of address for a k lie $ More tha memory addresses may be mapped to the same cache locatio è Collisio Evict old cotet before ew cotet is stored Simple ad fast Ofte used i L cache Example: Direct Map Direct map with 8 etries, lie size = 4 words (b=) Idex Size: bits Offset Size: 4 bits Size: 5 bits Idex Offset Loc Valid Cotet d semester, '7-8 7 d semester, '7-8 8
8 Example: Direct Map Direct map with 8 etries, lie size = 4 words (b=) 0xBEE Example: Direct Map Direct map with 8 etries, lie size = 4 words (b=) 0xBEE Loc Valid Cotet 000 T DDDD DDDD DDDD DDDD Loc Valid Cotet 000 T DDDD DDDD DDDD DDDD d semester, '7-8 9 d semester, '7-8 0 Example: Direct Map Direct map with 8 etries, lie size = 4 words (b=) 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C B 0 00 Example: Direct Map Direct map with 8 etries, lie size = 4 words (b=) 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C B Loc Valid Cotet 000 T DDDD DDDD DDDD DDDD T 0 EEEE EEEE EEEE EEEE0000 Loc Valid Cotet 000 T DDDD 000 DDDD 000 DDDD DDDD T 0 EEEE EEEE EEEE EEEE0000 d semester, '7-8 d semester, '7-8
9 Example: Direct Map Direct-Mapped Cache Direct map with 8 etries, lie size = 4 words (b=) 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C B t V Idex k Offset b Loc Valid Cotet 000 T DDDD 000 DDDD DDDD 000 DDDD T 0 EEEE EEEE EEEE EEEE0000 HIT = t k lies Word or Byte d semester, '7-8 4 Set Associative Cache Oe way to reduce miss o a cache is to icrease the umber of possible locatios to store a data block A N-way set associative cache has N locatios to store each data block A data block ca be placed i ay of the N locatios The N locatios form a set Each set may hold data with the same idex Allows N differet data blocks with the same idex be stored i the cache Need replacemet policy to determie which of the N data blocks i the set to be evicted whe the N+ data is writte Example: -Way Set Associative -way Set Associative with 4 etries, lie size = 4 words (b=) 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C V Cotet 00 T A0_00 D D D D V Cotet d semester, '7-8 5 d semester, '7-8 6
10 Example: -Way Set Associative -way Set Associative with 4 etries, lie size = 4 words (b=) 0xBEE Example: -Way Set Associative -way Set Associative with 4 etries, lie size = 4 words (b=) 0x0000A000 0x0000A004 0xBEE6 0x088A80 0x0000A00C V Cotet 00 T 0000A0_00 D D D D0 0 0 T BEE_ E E E E0 V Cotet T 088A_0 0 V Cotet 00 T 0000A0_00 D D D D0 0 0 T BEE_ E E E E0 V Cotet T 088A_0 0 What happes if the ext access is 0xC000A8C? d semester, '7-8 7 d semester, '7-8 8 t V -Way Set-Associative Cache Idex k V t = = Offset b Word or Byte Cache Orgaizatios data Same size, differet orgaizatios data data 0 -way Set Associative Direct Map data data data data data data HIT ully Associative 9 d semester, '7-8 40
11 eplacemet Policy I a associative cache, which lie from a set should be evicted whe the set becomes full? adom Least-ecetly Used (LU) LU cache state must be updated o every access True implemetatio oly feasible for small sets (-way) Pseudo-LU biary tree ofte used for 4-8 way irst-i, irst-out (IO) a.k.a. oud-obi Used i highly associative caches Not-Most-ecetly Used (NMU) IO with exceptio for most-recetly used lie or lies Least ecetly Used O replacemet, select the lie that was accessed the least recetly (oldest lie) Need to memorize the access time of each lie 0 Access: Example: 4-way set assoc. lie size = word; arrays a[], b[], c[], d[], e[] all map to row 0 at data at data at data at data 0 a a0 b b0 c c0 d d0 time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M 4 d semester, '7-8 4 Least ecetly Used at data at data at data at data 0 0 a a0 b b0 4 c c0 5 d d0 Access: time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M H H Least ecetly Used at data at data at data at data 0 06 e a a0 e0 b b0 4 c c0 5 d d0 Access: time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M H H M d semester, '7-8 4 d semester, '7-8 44
12 Least ecetly Used at data at data at data at data 0 6 e e0 7 a b a0 b0 4 c c0 5 d d0 Access: time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M H H M M Least ecetly Used at data at data at data at data 0 68 e e0 7 a a0 4 c c0 5 d d0 Access: time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M H H M M H d semester, ' d semester, ' Least ecetly Used at data at data at data at data 0 8 e e0 d d0 9 b b0 0 c c0 Access: time access a0 b0 c0 d0 c0 d0 e0 a0 e0 b0 c0 d0 H/M M M M M H H M M H M M M Pseudo LU Implemetatio challeges for true LU: equires storage for access time o every lie Eormous amout of storage couter wrap aroud equires compariso of all access time withi a set Compariso is slow i hardware Pseudo LU relaxes the requiremet to fid the absolutely oldest piece of data i a set adomly pick ay oe of the older data i the set Oe simple implemetatio: Set bit for each lie of cache whe accessed To replace, evict ay oe of the cache lies with 0 flag Periodically reset all flags to 0 Advaced versio: Evict oly lies that are ot dirty whe there s a draw d semester, ' d semester, '7-8 48
13 Ackowledgemets These slides cotai material developed ad copyright by: Arvid (MIT) Krste Asaovic (MIT/UCB) Joel Emer (Itel/MIT) James Hoe (CMU) Joh Kubiatowicz (UCB) David Patterso (UCB) Joh Lazzaro (UCB) MIT material derived from course 6.8 UCB material derived from course CS5, CS5 d semester, '7-8 49
Computer Architecture ELEC3441
CPU-Memory Bottleneck Computer Architecture ELEC44 CPU Memory Lecture 9 Cache Dr. Hayden Kwok-Hay So Department of Electrical and Electronic Engineering Performance of high-speed computers is usually limited
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5
Morga Kaufma Publishers 26 February, 28 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Set-Associative Cache Architecture Performace Summary Whe CPU performace icreases:
More informationCMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 10: Caches Prof. Yajig Li Uiversity of Chicago Midterm Recap Overview ad fudametal cocepts ISA Uarch Datapath, cotrol Sigle cycle, multi cycle Pipeliig Basic idea,
More informationMaster Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1
Advaced Architectures Master Iformatics Eg. 2017/18 A.J.Proeça Memory Hierarchy (most slides are borrowed) AJProeça, Advaced Architectures, MiEI, UMiho, 2017/18 1 Itroductio Programmers wat ulimited amouts
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.
Morga Kaufma Publishers 26 February, 208 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Virtual Memory Review: The Memory Hierarchy Take advatage of the priciple
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad
More informationAppendix D. Controller Implementation
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationCS61C : Machine Structures
CS 61C L24 VM II (1) ist.eecs.berkele.edu/~cs61c/su5 CS61C : Machie Structures Lecture #24: VM II Address Mappig: Virtual Address: VPN offset 25-8-2 Ad Carle idex ito page table located i phsical memor
More informationCS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II
CS 152 Computer Architecture and Engineering Lecture 7 - Memory Hierarchy-II Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste
More informationCS252 Spring 2017 Graduate Computer Architecture. Lecture 6: Out-of-Order Processors
CS252 Sprig 2017 Graduate Computer Architecture Lecture 6: Out-of-Order Processors Lisa Wu, Krste Asaovic http://ist.eecs.berkeley.edu/~cs252/sp17 WU UCB CS252 SP17 2 WU UCB CS252 SP17 Last Time i Lecture
More informationCS 152 Computer Architecture and Engineering. Lecture 6 - Memory
CS 152 Computer Architecture and Engineering Lecture 6 - Memory Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste! http://inst.eecs.berkeley.edu/~cs152!
More informationAgenda. EE 260: Introduction to Digital Design Memory. Naive Register File. Agenda. Memory Arrays: SRAM. Memory Arrays: Register File
EE 260: Introduction to Digital Design Technology Yao Zheng Department of Electrical Engineering University of Hawaiʻi at Mānoa 2 Technology Naive Register File Write Read clk Decoder Read Write 3 4 Arrays:
More informationCS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II
CS 152 Computer Architecture and Engineering Lecture 7 - Memory Hierarchy-II Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!
More informationCMSC Computer Architecture Lecture 11: More Caches. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 11: More Caches Prof. Yajig Li Uiversity of Chicago Lecture Outlie Caches 2 Review Memory hierarchy Cache basics Locality priciples Spatial ad temporal How to access
More informationMultiprocessors. HPC Prof. Robert van Engelen
Multiprocessors Prof. Robert va Egele Overview The PMS model Shared memory multiprocessors Basic shared memory systems SMP, Multicore, ad COMA Distributed memory multicomputers MPP systems Network topologies
More informationCSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More informationBasic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.
5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator
More informationAdvanced Computer Architecture
ECE 563 Advanced Computer Architecture Fall 2009 Lecture 3: Memory Hierarchy Review: Caches 563 L03.1 Fall 2010 Since 1980, CPU has outpaced DRAM... Four-issue 2GHz superscalar accessing 100ns DRAM could
More informationCourse Site: Copyright 2012, Elsevier Inc. All rights reserved.
Course Site: http://cc.sjtu.edu.c/g2s/site/aca.html 1 Computer Architecture A Quatitative Approach, Fifth Editio Chapter 2 Memory Hierarchy Desig 2 Outlie Memory Hierarchy Cache Desig Basic Cache Optimizatios
More informationOperating System Concepts. Operating System Concepts
Chapter 4: Mass-Storage Systems Logical Disk Structure Logical Disk Structure Disk Schedulig Disk Maagemet RAID Structure Disk drives are addressed as large -dimesioal arrays of logical blocks, where the
More informationK-NET bus. When several turrets are connected to the K-Bus, the structure of the system is as showns
K-NET bus The K-Net bus is based o the SPI bus but it allows to addressig may differet turrets like the I 2 C bus. The K-Net is 6 a wires bus (4 for SPI wires ad 2 additioal wires for request ad ackowledge
More informationLecture 6 - Memory. Dr. George Michelogiannakis EECS, University of California at Berkeley CRD, Lawrence Berkeley National Laboratory
CS 152 Computer Architecture and Engineering Lecture 6 - Memory Dr. George Michelogiannakis EECS, University of California at Berkeley CRD, Lawrence Berkeley National Laboratory http://inst.eecs.berkeley.edu/~cs152
More informationPage 1. Why Care About the Memory Hierarchy? Memory. DRAMs over Time. Virtual Memory!
Why Care About the Memory Hierarchy? Memory Virtual Memory -DRAM Memory Gap (latecy) Reasos: Multi process systems (abstractio & memory protectio) Solutio: Tables (holdig per process traslatios) Fast traslatio
More informationCS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1
CS200: Hash Tables Prichard Ch. 13.2 CS200 - Hash Tables 1 Table Implemetatios: average cases Search Add Remove Sorted array-based Usorted array-based Balaced Search Trees O(log ) O() O() O() O(1) O()
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Single-Cycle Disadvantages & Advantages
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Pipeliig Sigle-Cycle Disadvatages & Advatages Clk Uses the clock cycle iefficietly the clock cycle must
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 22 Database Recovery Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Recovery algorithms Recovery cocepts Write-ahead
More informationLecture 7 - Memory Hierarchy-II
CS 152 Computer Architecture and Engineering Lecture 7 - Memory Hierarchy-II John Wawrzynek Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~johnw
More informationComputer Architecture. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff
Computer rchitecture Microcomputer rchitecture ad Iterfacig Colorado School of Mies Professor William Hoff Computer Hardware Orgaizatio Processor Performs all computatios; coordiates data trasfer Iput
More informationEE University of Minnesota. Midterm Exam #1. Prof. Matthew O'Keefe TA: Eric Seppanen. Department of Electrical and Computer Engineering
EE 4363 1 Uiversity of Miesota Midterm Exam #1 Prof. Matthew O'Keefe TA: Eric Seppae Departmet of Electrical ad Computer Egieerig Uiversity of Miesota Twi Cities Campus EE 4363 Itroductio to Microprocessors
More informationMulti-Threading. Hyper-, Multi-, and Simultaneous Thread Execution
Multi-Threadig Hyper-, Multi-, ad Simultaeous Thread Executio 1 Performace To Date Icreasig processor performace Pipeliig. Brach predictio. Super-scalar executio. Out-of-order executio. Caches. Hyper-Threadig
More informationAlgorithm. Counting Sort Analysis of Algorithms
Algorithm Coutig Sort Aalysis of Algorithms Assumptios: records Coutig sort Each record cotais keys ad data All keys are i the rage of 1 to k Space The usorted list is stored i A, the sorted list will
More information1. SWITCHING FUNDAMENTALS
. SWITCING FUNDMENTLS Switchig is the provisio of a o-demad coectio betwee two ed poits. Two distict switchig techiques are employed i commuicatio etwors-- circuit switchig ad pacet switchig. Circuit switchig
More informationReliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1
Reliable Trasmissio Sprig 2018 CS 438 Staff - Uiversity of Illiois 1 Reliable Trasmissio Hello! My computer s ame is Alice. Alice Bob Hello! Alice. Sprig 2018 CS 438 Staff - Uiversity of Illiois 2 Reliable
More informationComputer Architecture ELEC3441
Computer Architecture ELEC3441 Lecture 13 ulti-core Processors Dr. Hayde Kwok-Hay o 100,000 10,000 Departmet of Electrical ad Electroic Egieerig 1 Performace (vs. VAX-11/780) Ed of a Era 1000 100 10 AX-11/780,
More informationCS 683: Advanced Design and Analysis of Algorithms
CS 683: Advaced Desig ad Aalysis of Algorithms Lecture 6, February 1, 2008 Lecturer: Joh Hopcroft Scribes: Shaomei Wu, Etha Feldma February 7, 2008 1 Threshold for k CNF Satisfiability I the previous lecture,
More informationECE4050 Data Structures and Algorithms. Lecture 6: Searching
ECE4050 Data Structures ad Algorithms Lecture 6: Searchig 1 Search Give: Distict keys k 1, k 2,, k ad collectio L of records of the form (k 1, I 1 ), (k 2, I 2 ),, (k, I ) where I j is the iformatio associated
More informationLecture-14 (Memory Hierarchy) CS422-Spring
Lecture-14 (Memory Hierarchy) CS422-Spring 2018 Biswa@CSE-IITK The Ideal World Instruction Supply Pipeline (Instruction execution) Data Supply - Zero-cycle latency - Infinite capacity - Zero cost - Perfect
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Large ad Fast: Exploitig Memory Hierarchy Priciple of Locality Programs access a small proportio of their address space
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5. Large and Fast: Exploiting Memory Hierarchy
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface ARM Editio Chapter 5 Large ad Fast: Exploitig Memory Hierarchy Priciple of Locality Programs access a small proportio of their address space
More informationOnes Assignment Method for Solving Traveling Salesman Problem
Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:
More informationMultilevel Memories. Joel Emer Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology
1 Multilevel Memories Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Based on the material prepared by Krste Asanovic and Arvind CPU-Memory Bottleneck 6.823
More informationEE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control
EE 459/500 HDL Based Digital Desig with Programmable Logic Lecture 13 Cotrol ad Sequecig: Hardwired ad Microprogrammed Cotrol Refereces: Chapter s 4,5 from textbook Chapter 7 of M.M. Mao ad C.R. Kime,
More informationThe University of Adelaide, School of Computer Science 22 November Computer Architecture. A Quantitative Approach, Sixth Edition.
Computer Architecture A Quatitative Approach, Sixth Editio Chapter 2 Memory Hierarchy Desig 1 Itroductio Programmers wat ulimited amouts of memory with low latecy Fast memory techology is more expesive
More informationComputer Architecture ELEC2401 & ELEC3441
Computer Architecture ELEC241 & ELEC3441 Lecture 4 Sigle Cycle Processor Dr. Hayde Kwok-Hay So Departmet of Electrical ad Electroic Egieerig Overview irst implemetatio the RISC-V ISA i this course More
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor Advanced Issues
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Advaced Issues Review: Pipelie Hazards Structural hazards Desig pipelie to elimiate structural hazards.
More informationChapter 4 The Datapath
The Ageda Chapter 4 The Datapath Based o slides McGraw-Hill Additioal material 24/25/26 Lewis/Marti Additioal material 28 Roth Additioal material 2 Taylor Additioal material 2 Farmer Tae the elemets that
More informationEnd Semester Examination CSE, III Yr. (I Sem), 30002: Computer Organization
Ed Semester Examiatio 2013-14 CSE, III Yr. (I Sem), 30002: Computer Orgaizatio Istructios: GROUP -A 1. Write the questio paper group (A, B, C, D), o frot page top of aswer book, as per what is metioed
More informationCS 152 Computer Architecture and Engineering. Lecture 6 - Memory. Last =me in Lecture 5
CS 152 Computer Architecture and Engineering Lecture 6 - Memory Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste! http://inst.eecs.berkeley.edu/~cs152!
More informationPage 1. Multilevel Memories (Improving performance using a little cash )
Page 1 Multilevel Memories (Improving performance using a little cash ) 1 Page 2 CPU-Memory Bottleneck CPU Memory Performance of high-speed computers is usually limited by memory bandwidth & latency Latency
More informationComputer Architecture ELEC2401 & ELEC3441
Computer Architecture ELEC2401 & ELEC3441 Lecture 15 ultithreadig & ulti-core Processors Dr. Hayde Kwok-Hay So 100,000 10,000 Departmet of Electrical ad Electroic Egieerig 1 Performace (vs. VAX-11/780)
More informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationWeston Anniversary Fund
Westo Olie Applicatio Guide 2018 1 This guide is desiged to help charities applyig to the Westo to use our olie applicatio form. The Westo is ope to applicatios from 5th Jauary 2018 ad closes o 30th Jue
More informationCS 61C: Great Ideas in Computer Architecture (Machine Structures) Caches Part 1
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Caches Part 1 Instructors: Nicholas Weaver & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/ Components of a Computer Processor
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies
More informationAvid Interplay Bundle
Avid Iterplay Budle Versio 2.5 Cofigurator ReadMe Overview This documet provides a overview of Iterplay Budle v2.5 ad describes how to ru the Iterplay Budle cofiguratio tool. Iterplay Budle v2.5 refers
More informationThreads and Concurrency in Java: Part 1
Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationUH-MEM: Utility-Based Hybrid Memory Management. Yang Li, Saugata Ghose, Jongmoo Choi, Jin Sun, Hui Wang, Onur Mutlu
UH-MEM: Utility-Based Hybrid Memory Maagemet Yag Li, Saugata Ghose, Jogmoo Choi, Ji Su, Hui Wag, Our Mutlu 1 Executive Summary DRAM faces sigificat techology scalig difficulties Emergig memory techologies
More informationThreads and Concurrency in Java: Part 1
Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationCS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II
CS 152 Computer Architecture and Engineering Lecture 7 - Memory Hierarchy-II Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!
More informationUniprocessors. HPC Prof. Robert van Engelen
Uiprocessors HPC Prof. Robert va Egele Overview PART I: Uiprocessors PART II: Multiprocessors ad ad Compiler Optimizatios Parallel Programmig Models Uiprocessors Multiprocessors Processor architectures
More informationCS 152 Computer Architecture and Engineering. Lecture 8 - Memory Hierarchy-III
CS 152 Computer Architecture and Engineering Lecture 8 - Memory Hierarchy-III Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste
More informationUNIVERSITY OF MORATUWA
UNIVERSITY OF MORATUWA FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING B.Sc. Egieerig 2014 Itake Semester 2 Examiatio CS2052 COMPUTER ARCHITECTURE Time allowed: 2 Hours Jauary 2016
More informationGuide to Applying Online
Guide to Applyig Olie Itroductio Respodig to requests for additioal iformatio Reportig: submittig your moitorig or ed of grat Pledges: submittig your Itroductio This guide is to help charities submit their
More informationExamples and Applications of Binary Search
Toy Gog ITEE Uiersity of Queeslad I the secod lecture last week we studied the biary search algorithm that soles the problem of determiig if a particular alue appears i a sorted list of iteger or ot. We
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists
More informationUniversity of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures
Uiversity of Waterloo Departmet of Electrical ad Computer Egieerig ECE 250 Algorithms ad Data Structures Midterm Examiatio ( pages) Istructor: Douglas Harder February 7, 2004 7:30-9:00 Name (last, first)
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 20 Itroductio to Trasactio Processig Cocepts ad Theory Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Trasactio Describes local
More informationLecture 5. Counting Sort / Radix Sort
Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018
More informationComputers and Scientific Thinking
Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput
More informationThe Magma Database file formats
The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,
More informationLecture 1: Introduction and Fundamental Concepts 1
Uderstadig Performace Lecture : Fudametal Cocepts ad Performace Aalysis CENG 332 Algorithm Determies umber of operatios executed Programmig laguage, compiler, architecture Determie umber of machie istructios
More informationRecursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames
Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of
More informationComputer Architecture ELEC2401 & ELEC3441
Computer Architecture ELEC241 & ELEC3441 Lecture 4 Sigle Cycle Processor Dr. Hayde Kwok-Hay So Departmet of Electrical ad Electroic Egieerig Overview irst implemetatio the RISC-V ISA i this course More
More informationregisters data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp.
Cache associativity Cache and performance 12 1 CMPE110 Spring 2005 A. Di Blas 110 Spring 2005 CMPE Cache Direct-mapped cache Reads and writes Textbook Edition: 7.1 to 7.3 Second Third Edition: 7.1 to 7.3
More informationDATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer
Data structures DATA STRUCTURES Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit distace, shortest paths, MST, max-flow,... amortized aalysis biomial heaps Fiboacci heaps uio-fid Dyamic
More informationMemory Hierarchy. Slides contents from:
Memory Hierarchy Slides contents from: Hennessy & Patterson, 5ed Appendix B and Chapter 2 David Wentzlaff, ELE 475 Computer Architecture MJT, High Performance Computing, NPTEL Memory Performance Gap Memory
More informationSolution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:
CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13
CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis
More informationHash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Hash Tables xkcd. http://xkcd.com/221/. Radom Number. Used with permissio uder Creative
More informationArithmetic Sequences
. Arithmetic Sequeces COMMON CORE Learig Stadards HSF-IF.A. HSF-BF.A.1a HSF-BF.A. HSF-LE.A. Essetial Questio How ca you use a arithmetic sequece to describe a patter? A arithmetic sequece is a ordered
More informationNormals. In OpenGL the normal vector is part of the state Set by glnormal*()
Ray Tracig 1 Normals OpeG the ormal vector is part of the state Set by glnormal*() -glnormal3f(x, y, z); -glnormal3fv(p); Usually we wat to set the ormal to have uit legth so cosie calculatios are correct
More informationChapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 1)
Department of Electr rical Eng ineering, Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 1) 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Depar rtment of Electr rical Engineering,
More informationMemory Hierarchy. Slides contents from:
Memory Hierarchy Slides contents from: Hennessy & Patterson, 5ed Appendix B and Chapter 2 David Wentzlaff, ELE 475 Computer Architecture MJT, High Performance Computing, NPTEL Memory Performance Gap Memory
More informationCSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)
CSC165H1, Witer 018 Learig Objectives By the ed of this worksheet, you will: Aalyse the ruig time of fuctios cotaiig ested loops. 1. Nested loop variatios. Each of the followig fuctios takes as iput a
More informationSwitching Hardware. Spring 2018 CS 438 Staff, University of Illinois 1
Switchig Hardware Sprig 208 CS 438 Staff, Uiversity of Illiois Where are we? Uderstad Differet ways to move through a etwork (forwardig) Read sigs at each switch (datagram) Follow a kow path (virtual circuit)
More informationCS2410 Computer Architecture. Flynn s Taxonomy
CS2410 Computer Architecture Dept. of Computer Sciece Uiversity of Pittsburgh http://www.cs.pitt.edu/~melhem/courses/2410p/idex.html 1 Fly s Taxoomy SISD Sigle istructio stream Sigle data stream (SIMD)
More informationLecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming
Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis
More informationChapter 3. Floating Point Arithmetic
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 3 Floatig Poit Arithmetic Review - Multiplicatio 0 1 1 0 = 6 multiplicad 32-bit ALU shift product right multiplier add
More informationChapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig
More informationCaches and Memory Deniz Altinbuken CS 3410, Spring 2015
s and emory Deniz Altinbuken CS, Spring Computer Science Cornell University See P& Chapter:.-. (except writes) Big Picture: emory Code Stored in emory (also, data and stack) compute jump/branch targets
More informationMemory Hierarchies. Instructor: Dmitri A. Gusev. Fall Lecture 10, October 8, CS 502: Computers and Communications Technology
Memory Hierarchies Instructor: Dmitri A. Gusev Fall 2007 CS 502: Computers and Communications Technology Lecture 10, October 8, 2007 Memories SRAM: value is stored on a pair of inverting gates very fast
More informationArquitectura de Computadores
Arquitectura de Computadores Capítulo 2. Procesadores segmetados Based o the origial material of the book: D.A. Patterso y J.L. Heessy Computer Orgaizatio ad Desig: The Hardware/Software Iterface 4 th
More informationCS 152 Computer Architecture and Engineering. Lecture 8 - Memory Hierarchy-III
CS 152 Computer Architecture and Engineering Lecture 8 - Memory Hierarchy-III Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste
More informationRecursive Procedures. How can you model the relationship between consecutive terms of a sequence?
6. Recursive Procedures I Sectio 6.1, you used fuctio otatio to write a explicit formula to determie the value of ay term i a Sometimes it is easier to calculate oe term i a sequece usig the previous terms.
More informationCS 152 Computer Architecture and Engineering. Lecture 9 - Address Translation
CS 152 Computer Architecture and Engineering Lecture 9 - Address Translation Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste
More informationCS 152 Computer Architecture and Engineering. Lecture 11 - Virtual Memory and Caches
CS 152 Computer Architecture and Engineering Lecture 11 - Virtual Memory and Caches Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste
More informationAnnouncements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components
Aoucemets Readig Chapter 4 (4.1-4.2) Project #4 is o the web ote policy about project #3 missig compoets Homework #1 Due 11/6/01 Chapter 6: 4, 12, 24, 37 Midterm #2 11/8/01 i class 1 Project #4 otes IPv6Iit,
More informationCache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals
Cache Memory COE 403 Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Presentation Outline The Need for Cache Memory The Basics
More information