Top Banner
Lesson 01: Basic Concepts Chapter 08: The Memory System
38

Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

May 17, 2018

Download

Documents

LeKhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Lesson 01:Basic Concepts

Chapter 08: The Memory System

Page 2: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

2

Objective

• Understand the concepts of interconnecting processor to memory devices• Understand the speed of access of memory-devices, latency and bandwidth • Learn how they relate in a memory system

Page 3: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

3

Buses of Memory System

Page 4: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

4

A simple view of Computer Organisation

Responsible for storing the instructions for execution and data

The processor is responsible for actuallyexecuting the instructions that make up

programs and the operating system

Page 5: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

5

A view of Computer Organisation

Page 6: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

6

The Von Neumann stored-program computer architecture

• Memory stores the data and program, and processor fetches the instruction and data from the memory and stores the data to memory

Page 7: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

7

Previous Assumptions for Memory System

Page 8: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

8

Assumption so far

• Until now, treated the memory system as a "black box", which stores the program and data, from which the processor fetches the instructions to execute at the processing subunits, and into which the processor could place data for retrieval later

Page 9: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

9

Assumption so far

• All memory operations take the same amount of time to complete, and that each memory operation finishes before the next one begins

• As processing logic circuit performance increases, the instruction throughput also increases proportionately in instruction throughput

Page 10: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

10

Not Considered so far

• How does the memory system affects the instruction throughput in our discussions thus far?

Page 11: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

11

Buses for Memory Interconnection

Page 12: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

12

Memory Interconnection

• Memory system interconnection with the processor through three buses

• Address bus, data bus, and control bus

Page 13: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

13

Interconnection of the processor and memory system

Page 14: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

14

Addresses

Page 15: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

15

Addresses

• Memory units have addresses• Can store one byte at one address• A word has 1 or 2 or 4 bytes in an

organisation• A word stores as either little-endian or

big-endian

Page 16: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

16

Addresses

• The address bus from processor is of 32 bits• There are 4 G addresses at memory for 4 GB • 4 G addresses─ Between 0 and (4 × 1024×

1024 × 1024 – 1)• We assume by convention that 1 K memory =

210 = 1024 • 1 M memory = 220 = 1024 × 1024 • 1 G = 230 = (4 × 1024× 1024 × 1024) = 1K×1

K×1 K

Page 17: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

17

Fetch or Store

Page 18: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

18

Instruction-fetch

• When a PC (program counter) writes the MAR (memory address register), which connects address bus to memory system

Page 19: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

19

Transfer on fetch of instruction or data word

• Transfer to MDR• MDR─ a register in the processor, which

interconnects to the data bus of the memory system

Page 20: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

20

The control signals from the processor

• Read (MEMRD)• Write (MEMWR) to the memory system• Active during transfer from the memory-address

to MDR or MDR to memory-address else inactive

Page 21: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

21

Number of words accesses per cycle

Page 22: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

22

Memory access cycle

• Starts from the program counter PC or other operand transferring the address to MAR

• Issuing of control signals• Data-bus transferring to or from MDR• Finally, deactivating control signals to memory

Page 23: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

23

Number of Words/Cycle

• Early computers only one word (= 32 in 32-bit data bus) can be fetched in one cycle of fetch

Page 24: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

24

More Number of Words/Cycle

• Modern computers, however, have more complexity

Page 25: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

25

RAM, ROM and Cache

Page 26: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

26

ROM

• ROM─ the read-only memory• Cannot be modified by the computer but may

be read • In general, the ROM─ to hold a program that

is executed automatically by the computer every time it is turned on or reset

Page 27: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

27

RAM

• Random-access memory─ can be both read and written

• Used to hold the programs, operating system, and data required by the computer

• Volatile─ does not retain the data stored in it when the computer's power is turned off

Page 28: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

28

Cache

• Memory access cycle time > instruction execution time taken by the processing unit

• Cache memory inside the processor used for issuing instructions to the execution unit at a fast rate

Page 29: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

29

Memory System

Page 30: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

30

Virtual memory

Page 31: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

31

Virtual Memory

• Physical addresses─ Memory addresses issued by the processor for the semiconductor memory RAM or ROM

• A program specified addresses─ could be different from the physical location of the addresses in the RAM or ROM

• A program can have a large number of addresses, as the program size is unlimited

Page 32: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

32

Memory size and Virtual Memory• Memory size─ , however limited by the actual

presence of the addresses• Virtual addresses─ the specified addresses in

stored program• Virtual addresses─ translated and mapped to

physical addresses when a program or program section loads into the memory chips

• Also called logical addresses

Page 33: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

33

Secondary memory

Page 34: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

34

Secondary Memory

• Stores the OS, application programs, and the programs’ data

• Processor executes the instructions after these or part of these is loaded into RAM

Page 35: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

35

Secondary Memory

• ROM has a program called the bootstrap, or "boot" loader, which instructs the computer to load its operating system (OS) off of its hard disk or other secondary storage IO device

Page 36: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

36

Summary

Page 37: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

37

We learnt

• Basic concepts of addresses• Number of words/cycle• RAM, ROM, Cache, Virtual and secondary

memory

Page 38: Basic Concepts Lesson 01 - Devi Ahilya Vishwavidyalaya , …€¦ ·  · 2009-01-10• Basic concepts of addresses • Number of words/cycle • RAM, ROM, Cache, Virtual and secondary

End of Lesson 01 onBasic Concepts