Different Types of Memory
Different Types of Memory
Somnath Chaudhuri
9th April2011
Introduction
Hardware refers to the physical equipment used for the input, processing, output and storage activities of a computer system. Central processing unit (CPU) manipulates the data and controls the tasks performed by the other components. Primary storage internal to the CPU; temporarily stores data and program instructions during processing.
What is Memory
Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location is known as its addressability Each location stores a word i.e. the number of bits that can be processed by the CPU in a single operation. Word length may be typically 16, 24, 32 or as many as 64 bits. A large word length improves system performance, though may be less efficient on occasions when the full word length is not used
5
Computer Memory
Two basic categories of computer memory: Primary storage and secondary storage. Primary stores small amounts of data and information that will be immediately used by the CPU. Secondary stores much larger amounts of data and information (an entire software program, for example) for extended periods of time.
Primary Storage
Primary storage or main memory stores three types of information for very brief periods of time: Data to be processed by the CPU; Instructions for the CPU as to how to process the data; Operating system programs that manage various aspects of the computers operation. Primary storage takes place in chips mounted on the computers main circuit board, called the motherboard. Four main types of primary storage: register, random access memory (RAM), cache memory and read-only memory (ROM).
10
Types of RAM
1. Dynamic Random Access Memory (DRAM) Contents are constantly refreshed 1000 times per second Access time 60 70 nanoseconds 2. Synchronous Dynamic Random Access Memory (SDRAM) Quicker than DRAM Access time less than 60 nanoseconds 3. Direct Rambus Dynamic Random Access Memory (DRDRAM) New type of RAM architecture Access time 20 times faster than DRAM More expensive
11
Types of RAM
4. Static Random Access Memory (SRAM) Doesnt need refreshing Retains contents as long as power applied to the chip Access time around 10 nanoseconds Used for cache memory Also for date and time settings as powered by small battery 5. Video Random Access memory Holds data to be displayed on computer screen Has two data paths allowing READ and WRITE to occur at the same time A systems amount of VRAM relates to the number of colours and resolution A graphics card may have its own VRAM chip on board
12
Data can be read by the CPU in any order so ROM is also direct access The contents of ROM are fixed at the time of manufacture Stores a program called the bootstrap loader that helps start up the computer
Types of ROM
1. Programmable Read Only Memory (PROM) Empty of data when manufactured May be permanently programmed by the user
2. Erasable Programmable Read Only Memory (EPROM) Can be programmed, erased and reprogrammed The EPROM chip has a small window on top allowing it to be erased by shining ultra-violet light on it After reprogramming the window is covered to prevent new contents being erased Access time is around 45 90 nanoseconds
14
Types of ROM
3. Electrically Erasable Programmable Read Only Memory (EEPROM) Reprogrammed electrically without using ultraviolet light Must be removed from the computer and placed in a special machine to do this Access times between 45 and 200 nanoseconds 4. Flash ROM Similar to EEPROM However, can be reprogrammed while still in the computer Easier to upgrade programs stored in Flash ROM Used to store programs in devices e.g. modems Access time is around 45 90 nanoseconds 5. ROM cartridges Commonly used in games machines Prevents software from being easily copied
15
Caches
The rate of data fetching by the CPU from the main memory is about 100 times faster than from secondary memory. But there is also a mismatch between main memory and CPU. CPU can process the data 10 times faster than the main memory. Which limits the performance of the CPU due to mismatch in CPU and main memory speed. So Cache memory act as a buffer b/w main memory and CPU. Cache: A smaller, high speed storage device used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate. The basic characteristic of cache memory is its fast access time.
16
Cache memory
Small amount of memory typically 256 or 512 kilobytes Temporary store for often used instructions Level 1 cache is built within the CPU (internal) Level 2 cache may be on chip or nearby (external) Faster for CPU to access than main memory
17
Memory (SRAM)
CPU
= Bus connections
18
Virtual memory
Uses backing storage e.g. hard disk as a temporary location for programs and data where insufficient RAM available Swaps programs and data between the hard-disk and RAM as the CPU requires them for processing A cheap method of running large or many programs on a computer system Cost is speed: the CPU can access RAM in nanoseconds but harddisk in milliseconds Virtual memory is much slower than RAM
19
Secondary Storage
Memory capacity that can store very large amounts of data for extended periods of time. It is nonvolatile. It takes much more time to retrieve data because of the electromechanical nature. It is cheaper than primary storage. It can take place on a variety of media
20
Secondary storage
Direct access
Optical disk
Floppy disk
Hard disk
CD-ROM
WORM
21
Memory Hierarchy
24
L1 cache holds cache lines retrieved from the L2 cache memory. L2 cache holds cache lines retrieved from main memory.
L2:
L3: Larger, slower, and cheaper (per byte) storage devices L5:
L4:
26