Professional Documents
Culture Documents
The memory unit is an essential component in any digital computer since it is needed for storing programs and data
CPU needs faster memory to process data. Not all accumulated information is needed by the CPU at the same time Therefore, it is more economical to use low-cost storage devices to serve as a backup for storing the information that is not currently used by CPU
Memory Types
The memory unit that directly communicate with CPU is called the main memory Devices that provide backup storage are called auxiliary memory
The memory hierarchy system consists of all storage devices employed in a computer system from the slow by high-capacity auxiliary memory
to a relatively faster main memory, to an even smaller and faster cache memory
Memory hierarchy
Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system
Register
Cache
Main Memory
Magnetic Disk
Magnetic Tape
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.
Register
RAM
Cache
Cache memory
If the active portions of the program and data
are placed in a fast small memory, the average memory access time can be reduced, Thus reducing the total execution time of the program Such a fast small memory is referred to as cache memory The cache is the fastest component in the memory hierarchy and approaches the speed of CPU component The typical access time ratio between cache and main memory is about 1 to 7
time, Therefore, very little or no time must be wasted when searching the words in the cache The transformation of data from main memory to cache memory is referred to as a mapping process, there are three types of mapping:
Associative mapping Direct mapping Set-associative mapping
Cache
Memory
(SRAM)
CPU
4. If not, the CPU has to fetch next instruction from main memory - a much slower process
3. If it is, then the instruction is fetched from the cache a very fast position
= Bus connections
measured in terms of a quantity called hit ratio When the CPU refers to memory and finds the word in cache, it is said to produce a hit Otherwise, it is a miss Hit ratio = hit / (hit+miss)
Cost 100x 1X
ROM
ROM holds programs and data permanently even when computer is switched off 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
Access time of between 10 and 50 nanoseconds
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 ultraviolet light on it
After reprogramming the window is covered to prevent new contents being erased Access time is around 45 90 nanoseconds
Secondary Storage
Memory capacity that can store very large amounts of data for extended periods of time. Magnetic tape (sequential access) Magnetic disks (direct access)
Secondary Storage: It is nonvolatile. It takes much more time to retrieve data because of the electromechanical in nature. It is cheaper than primary storage. Auxiliary memory access time is usually 1000 times that of main memory
Magnetic Tape
Magnetic tape: A secondary storage medium on a large open reel or in a smaller cartridge or cassette. Sequential access: Data access in which the computer system must run through data in sequence in order to locate a particular piece of data.
Hard Drive
Hard drives: A form of secondary storage that stores data on platters divided into concentric tracks and sectors, which can be read by a read/write head that pivots across the rotating disks.
VS The Winner
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 hard-disk in milliseconds (Note: a millisecond is a thousandth of a second) Virtual memory is much slower than RAM
TERMS : 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. The access time = seek time + transfer time Seek time: required to position the read-write head to a location Transfer time: required to transfer data to or from the device The average time required to reach a storage location in memory and obtain its contents is called the access time