0% found this document useful (0 votes)
6 views6 pages

Memory Hierarchy, Cache Memory, Direct Memory Access

The document discusses the memory hierarchy in computers, detailing the levels of memory from slow auxiliary memory to fast cache memory, and their roles in data storage and access. It also explains Direct Memory Access (DMA) as a method for transferring data without CPU intervention, enhancing efficiency, and describes different types of DMA transfers. Additionally, it highlights the importance of cache memory in speeding up data access for the CPU by storing frequently used data and instructions.

Uploaded by

Jaswanth Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Memory Hierarchy, Cache Memory, Direct Memory Access

The document discusses the memory hierarchy in computers, detailing the levels of memory from slow auxiliary memory to fast cache memory, and their roles in data storage and access. It also explains Direct Memory Access (DMA) as a method for transferring data without CPU intervention, enhancing efficiency, and describes different types of DMA transfers. Additionally, it highlights the importance of cache memory in speeding up data access for the CPU by storing frequently used data and instructions.

Uploaded by

Jaswanth Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Memory Hierarchy

The total memory capacity of a computer can be visualized by hierarchy of components. The
memory hierarchy system consists of all storage devices contained in a computer system from
the slow Auxiliary Memory to fast Main Memory and to smaller Cache memory.

Auxillary memory access time is generally 1000 times that of the main memory, hence it is
at the bottom of the hierarchy.

The main memory occupies the central position because it is equipped to communicate
directly with the CPU and with auxiliary memory devices through Input/output processor
(I/O).

When the program not residing in main memory is needed by the CPU, they are brought in
from auxiliary memory. Programs not currently needed in main memory are transferred into
auxiliary memory to provide space in main memory for other programs that are currently in
use.
The cache memory is used to store program data which is currently being executed in the
CPU. Approximate access time ratio between cache memory and main memory is about 1 to
7~10

Cache Memory in Computer Organization

Cache Memory is a special very high-speed memory. It is used to speed up and


synchronizing with high-speed CPU. Cache memory is costlier than main memory or disk
memory but economical than CPU registers. Cache memory is an extremely fast memory type
that acts as a buffer between RAM and the CPU. It holds frequently requested data and
instructions so that they are immediately available to the CPU when needed.
Cache memory is used to reduce the average time to access data from the Main memory. The
cache is a smaller and faster memory which stores copies of the data from frequently used
main memory locations. There are various different independent caches in a CPU, which store
instructions and data.
Levels of memory:
● Level 1 or Register –
It is a type of memory in which data is stored and accepted that are immediately stored in
CPU. Most commonly used register is accumulator, Program counter, address register etc.
● Level 2 or Cache memory –
It is the fastest memory which has faster access time where data is temporarily stored for
faster access.
● Level 3 or Main Memory –
It is memory on which computer works currently. It is small in size and once power is off
data no longer stays in this memory.
● Level 4 or Secondary Memory –
It is external memory which is not as fast as main memory but data stays permanently in
this memory.

Direct memory access (DMA)

DMA stands for “Direct Memory Access” and is a method of transferring data from
the computer‘s RAM to another part of the computer without processing it using the CPU.
While most data that is input or output from your computer is processed by the CPU, some
data does not require processing, or can be processed by another device.

In these situations, DMA can save processing time and is a more efficient way to move data
from the computer’s memory to other devices. In order for devices to use
direct memory access, they must be assigned to a DMA channel. Each type of port on a
computer has a set of DMA channels that can be assigned to each connected device. For
example, a PCI controller and a hard drive controller each have their own set of DMA
channels.

For example, a sound card may need to access data stored in the computer’s RAM, but since
it can process the data itself, it may use DMA to bypass the CPU. Video cards that support
DMA can also access the system memory and process graphics without needing the CPU.
Ultra DMA hard drives use DMA to transfer data faster than previous hard drives that
required the data to first be run through the CPU.

An alternative to DMA is the Programmed Input/Output (PIO) interface in which all data
transmitted between devices goes through the processor. A newer protocol for the ATAIIDE
interface is Ultra DMA, which provides a burst data transfer rate up to 33 mbps. Hard drives
that come with Ultra DMAl33 also support PIO modes 1, 3, and 4, and multiword DMA
mode 2 at 16.6 mbps.
DMA Transfer Types

Memory To Memory Transfer

In this mode block of data from one memory address is moved to another memory
address. In this mode current address register of channel 0 is used to point the source address
and the current address register of channel is used to point the destination address in the first
transfer cycle, data byte from the source address is loaded in the temporary register of the
DMA controller and in the next transfer cycle the data from the temporary register is stored in
the memory pointed by destination address. After each data transfer current
address registers are decremented or incremented according to current settings. The channel 1
current word count register is also decremented by 1 after each data transfer. When the word
count of channel 1 goes to FFFFH, a TC is generated which activates EOP output terminating
the DMA service.

You might also like