Thursday, April 10, 2014

what is cached memory and interleaved memory?

Cached and interleaved memories are ways of speeding up memory access between CPU’s and slower RAM. Which memory models are best suited (i.e. improves the performance most) for which programs?     [Paper II June 2012]
(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops
(iii) Interleaved memory is best suited for large sequential code.
(iv) Cached memory is best suited for large sequential code.
(A) (i) and (ii) are true.
(B) (i) and (iii) are true.
(C) (iv) and (ii) are true.
(D) (iv) and (iii) are true.

Anser is B.
What is Cache memory? How it works?
When you open any program like MS Word or any other program at that time operating system will read data from hard disk (slow moving storage device) to a faster device. This faster device is called RAM (Random Access Memory).
This RAM is type of DRAM (Dynamic Random Access Memory).  RAM is placed here because it is a faster device, and whenever any data or instruction required by Processor, RAM will provide them at a faster rate than slow storage devices. They serve as a cache memory for the storage devices.
RAM is much faster than slow storage device like hard disc but the processor processes at much a faster speed and they are not able to provide the needed data or instructions at that rate.
Cache memory


So there is need of a device that is much faster than RAM which can provide data from RAM to Processor at the speed rate as of processor.
Therefore the data required is transmitted to the next level of fast memory, which is known as CACHE memory. CACHE is also a type of RAM, but it is Static RAM – SRAM. SRAM are faster and costlier then DRAM because it has flip-flops (6 transistors) to store data unlike DRAM which uses 1 transistor and capacitor to store data in form of charge.
       The CPU uses cache memory to store instructions that are repeatedly required to run programs.


What is interleaved memory?
Memory interleaving is the technique used to increase the throughput. The main idea behind interleaved memory is to split the memory system into independent banks which can read and write requests independently and parallels.
Main memory divided into two or more sections which is called memory bank. The CPU can access alternate sections immediately, without waiting for memory to catch up (through wait state).
Main memory (Random Access Memory) is usually composed of a collection of DRAM memory chips, where a number of chips can be grouped together to form a memory bank
Interleaved memory is a technique to allocate memory address to each memory bank in turn which  resulting in higher memory throughputs due to reduced waiting for memory banks to become ready for desired operations.
Interleaved memory technique is used increased speed for the relatively slow speed of dynamic RAM (DRAM).

Memory interleaving implemented on main memory (RAM), which is slow as compared to Cache Memory and Main Memory (RAM) having less bandwidth.

No comments:

Post a Comment