Top Banner
12
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: Computer Memory
Page 2: Computer Memory

Main Memory

Main memory (primary memory) is held on chips

Backing storage is not main memory

Backing storage is sometimes called secondary memory

Page 3: Computer Memory

Main MemoryMain

Memory

11110011 11110011

Address

00000000000000010000001000000011000001000000010100000110000001110000100000001001

Main memory consists of storage locations which are identified by unique addresses

Each storage location holds one word(the number of bits the CPU can process in a single operation)

8 bit computer holds 8 bits in a storage location 16 bit computer holds 16 bits in a storage location

There are two types of main memory: Random Access Memory (RAM) Read Only Memory (ROM)

Page 4: Computer Memory

Random Access Memory• holds data/application programs from input devices/backing storage• can hold the operating system• all data is lost when the computer is switched off

Static RAM (SRAM)Contents of memory will be retained as long as power is applied to the chips

Dynamic RAM (DRAM)A continuous signal is needed to refresh (re-write) its contents

Static RAM has faster access speeds than DRAM

RAM is mainly made up of DRAM because it needs less power and its circuitry is simpler

Page 5: Computer Memory

Read Only Memory• has contents which are fixed when the chip is manufactured• holds the bootstrap loader part of the operating system• retains its data when the computer is switched off

Programmable ROM (PROM)-Empty of data when the chip is manufactured, can be programmed by the user. Once programmed the data cannot be erased.

Erasable PROM (EPROM)-Like PROM only the chip can be removed from the computer and the program erased and another stored in its place using ultraviolet light.

Electrically EPROM (EEPROM) -Like EPROM but electricity is used to erase and reprogram selected contents.

Page 6: Computer Memory

Temporary storage outside RAMWhy?

Reading / writing data to and from memory can slow down the system performance

To combat this problem, the processor can store data in cache memory or its internal registers instead of the RAM

Solution

Page 7: Computer Memory

Temporary storage outside RAMMain

MemoryAddress

0000000000000001000000100000001100000100000001010000011000000111000010000000100111100011

0011001100001110111100001111001111001010

11001100000000110001000101000000

Cache Memory

10000000100000011000001010000011

Address

Cache• small amount of memory built into the processor• physically closer to the processor than RAM• stores the next instructions to be read

Page 8: Computer Memory

Temporary storage outside RAMMain

MemoryAddress

0000000000000001000000100000001100000100000001010000011000000111000010000000100111100011

0011001100001110111100001111001111001010

11001100000000110001000101000000

Cache Memory

10000000100000011000001010000011

Address

Cache• write through cache - contents of the RAM are updated at the same time as the contents of cache• write back cache - contents of the RAM are updated only when the contents of cache are cleared

• cache uses static memory (SRAM)

Page 9: Computer Memory

Temporary storage outside RAMRegisters

Storage locations inside the processor which hold

• Data being processed (Memory Data Register)

• Addresses of memory locations to be accessed (Memory Address Register)

• Instructions being executed (Instruction Register)

There are other many other registers

Register contents can be accessed faster than RAM or cache memory

Page 10: Computer Memory

Temporary storage outside RAMVirtual Memory

Part of the backing storage (hard disk) is set aside for virtual memory

This disk area is used as a temporary location for programs and data

It is useful when the computer does not have enough RAM to store the entire program and its data

It is slower to access data held in virtual memory than data held in main memory

Page 11: Computer Memory

Memory Comparison

The speed at which data can be accessed depends on the distance between it and the processor

Registers

Cache memory

RAM

Virtual memory

Faster access

Slower access

Page 12: Computer Memory

CreditsHigher Computing – Computer Structure – Computer Memory

Produced by P. Greene for the City of Edinburgh Council 2004

Adapted by M. Cunningham 2010

All images licenced under Creative Commons 3.0• 1GB DDR3 Memory Module by William Warby (wwarby on Flickr)• Hard disc drive assembled by Crispin Semmens (conskeptical on Flickr)• Mac ED Logic Board by Jesus A Alvarez (maczydeco on Flickr)