3. Cache Memory
Cache memory is a very high speed memory that is placed
between the CPU and main memory, to operate at the speed
of the CPU.
CPU is the fastest component of computer but the speed of
fetching instruction from memory is normally slower than the
speed of CPU.
As a result, the speed of CPU is also affected because for
doing its work first it has to fetch instructions from memory.
To bridge this speed gap, Cache memory is placed between
CPU and main memory.
The speed of cache memory is faster than main memory but is
slower than registers.
5. Cache Memory
Cache is cheaper than registers which justifies their use.
Cache is used to store that data and instructions which are
frequently demanded by the running program, so that the number
of main memory accesses can be reduced.
There are three types of cache memory.
Level-1 cache
Level-2 cache
Level-3 cache
6. Level-1 Cache
Level-1 cache is built in to the actual processor core.
It is a piece of high speed memory which operates at the
same speed as CPU.
It is directly accessible by the processor.
It holds data that the processor needs to execute instructions.
It is very expensive and small in size.
Its typical sizes are 8,16,32,64 or 128 KB.
7. Level-2 Cache
Level-2 cache pulls information from RAM which is then
accessed by the Level-1 Cache.
Level-2 Cache memory is faster and smaller in size than RAM
but is slower and greater in size than Level-1 cache.
It is less expensive than Level-1 Cache.
Its size varies between 64 KB to 16 MB.
The purpose of Level-2 cache is to constantly read in slightly
larger quantities of data from RAM to be available to Level-1
cache.
Level-2 cache is mostly built in to the processor chip but in some
cases it lies on the motherboard.
8. Level-3 Cache
Level-3 cache is specialized memory that works hand in hand
with Level-1 and Level-2 cache to improve system performance.
Level-3 cache is the biggest cache memory.
It anticipates data requests so that processing instructions are
provided without delay.
Level-3 cache is faster than RAM but slower than Level-1 and
Level-2 cache.
CPU first looks for data and instructions in Level-1 cache then it
checks Level-2 and Level-3 cache respectively.
Level-3 cache lies on motherboard.
9. RAM
RAM stands for Random Access Memory is the most common
type of memory found in computers.
It is also known as main memory or primary memory.
Instructions and data cannot be used by the processor until they
are brought in to RAM.
It is a R/W memory and allow the computer to store and access
data and instructions randomly.
RAM is volatile in nature which means that if the computer is
turned off or a power failure occurs all the data contained in
RAM is lost.
10. Continued…
If the computer is turned off, all data contained in RAM is lost.
There are two types of RAM.
Static RAM(SRAM)
Dynamic RAM(DRAM)
11. Static RAM(SRAM)
SRAM is a type of semi-conductor memory.
The word static indicates that it does not need to be
periodically refreshed to retain its data.
SRAM is more expensive but faster and less power hungry
than DRAM.
SRAM is mainly used to make CPU cache.
Because of its complex structure, it is expensive and cannot
be used for high capacity storage.
12. Dynamic RAM
DRAM is also a semi-conductor memory.
DRAM needs to be periodically refreshed to retain its contents.
It stores each bit of data in a separate capacitor within an
integrated circuit.
The capacitor can be either charged or discharged.
In personal computers DRAM is used as main memory.
Because of their simple structure they allow high storage and
are low cost.
13. ROM
ROM stands for Read Only Memory.
ROM is a non-volatile memory which means that when power
goes off it does not lose its information.
ROM is used for permanent storage of information.
It possesses random access property like RAM.
The contents of ROM are manufacturer supplied and cannot
be changed by users/programmers.
There are three types of ROM.
PROM
EPROM
EEPROM
14. PROM
PROM stands for Programmable Read Only Memory.
It is a type of ROM which can be programmed once and then can
never be changed.
PROM is manufactured blank and then it is programmed just
once.
The process is irreversible.
The data is fed in to it using PROM programs.
15. EPROM
EPROM stands for Erasable Programmable Read Only Memory.
EPROM are non-volatile, they do not lose their content when
power supply is cut off.
The content of EPROM chips can be erased using ultra-violet
light.
They can be reprogrammed and reused many times.
16. EEPROM
EEPROM stands for Electrically Erasable Programmable Read
Only Memory.
EEPROM chips are also non-volatile.
The content of these chips can also be erased but using
electricity instead of ultra violet light.
EEPROM chips can also be reprogrammed many times.