Introduction to Memory Unit 5 Notes
Introduction to Memory Unit 5 Notes
Introduction to Memory:
A computer is an electronic device and that accepts data, processes on that data, and gives
the desired output. It performs programmed computation with accuracy and speed.
Memory organization refers to how data and instructions are stored and accessed within a
computer system. A memory unit is the collection of storage units or devices together.
The memory unit stores the binary information in the form of bits. Computer memory is
just like the human brain. It is used to store data/information and instructions. It is a data
storage unit or a data storage device where data is to be processed and instructions
required for processing are stored. It can store both the input and output can be stored
here.
• Nibble = 4 bits
Primary memory holds only those data and instructions on which computer is
currently working. It has limited capacity and data is lost when power is switched off. It
is generally made up of semiconductor device. These memories are not as fast as
registers. The data and instruction required to be processed reside in main memory. It is
divided into two subcategories RAM and ROM.
It stands for Random Access Memory. It is the internal memory of the CPU which stores
most of the data and the instructions for the processing of the data. Since it is the internal
memory, it can only be viewed but not modified by the user. RAM is lost once the power
is cut off, and it also has limited storage. It, however, is faster than any other storage
device.
o S RAM (Static RAM): S RAM uses transistors and the circuits of this
memory are capable of retaining their state as long as the power is applied.
This memory consists of the number of flip flops with each flip flop storing
1 bit. It has less access time and hence, it is faster.
Auxiliary memory
Auxiliary memory is used to store programs and data that are not actively being used by
the CPU, but are needed for future use or long-term storage. It acts as a backup for the
primary memory and provides a way to store large amounts of data that would not fit in
the faster, but more expensive, RAM.
• It is non-volatile memory.
1. Magnetic Tapes: Magnetic tape is a long, narrow strip of plastic film with a
thin, magnetic coating on it that is used for magnetic recording. Bits are recorded on tape
as magnetic patches called RECORDS that run along many tracks. Typically, 7 or 9 bits
are recorded concurrently. Each track has one read/write head, which allows data to be
recorded and read as a sequence of characters. It can be stopped, started moving forward
or backward, or rewound.
2. Magnetic Disks: A magnetic disk is a circular metal or a plastic plate and these
plates are coated with magnetic material. The disc is used on both sides. Bits are stored in
magnetized surfaces in locations called tracks that run in concentric rings. Sectors are
typically used to break tracks into pieces.
Hard discs are discs that are permanently attached and cannot be removed by a
single user.
3. Optical Disks: It’s a laser-based storage medium that can be written to and
read. It is reasonably priced and has a long lifespan. The optical disc can be taken out of
the computer by occasional users.
CD – ROM
• Information is written to the disc by using a controlled laser beam to burn pits on
the disc surface.
• The capacity of a CD-ROM is 600 MB, with each sector storing 2048 bytes of
data.
• The data transfer rate is about 4800KB/sec. & the new access time is around 80
milliseconds.
DVDs
• The term “DVD” stands for “Digital Versatile/Video Disc,” and there are two sorts
of DVDs:
o DVDR (writable)
o DVDRW (Re-Writable)
• DVD-ROMS (Digital Versatile Discs): These are read-only memory (ROM) discs
that can be used in a variety of ways. When compared to CD-ROMs, they can
store a lot more data. It has a thick polycarbonate plastic layer that serves as a
foundation for the other layers. It’s an optical memory that can read and write data.
• DVD-R: DVD-R is a writable optical disc that can be used just once. It’s a DVD
that can be recorded. It’s a lot like WORM. DVD-ROMs have capacities ranging
from 4.7 to 17 GB. The capacity of 3.5 inch disk is 1.3 GB.
Cache Memory
It is a type of high-speed semiconductor memory that can help the CPU run faster.
Between the CPU and the main memory, it serves as a buffer. It is used to store the data
and programs that the CPU uses the most frequently.
• When compared to the main memory, it takes less time to access it.
• The size of the cache (amount of data it can store) is usually small.
Virtual Memory
Virtual memory is the separation of logical memory from physical memory. This
separation provides large virtual memory for programmers when only small physical
memory is available. Virtual memory is used to give programmers the illusion that they
have a very large memory even though the computer has a small main memory. It makes
the task of programming easier because the programmer no longer needs to worry about
the amount of physical memory available.
Virtual memory is a method that computers use to manage storage space to keep systems
running quickly and efficiently. Virtual memory is a memory management technique that
creates an illusion of a very large main memory for each process, regardless of the
limited physical memory (RAM) available in the computer.
Running larger programs: Enables execution of programs that require more memory
than physically available RAM.
Efficient memory utilization: Only the actively used parts of a program reside in RAM,
freeing up space for other processes.
Memory protection: Each process gets its own virtual address space, preventing one
program from interfering with the memory of another, thus enhancing system stability
and security.
Simplified programming: Programmers don't need to worry about the exact amount of
physical memory available.
Associative Memory
It can be viewed as data correlation here. input data is correlated with that of stored data
in the CAM.
The key register supports a mask for selecting a specific field or key in the argument
word. The whole argument is distinguished with each memory word if the key register
includes all 1's.
Hence, there are only those bits in the argument that have 1's in their equivalent position
of the key register are compared. Therefore, the key gives a mask or recognizing a piece
of data that determines how the reference to memory is created.
• Match Register: It has m-bits, One bit corresponding to each word in the memory
array. After the making process, the bits corresponding to matching words in
match register are set to ‘1’.
• Associative Memory Array: It combines word in that are to be compared with the
arguments word in parallel. It contains ‘m’ words with ‘n’ bit per word.
Applications of Associative memory :-
4. It is used in page tables used by the virtual memory and used in neural networks.
1. Each cell must have storage capability and logical circuits for matching its content
with external argument.
Memory can be accessed in three main ways: random access, sequential access, and
direct access. Random access memory (RAM) allows data to be accessed directly and in
any order, while sequential access memory reads data in a linear sequence, such as on
magnetic tape. Direct access memory, like hard drives, combines aspects of both,
allowing for random access within tracks. "Semi-random access" is not a standard term in
computer science, and the concept of "semi-random" access doesn't have a clear,
universally accepted definition.
1.Sequential Access:-
In this method, the memory is accessed in a specific linear sequential manner, like
accessing in a single Linked List. The access time depends on the location of the data.
Applications of this sequential memory access are magnetic tapes, magnetic disk and
optical memories.
2. Random Access: In this method, any location of the memory can be accessed randomly
like accessing in Array. Physical locations are independent in this access method.
3. Direct Access: In this method, individual blocks or records have a unique address
based on physical location. access is accomplished by direct access to reach a general
vicinity plus sequential searching, counting or waiting to reach the final destination. This
method is a combination of above two access methods. The access time depends on both
the memory organization and characteristics of storage technology. The access is semi-
random or direct.
Application of thus direct memory access is magnetic hard disk, read/write header.
4. Associate Access: In this memory, a word is accessed rather than its address. This
access method is a special type of random access method. Application of thus Associate
memory access is Cache memory.
By capability(RAM, ROM)
• It is also called read-write memory or the main memory or the primary memory .
• The programs and data that the CPU requires during the execution of a program
are stored in this memory.
• It is a volatile memory as the data is lost when the power is turned off.
1. Static RAM: SRAM stands for Static Random Access Memory. It is a type of
semiconductor which is widely used in computing devices and microprocessors.
2. Dynamic RAM: DRAM stands for Dynamic Random Access Memory. It is made of
Capacitors and has smaller data life span than Static RAM.
Power
Uses less power. Uses more power.
Consumption
• Speed: RAM is much faster than other types of storage, such as a hard drive or
solid-state drive, which means that the computer can access the data stored in
RAM more quickly.
• Flexibility: RAM is volatile memory, which means that the data stored in it can be
easily modified or deleted. This makes it ideal for storing data that the computer is
currently using or processing.
• Capacity: The capacity of RAM can be easily upgraded, which allows the
computer to store more data in memory and thus improve performance.
• Power Management: RAM consumes less power compared to hard drives, and
solid-state drives, which makes it an ideal memory for portable devices.
• Volatility: RAM is volatile memory, which means that the data stored in it is lost
when the power is turned off. This can be a problem for important data that needs
to be preserved, such as unsaved work or files that have not been backed up.
• Cost: RAM can be relatively expensive compared to other types of memory, such
as hard drives or solid-state drives, which can make upgrading the memory of a
computer or device more costly.
Read Only Memory (ROM) is a type of computer memory that is used to permanently
store data that does not need to be modified. ROM is non-volatile memory, which means
that the data stored in it is retained even when the power is turned off. ROM is typically
used to store the computer’s BIOS (basic input/output system), which contains the
instructions for booting the computer, as well as firmware for other hardware devices.
• Stores crucial information essential to operate the system, like the program
essential to boot the computer.
• It is non-volatile.
4. MROM(Mask ROM): Mask ROM is a kind of read-only memory, that is masked off
at the time of production. Like other types of ROM, mask ROM cannot enable the user to
change the data stored in it. If it can, the process would be difficult or slow.
• Non-volatility: ROM is non-volatile memory, which means that the data stored in
it is retained even when the power is turned off. This makes it ideal for storing
data that does not need to be modified, such as the BIOS or firmware for other
hardware devices.
• Reliability: Because the data stored in ROM is not easily modified, it is less prone
to corruption or errors than other types of memory.
• Limited Flexibility: ROM is read-only memory, which means that the data stored
in it cannot be modified. This can be a problem for applications or firmware that
need to be updated or modified.
• Limited Capacity: The capacity of ROM is typically limited, and upgrading it can
be difficult or expensive.
• Cost: ROM can be relatively expensive compared to other types of memory, such
as hard drives or solid-state drives, which can make upgrading the memory of a
computer or device more costly.
Data Writing
Writing data is faster. Writing data is slower.
Speed
Memory hierarchy
The Computer memory hierarchy looks like a pyramid structure which is used to describe
the differences among memory types. It separates the computer storage based on
hierarchy. In Memory Hierarchy the cost of memory, capacity is inversely proportional to
speed.
1. Registers
Registers are small, high-speed memory units located in the CPU. They are used to store
the most frequently used data and instructions. Registers have the fastest access time and
the smallest storage capacity, typically ranging from 16 to 64 bits.
2. Cache Memory
Cache memory is a small, fast memory unit located close to the CPU. It stores frequently
used data and instructions that have been recently accessed from the main
memory. Cache memory is designed to minimize the time it takes to access data by
providing the CPU with quick access to frequently used data.
3. Main Memory
Main memory, also known as RAM (Random Access Memory), is the primary memory
of a computer system. It has a larger storage capacity than cache memory, but it is
slower. Main memory is used to store data and instructions that are currently in use by the
CPU.
• Static RAM: Static RAM stores the binary information in flip flops and
information remains valid until power is supplied. Static RAM has a faster access
time and is used in implementing cache memory.
4. Secondary Storage
Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD) , is a
non-volatile memory unit that has a larger storage capacity than main memory. It is used
to store data and instructions that are not currently in use by the CPU. Secondary storage
has the slowest access time and is typically the least expensive type of memory in the
memory hierarchy.
5. Magnetic Disk
Magnetic Disks are simply circular plates that are fabricated with either a metal or a
plastic or a magnetized material. The Magnetic disks work at a high speed inside the
computer and these are frequently used.
6. Magnetic Tape
Magnetic Tape is simply a magnetic recording device that is covered with a plastic
film. Magnetic Tape is generally used for the backup of data. In the case of a magnetic
tape, the access time for a computer is a little slower and therefore, it requires some
amount of time for accessing the strip.
• Access Time: It is the time interval between the read/write request and the
availability of the data. As we move from top to bottom in the Hierarchy, the
access time increases.
• Performance: The Memory Hierarch design ensures that frequently accessed data
is stored in faster memory to improve system performance.
• Cost Per Bit: As we move from bottom to top in the Hierarchy, the cost per bit
increases i.e. Internal Memory is costlier than External Memory.
• Cost Efficiency: By combining small, fast memory (like registers and cache) with
larger, slower memory (like RAM and HDD), the system achieves a balance
between cost and performance. It saves the consumer’s price and time.
• Efficient Data Management: Frequently accessed data is kept closer to the CPU,
while less frequently used data is stored in larger, slower memory, ensuring
efficient data handling.
• Complex Design: Managing and coordinating data across different levels of the
hierarchy adds complexity to the system’s design and operation.
• Cost: Faster memory components like registers and cache are expensive, limiting
their size and increasing the overall cost of the system.
• Latency: Accessing data stored in slower memory (like secondary or tertiary
storage) increases the latency and reduces system performance.