190 likes | 318 Views
CMPT 250 Computer Architecture. Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Memory Hierarchy. Some Questions.
E N D
CMPT 250 Computer Architecture Instructor: Yuzhuang Hu yhu1@cs.sfu.ca
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?
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.
Fetch an instruction • Access for the directory entry. • Access for the page table entry. • Access for the operand or instruction.
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.
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.