You are on page 1of 5

Kanika

CO18329
Assignment
1).Describe the various types of memory are to be considered as key part in computer
architecture.
Memory Organization in Computer Architecture
A memory is just like a human brain. It is used to store data and instructions. Computer
memory is the storage space in the computer, where data is to be processed and instructions
required for processing are stored. The memory is divided into large number of small parts
called cells. Each location or cell has a unique address, which varies from zero to memory
size minus one. For example, if the computer has 64k words, then this memory unit has 64 *
1024 = 65536 memory locations. The address of these locations varies from 0 to 65535.
A memory unit is the collection of storage units or devices together. The memory unit stores
the binary information in the form of bits. Generally, memory/storage is classified into 2
categories:
Volatile Memory: This loses its data, when power is switched off.
Non-Volatile Memory: This is a permanent storage and does not lose any data when power is
switched off.
Memory Hierarchy
In any computer systems, storage of information is always organised in a hierarchy as shown
here as a triangle. This has many layers representing different type of storage .At the bottom
is remote storage such as storage in the cloud (e.g. dropbox or iCloud), or central file server
offered by an organisation for its employees. This is the largest and cheapest, and normally
the slowest form of storage. This storage could be very large. The next level is local disk
storage, which is faster than the remote storage, but slower than the next layer up. Most disks
are now 128 GB or more. (We use GB for giga byte and GB for giga bit. The next level is the
main memory or DRAM in the computer. Modern computer would come with 2GB or more
of main memory .These normally come on small PCBs and are swappable. In that way, one
could “upgrade” the memory, meaning that you can add more to the system.
The next two levels are SRAMs on the processor chip itself. They are L2 (level 2) and L1
(level 1) cache memory. Cache memory is usually not large, but has much faster access than
all the other types of memory. Information are generally fetched in “cache lines” which is
multiple bytes. Finally the fastest memory are the registers inside the Central Processing Unit
(CPU). Information moves up and down this hierarchy in these order, going through each
layer.
Registers
Registers are a type of computer memory used to quickly accept, store, and transfer data and
instructions that are being used immediately by the CPU. The registers used by the CPU are
often termed as Processor registers.
A processor register may hold an instruction, a storage address, or any data (such as bit
sequence or individual characters).
The computer needs processor registers for manipulating data and a register for holding a
memory address. The register holding the memory location is used to calculate the address of
the next instruction after the execution of the current instruction is completed.

Following are some commonly used registers:


 Accumulator: This is the most common register, used to store data taken out from the
memory.
 General Purpose Registers: This is used to store data intermediate results during
program execution. It can be accessed via assembly programming.
 Special Purpose Registers: Users do not access these registers. These registers are for
Computer system,
 MAR: Memory Address Register are those registers that holds the address for
memory unit.
 MBR: Memory Buffer Register stores instruction and data received from the memory
and sent from the memory.
 PC: Program Counter points to the next instruction to be executed.
 IR: Instruction Register holds the instruction to be executed.
Main Memory
The memory unit that communicates directly within the CPU, Auxillary memory and Cache
memory, is called main memory. It is the central storage unit of the computer system. It is a
large and fast memory used to store data during computer operations. Main memory is made
up of RAM and ROM, with RAM integrated circuit chips holing the major share.

RAM: Random Access Memory


DRAM: Dynamic RAM, is made of capacitors and transistors, and must be refreshed every
10~100 ms. It is slower and cheaper than SRAM.
SRAM: Static RAM, has a six transistor circuit in each cell and retains data, until powered
off.
NVRAM: Non-Volatile RAM, retains its data, even when turned off. Example: Flash
memory.
ROM: Read Only Memory, is non-volatile and is more like a permanent storage for
information. It also stores the bootstrap loader program, to load and start the operating system
when computer is turned on. PROM(Programmable ROM), EPROM(Erasable PROM) and
EEPROM(Electrically Erasable PROM) are some commonly used ROMs.
Characteristics of Main Memory
 These are semiconductor memories.
 It is known as the main memory.
 Usually volatile memory.
 Data is lost in case power is switched off.
 It is the working memory of the computer.
 Faster than secondary memories.
 A computer cannot run without the primary memory.
Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up the CPU. It
acts as a buffer between the CPU and the main memory. It is used to hold those parts of data
and program which are most frequently used by the CPU. The parts of data and programs are
transferred from the disk to cache memory by the operating system, from where the CPU can
access them.
Advantages
The advantages of cache memory are as follows −
 Cache memory is faster than main memory.
 It consumes less access time as compared to main memory.
 It stores the program that can be executed within a short period of time.
 It stores data for temporary use.

Disadvantages
The disadvantages of cache memory are as follows −
 Cache memory has limited capacity.
 It is very expensive.
Magnetic disk
A magnetic disk is a storage device that uses a magnetization process to write, rewrite and
access data. It is covered with a magnetic coating and stores data in the form of tracks, spots
and sectors. Hard disks, zip disks and floppy disks are common examples of magnetic disks.
A magnetic disk primarily consists of a rotating magnetic surface and a mechanical arm that
moves over it. The mechanical arm is used to read from and write to the disk. The data on a
magnetic disk is read and written using a magnetization process. Data is organized on the
disk in the form of tracks and sectors, where tracks are the circular divisions of the disk.
Tracks are further divided into sectors that contain blocks of data. All read and write
operations on the magnetic disk are performed on the sectors.
Magnetic disks have traditionally been used as primary storage in computers. With the advent
of solid-state drives (SSDs), magnetic disks are no longer considered the only option, but are
still commonly used.

Removable media
Removable media is any type of storage device that can be removed from a computer while
the system is running. Examples of removable media include CDs, DVDs and Blu-Ray disks,
as well as diskettes and USB drives. Removable media makes it easy for a user to move data
from one computer to another.
In a storage context, the main advantage of removable disks is that they can deliver the fast
data backup and recovery times associated with storage area networks (SANs) while also
providing the portability of tape that may be required to meet corporate backup and recovery
requirements.

2. To create 16KB memory storage, how many 1024*8 RAM chips required. Also find
a).The total no. of address lines.
b).The total no. of decoding lines to select memory chips.
c).The size of decoder.
Answer:
In computer memory 1K=1024
16KB memory storage means 16*1024*8 bits
RAM chips are available of size 1024*8(1024 words of 8 bit each)
Hence, no. of bits that can be stored on one 1024*8 RAM chip=1024*8 bits
Therefore, number of 1024*8 RAM chips required to create 16KB memory
storage=16*1024*8/1024*8=16 RAM chips
a). 10 address lines are needed to address 1024 bytes.
16 different address are required to identify 16 RAM chips.16 different address can be
generated by 4 bit (from 0000 to 1111).Therefore, the no. of address lines required are 4 to
carry 16 different address.
Total number of address lines=10+4=14
b). Number of decoding lines=14-10=4.
c).4*16 decoder is used.

3. List the various different between Memory mapped I/O and DMA mode of data
transfer and justify each difference with suitable example.
1. Construction:
 Memory mapped I/O : Memory-mapped I/O means a peripheral device is addressed
just the same as memory, and resides in the same address space as data memory. In
memory mapped I/O the computer employ only one set of read and write operations
and do not distinguish between memory and I/O addresses. The assigned addresses
for interfaced registers cannot be used for memory words, which reduces the memory
address range available.
 DMA mode: DMA(Direct Memory Access) allows hardware to directly read and
write memory without involving the CPU. Removing the CPU from path and letting
the peripheral to manage the memory buses directly would improve the speed of
transfer. During DMA transfer, the CPU is idle and has no control of the memory
buses. A DMA controller takes over the buses to manage the transfer directly between
the I/O device and memory.
2. Working
 DMA mode: DMA(Direct Memory Access) allows hardware to directly read and
write memory without involving the CPU. Removing the CPU from path and letting
the peripheral to manage the memory buses directly would improve the speed of
transfer. During DMA transfer, the CPU is idle and has no control of the memory
buses. A DMA controller takes over the buses to manage the transfer directly between
the I/O device and memory.
 DMA mode: The CPU can be placed in an idle state in a variety of ways. One method
is to disable the buses through special control signal. The bus request(BR) input is
used by the DMA controller to request the CPU to relinquish control of the buses.
When this input is active, the CPU terminates the execution of current instruction and
places the address bus, the data bus and the read and write lines into a high impedance
state. The CPU activates a bus grant(BG) output to inform the external DMA that the
buses are in high impedance state. The DMA can now take control of the buses to
conduct memory transfers without processor intervention.
3. Advantages
 Memory mapped I/O: The advantage to this method is that every instruction which
can access memory can be used to manipulate an I/O device.
Example: The load and store instructions used for reading and writing from memory
can be used to input and output data from I/O registers.
 DMA mode: DMA can save processing time and is a more efficient way to move data
from the computer's memory to other devices. The work overload on the CPU
decreases. For each transfer, only a few numbers of clock cycles are required.
Example: A PCI controller and a hard drive controller each have their own set of
DMA channels.

You might also like