Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: Yuzhuang Hu Memory Hierarchy.

Similar presentations


Presentation on theme: "Instructor: Yuzhuang Hu Memory Hierarchy."— Presentation transcript:

1 Instructor: Yuzhuang Hu yhu1@cs.sfu.ca

2 Memory Hierarchy

3 Some Questions When you make a program, you may assign a value of 100 to memory location with address 4. When you make another program, address 4 may store value 200. How can we run these two program at the same time? Many users are using a computer at the same time. Each user has an illusion that he is owning the whole computer. Assume each user is allocated 4GB memory address space. What if we have 1000 users? Do we need 4GB*1000 = 4TB memory?

4 Physical Memory Physical memory is the amount of DRAM actually installed in your computer. Physical address space is determined by the address lines of your computer. Page and page frame. A page contains 1k to 8k bytes.

5

6

7 Fetch an instruction Access for the directory entry. Access for the page table entry. Access for the operand or instruction.

8

9 Overall picture

10 How to run a program The machine code of a program is in the file system. To run a program, the operating system creates a process with its own virtual address space. The program is then loaded into this space. The operating system then instructs the CPU to fetch the first instruction of this program. The instruction will go through the secondary memory to higher levels of the memory hierarchy. The portion of the address space in use will remain in the main memory.

11

12 I/O Interface Units Peripherals are often eletro-mechanical devices whose manner of operation is different from that of the CPU and memory. The data-transfer rate of peripherals is usually different from the clock rate of the CPU. Data codes and formats in peripherals differ from the word format in the CPU. The operating modes of peripherals differ from each other.

13 I/O bus and interface

14

15

16

17

18

19 THANKS!


Download ppt "Instructor: Yuzhuang Hu Memory Hierarchy."

Similar presentations


Ads by Google