MEMORY HIERARCHY 353156 – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Machine cycle.
OUTPUT INTERFACE – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
The Central Processing Unit: What Goes on Inside the Computer.
Instructor: Sazid Zaman Khan Lecturer, Department of Computer Science and Engineering, IIUC.
Modified from notes by Saeid Nooshabadi COMP3221: Microprocessors and Embedded Systems Lecture 25: Cache - I Lecturer:
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Introduction to Computer Systems
Overview: Memory Memory Organization: General Issues (Hardware) –Objectives in Memory Design –Memory Types –Memory Hierarchies Memory Management (Software.
COMP25212 SYSTEM ARCHITECTURE Antoniu Pop Jan/Feb 2015COMP25212 Lecture 1.
Inside The CPU. Buses There are 3 Types of Buses There are 3 Types of Buses Address bus Address bus –between CPU and Main Memory –Carries address of where.
Computer Organization and Assembly language
Processors Menu  INTEL Core™ i Processor INTEL Core™ i Processor  INTEL Core i Processor INTEL Core i Processor  AMD A K.

The processor, (also known as a microprocessor or a CPU, which stands for Central Processing Unit), does all of the computing a computer does. In other.
Computing Hardware Starter.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Practical PC, 7th Edition Chapter 17: Looking Under the Hood
Different CPUs CLICK THE SPINNING COMPUTER TO MOVE ON.
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Introduction to Computer Architecture and System
Multi-Core Architectures
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
The Central Processing Unit: What Goes on Inside the Computer
The Central Processing Unit
History of Microprocessor MPIntroductionData BusAddress Bus
Inside your computer. Hardware Review Motherboard Processor / CPU Bus Bios chip Memory Hard drive Video Card Sound Card Monitor/printer Ports.
Hardware. Make sure you have paper and pen to hand as you will need to take notes and write down answers and thoughts that you can refer to later on.
COMP25212: System Architecture Lecturers Alasdair Rawsthorne Daniel Goodman
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Memory.
© CCI Learning Solutions Inc. 1 Lesson 2: Elements of a Personal Computer System unit Microprocessor chip How memory is measured What ROM is What RAM is.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: CPU.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Hardware The Processing Unit.
Computer Systems - Processor. Objectives To investigate and understand the structure and role of the processor.
Lesson 3 0x Hardware Components
Computer Studies/ICT SS2
CENTRAL PROCESSING UNIT. CPU Does the actual processing in the computer. A single chip called a microprocessor. Composed of an arithmetic and logic unit.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Lab4: Virtual Memory CS 3410 : Computer System Organization & Programming Spring 2015.
Inside a PC Exploring the CPU. CPU: Objectives Students will identify and explain the function of the CPU Students will research various CPUs so they.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
COMPUTER BASICS Module 1.1 COP4600 – Operating Systems Richard Newman.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
Software Design and Development Computer Architecture Computing Science.
Chapter Overview General Concepts IA-32 Processor Architecture
CPU Central Processing Unit
GCSE Computing - The CPU
GCSE OCR Computing A451 The CPU Computing hardware 1.
ECE232: Hardware Organization and Design
Introduction to Computer Architecture
Architecture Background
Phnom Penh International University (PPIU)
CPUs and Motherboards Cody, Emily, and Slavic.
Little work is accurate
Introduction to Computers
CPU Central Processing Unit
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Introduction to Computers
Introduction to Computer Architecture
CPU Key Revision Points.
Central Processing Unit
2.C Memory GCSE Computing Langley Park School for Boys.
A451: Computer Systems and Programming
GCSE Computing - The CPU
Lecture 3 (Microprocessor)
Caches & Memory.
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

MEMORY HIERARCHY – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat

Two 7-Segments Display  Last week, we control a 7-segment  How about two 7-segments if you want to display a number “53” on two 7-segment  Suppose we define a local variable  unsigned int number = 53;  We can get the most significant digit (MSD) by  unsigned int MSD = number / 10;  We can get the least significant digit (LSD) by  unsigned int LSD = number % 10; OR  unsigned int LSD = (number – (MSD * 10))

Exercise 1  Suppose X = 1456;  6 as the first digit  5 as the second digit  4 as the third digit  1 as the fourth digit  How to write a program to store the first digit, the second digit, the third digit and the fourth digit of X in variable A, B, C, and D respectively ?

Memory Hierarchy  We have learnt that CPU need to load instructions from RAM to register (Fetch)  Then, CPU decodes the instruction (Decode)  Then Execute the instruction (Execute) RAMCPU ALURegisters Load/Store However, transfer data between CPU and RAM is slow comparing to CPU processing speed

Cache Level 1  The solution to fix the slow date transfer rate between CPU and RAM, The CPU manufacturer put a high speed memory called “cache” inside in CPU chip.  Thus, the set of instructions will be loaded from RAM to cache and then CPU can load instructions from cache  Cache L1 run at CPU clock speed, but it’s quite small  Intel core-i7 has 32 kB of instruction cache 32 kB of data cache RAMCPU ALU Registers Load/Store Cache L1

Cache Level 2  Only cache L1 is not enough to improve PC performance that much.  In the past, mainboard manufacturers put a faster memory as a buffer between CPU and RAM.  We call it “cache level 2” (cache L2)  As time goes by, The CPU manufacturers can make circuits inside CPU smaller and smaller. Thus, there is more space left on the CPU die.  CPU manufacturers put cache level2 inside CPU. (Normally cache L2 size is around 1 MB to 6 MB) RAM CPU ALU Registers Cache L1 Cache L2 RAM CPU ALU Registers Cache L1 Cache L2

CPU Core  Since CPU technology develops very fast. The circuits inside CPU becomes smaller and smaller.  The CPU manufacturers decides to fill up the die with multiple ALU, cache, and registers (core)  In theory, CPU can do more than 1 instruction at a time CPU ALU Registers Cache L1 Cache L2 ALU Registers Cache L1 Cache L2 Core

CPU : 1 core VS 2 cores CPU ALU Registers Cache L1 Cache L2 CPU ALU Registers Cache L1 Cache L2 ALU Registers Cache L1 Cache L2 Core

Cache Level 3  CPU core2 family (core2-duo, core2-quad) has only cache L2  However in core-i family (core-i3, core-i5, core-i7), Intel put cache L3 in CPU. This cache is shared for all the cores in chip  Cache L3 size is around 8MB

Virtual Memory  Remind you that programs need to be loaded to RAM.  CPU can’t read instruction or data from harddisk directly.  How about some software such as game ?  For example: Game size is 8 GB  But your PC has RAM only 4 GB (can you play this game?)  We need to extend RAM size to fit software size  Operating System (OS) use some part of harddisk to act as a RAM extension, we call it “Virtual Memory”  Normally Virtual Memory size is about 2 – 2.5 times of RAM size

Memory Conclusion (1) Harddisk Virtual Memory RAM

Memory Conclusion (2) Levels in memory hierarchy Central Processor Unit (CPU) Size of memory at each level Cache L1 Cache L2 Virtual Memory Increasing Distance from CPU, Decreasing cost / MB “Upper” “Lower” Cache L3 RAM