CS1313 Hardware Lesson

CS1313 Hardware Lesson

Hardware Outline 1. Hardware Outline 27. Why Have Cache? 2. What is a Computer? 28. Multiple Levels of Cache 3. Components of a Computer 29. Secondary Storage 4. Categories of Computer Hardware 30. Media Types 5. Central Processing Unit (CPU) 31. Speed, Price, Size 6. CPU Examples 32. CD-ROM & DVD-ROM 7. CPU Parts 33. CD-ROM & DVD-ROM: Disadvantage 8. CPU: Control Unit 34. CD-ROM & DVD-ROM: Advantages 9. CPU: Arithmetic/Logic Unit 35. Why Are Floppies So Expensive Per MB? 10. CPU: Registers 36. I/O 11. How Registers Are Used 37. I/O: Input Devices 12. Multicore 38. I/O: Output Devices 13. Multicore History 39. Bits 14. Why Multicore? #1 40. Bytes 15. Why Multicore? #2 41. Words 16. Storage 42. Putting Bits Together 17. Primary Storage 43. Putting Bits Together (cont’d) 18. Cache 44. Powers of 2 19. From Cache to the CPU 45. Powers of 2 vs Powers of 10 20. Main Memory (RAM) 46. KB, MB, GB, TB, PB 21. Main Memory Layout 47. Kilo, Mega, Giga, Tera, Peta 22. RAM vs ROM 48. EB, ZB, YB 23. Speed => Price => Size 49. Moore’s Law 24. How Data Travel Between RAM and CPU 50. Implication of Moore’s Law 25. Loading Data from RAM into the CPU 51. Double, double, … 26. RAM is Slow Hardware Lesson CS1313 Fall 2021 1 What is a Computer? “… [A] programmable electronic device that can store, retrieve and process data.” (N. Dale & D. Orshalick, Introduction to PASCAL and Structured Design, D.C. Heath & Co., Lexington MA, 1983, p. 2) Hardware Lesson CS1313 Fall 2021 2 Components of a Computer Computer Hardware Software Physical Devices Instructions & Data DON’T PANIC! This discussion may be confusing at the moment; it’ll make more sense after you’ve written a few programs. Hardware Lesson CS1313 Fall 2021 3 Categories of Computer Hardware Central Processing Unit (CPU) Storage Primary: Cache, RAM Secondary: Hard disk, removable (e.g., USB thumb drive) I/O Input Devices Output Devices Hardware Lesson CS1313 Fall 2021 4 Central Processing Unit (CPU) The Central Processing Unit (CPU), also called the processor, is the “brain” of the computer. Intel Ice Lake exterior https://2.bp.blogspot.com/-KZiDqFY8mWM/XOKeSN34jqI/AAAAAAAACA0/PuVjQ0_gGYURDodUvaECRfj5_-EWXGI4ACEwYBhgL/s640/ezgif.com-webp-maker%2B%252810%2529.webp Intel Ice Lake quad core innards https://d2skuhm0vrry40.cloudfront.net/2019/articles/2019-05-26-23-55/2019_05_26_23_55_22_PowerPoint_Presentation.png Hardware Lesson CS1313 Fall 2021 5 CPU Examples x86: Intel Celeron/Pentium/Core/i3/i5/i7/i9/Xeon and AMD Athlon/Sempron/Turion/Ryzen/Threadripper/EPYC (and related models from smaller manufacturers) (Windows, MacOS and Linux PCs; some Android tablets) http://en.wikipedia.org/wiki/X86 Market Share: Intel 60.3%, AMD 39.6% https://www.statista.com/statistics/735904/worldwide-x86-intel-amd-market-share/ ARM (in 90% of mobile “applications processors”) http://en.wikipedia.org/wiki/ARM_processor https://seekingalpha.com/article/4414315-why-nvidia-arm-acquisition-should-be-approved https://www.arm.com/-/media/global/company/investors/PDFs/Arm_SBG_Q1_2019_Roadshow_Slides_FINAL.pdf IBM POWER9 (servers) https://en.wikipedia.org/wiki/Power_Architecture Hardware Lesson CS1313 Fall 2021 6 CPU Parts The CPU consists of three main parts: Control Unit Arithmetic/Logic Unit Registers Control Unit Arithmetic/Logic Unit Registers Fetch Next Instruction Add Sub Integer Fetch Data Store Data Mult Div Increment Instruction Ptr Floating Point And Or Execute Instruction … Not … Hardware Lesson CS1313 Fall 2021 7 CPU: Control Unit The Control Unit decides what to do next. For example: memory operations: for example, load data from main memory (RAM) into the registers; store data from the registers into main memory; arithmetic/logical operations: e.g., add, multiply; branch: choose among several possible courses of action. Hardware Lesson CS1313 Fall 2021 8 CPU: Arithmetic/Logic Unit The Arithmetic/Logic Unit (ALU) performs arithmetic and logical operations. Arithmetic operations: e.g., add, subtract, multiply, divide, square root, cosine, etc. Logical operations: e.g., compare two numbers to see which is greater, check whether both of a pair of true/false statements are true, etc. Hardware Lesson CS1313 Fall 2021 9 CPU: Registers Registers are memory-like locations inside the CPU where data and instructions reside that are being used right now. That is, registers hold the operands being used by the current arithmetic or logical operation, and/or the result of the arithmetic or logical operation that was just performed. For example, if the CPU is adding two numbers, then the addend is in some register; the augend is in another register; after the addition is performed, the sum shows up in yet another register. A typical CPU has only a few hundred to a few thousand bytes of registers. Hardware Lesson CS1313 Fall 2021 10 How Registers Are Used Every arithmetic or logical operation has one or more operands and one result. Operands are contained in registers (“source”). A “black box” of circuits performs the operation. The result goes into a register (“destination”). operand Register Ri result Register Rk operand Register Rj Operation circuitry addend in R0 5 12 7 ADD sum in R2 augend in R1 Example: Hardware Lesson CS1313 Fall 2021 11 Multicore A multicore CPU is a chip with multiple, independent “brains,” known as cores. These multiple cores can run completely separate programs, or they can cooperate together to work simultaneously in parallel on different parts of the same program. All of the cores share the same connection to memory – and the same bandwidth (memory speed). Hardware Lesson CS1313 Fall 2021 12 Multicore History (x86) Single core: November 1971 (Intel 4004) Dual core: October 2005 (Intel), March 2006 (AMD) x86 Core Counts 64 Quad core: June 2006 (Intel), Sep 2007 (AMD) 56 Hex core: Sep 2008 (Intel), June 2009 (AMD) 48 40 8-core (Intel & AMD): March 2010 32 12-core (AMD only): March 2010 24 16 16-core: Nov 2011 (AMD only) 8 18-core: Sep 2014 (Intel only) 0 2005 2007 2009 2011 2013 2015 2017 2019 22-core: March 2016 (Intel only) Intel Cores AMD Cores 28-core: July 2017 (Intel only) Note that this is only for x86 – other 32-core: June 2017 (AMD only) processor families (for example, POWER) 56-core: Apr 2019 (Intel only) introduced multicore earlier. 64-core: Aug 2019 (AMD only) http://www.intel.com/pressroom/kits/quickreffam.htm (dual core, quad core) http://ark.intel.com/products/family/34348/Intel-Xeon-Processor-7000-Sequence#@Server (hex core) http://ark.intel.com/ProductCollection.aspx?familyID=594&MarketSegment=SRV (oct core) http://en.wikipedia.org/wiki/Intel_Nehalem_(microarchitecture) (oct core) http://en.wikipedia.org/wiki/AMD_Opteron (12-core) https://en.wikipedia.org/wiki/Broadwell_(microarchitecture) (22-core) https://en.wikipedia.org/wiki/Skylake_(microarchitecture) (28-core) https://en.wikipedia.org/wiki/Cascade_Lake_(microarchitecture) (56-core) https://en.wikipedia.org/wiki/Epyc (64-core, 32-core) Hardware Lesson CS1313 Fall 2021 13 Why Multicore? #1 In the golden olden days (through about 2005), the way to speed up a CPU was to increase its “clock speed.” Every CPU has a little crystal inside it that vibrates at a fixed frequency (for example, 1 GHz = 1 billion vibrations per second). Each operation (add, subtract, multiply, divide, etc) requires a specific number of clock ticks to complete. But, the power density (watts per square cm) of a CPU chip is proportional to the square of the clock speed. So, continuing to increase the clock speed would have been, quite literally, a dead end, because by now such CPU chips would have already reached the power density of the sun. Hardware Lesson CS1313 Fall 2021 14 Why Multicore? #2 D. Etiemble, 2018: “45-year CPU Evolution: One Law and Two Equations.” https://arxiv.org/ftp/arxiv/papers/1803/1803.00254.pdf Derived from: F. Pollack, 1999: “New Microarchitecture Challenges in the Coming Generation of CMOS Process Technologies.” Micro32 conference keynote. 1990 2000 c. 2005 c. 2010 c. 2015 Hardware Lesson CS1313 Fall 2021 15 Storage There are two major categories of storage: Primary Cache Main memory (RAM) Secondary Hard disk Removable (e.g., thumb drive, CD, floppy) Hardware Lesson CS1313 Fall 2021 16 Primary Storage Primary storage is where data and instructions reside when they’re being used by a program that is currently running. Typically is volatile: The data disappear when the power is turned off. Typically comes in two subcategories: Cache Main memory (RAM) Hardware Lesson CS1313 Fall 2021 17 Cache Cache memory is where data and instructions reside when they are going to be used very very soon, or have just been used. Cache is very fast (typically 5% - 100% of the speed of the registers) compared to RAM (~1% of the speed of the registers). Therefore, it’s very expensive (e.g., $17 per MB) https://ark.intel.com/products/77493/Intel-Core-i3-4360-Processor-4M-Cache-3_70-GHz ($149) https://ark.intel.com/products/77490/Intel-Core-i3-4170-Processor-3M-Cache-3_70-GHz ($132) http://www.pricewatch.com/ Therefore, it’s very small (e.g., under 1 MB to 256 MB) https://en.wikipedia.org/wiki/Epyc … but still much bigger than registers. Hardware Lesson CS1313 Fall 2021 18 From Cache to the CPU CPU: Up to 1229 GB/sec on CPU a 1.6 GHz Intel i-8250U Kaby Lake https://i.dell.com/is/image/DellCo ntent//content/dam/global-site- design/product_images/dell_client_ products/notebooks/latitude_notebo oks/13_3590/global_spi/notebooks- Cache: 40 GB/sec (3.3%) latitude-15-3590-campaign-hero- https://www.softpedia.com/get/System/Benchmarks/BenchMem.shtml 504x350-ng.psd?fmt=png- alpha&wid=570&hei=400 Cache Typically, data move between cache and the CPU at speeds closer to that of the CPU performing calculations.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    51 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us