Memory Organization
Primary storage or memory is also known as the main memory,
which is the part of the computer that stores current data, programs,
and instructions. Primary storage is stored in the motherboard which
results in the data from and to primary storage can be read and
written at a very good pace.
• In order to enhance the efficiency of the system, memory is
organized in such a way that access time for the ready process is
minimized. The following approach is followed to minimize access
time for the ready process.
• All programs, files, and data are stored in secondary storage that
is larger and hence has greater access time
• Secondary memory can not be accessed directly by a CPU or
processor.
• In order, to execute any process operating system loads the
process in primary memory which is smaller and can be accessed
directly by the CPU.
• Since only those processes are loaded in primary memory which
is ready to be executed, the CPU can access those processes
efficiently and this optimizes the performance of the system.
Classification of Primary Memory
Primary memory can be broadly classified into two
parts:
• Read-Only Memory (ROM)
• Random Access Memory (RAM)
Read-Only Memory
• Any data which need not be altered are stored in ROM. ROM
includes those programs which run on booting of the system
(known as a bootstrap program that initializes OS) along with data
like algorithm required by OS. Anything stored in ROM cannot be
altered or changed.
Types of ROM:
• ROM can be broadly classified into 4 types based on their behavior:
• MROM: Masked ROM is hardwired and pre-programmed ROM. Any content that is once
• written cannot be altered anyhow.
• PROM: Programmable ROM can be modified once by the user. The user buys a blank PROM
• and writes the desired content but once written content cannot be altered.
• EPROM: Erasable and Programmable ROM Content can be changed by erasing the
• initial content which can be done by exposing EPROM to UV radiation. This exposure
• to ultra-violet light dissipates the charge on ROM and content can be rewritten on it.
• EEPROM: Electrically Erasable and Programmable ROM Content can be changed by
• erasing the initial content which could be easily erased electrically. However, one
• byte can be erased at a time instead of deleting in one go. Hence, reprogramming of
• EEPROM is a slow process
Random Access Memory
• Any process in the system which needs to be executed is loaded
in RAM which is processed by the CPU as per Instructions in the
program. Like if we click on applications like Browser, firstly
browser code will be loaded by the Operating system into the RAM
after which the CPU will execute and open up the Browser.
Types of RAM
• RAM can be broadly classified into SRAM (Static RAM) and DRAM (Dynamic RAM) based on
their behavior:
• DRAM: Dynamic RAM or DRAM needs to periodically refresh in a few
• milliseconds to retain data. DRAM is made up of capacitors and
• transistors and electric charge leaks from capacitors and DRAM needs
• to be charged periodically. DRAM is widely used in home PCs and servers as
• it is cheaper than SRAM.
• SRAM: Static RAM or SRAM keeps the data as long as power is supplied to the
• system. SRAM uses Sequential circuits like a flip-flop to store a bit and hence need
• not be periodically refreshed. SRAM is expensive and hence only used where speed
• is the utmost priority.
• Programmable Logic Array (PLA) is a digital device used to build
custom combinational logic circuits. It contains programmable
AND and OR gate networks, allowing the user to set up the logic
functions needed for a specific task. Since PLAs are not given a
fixed function during manufacturing, they can be configured
before use to perform a variety of logic operations, making them a
flexible option for creating specialized hardware designs.
• Comparison with other Programmable Logic Devices
• PLA has a programmable AND gate array and programmable OR
gate array.
• PAL has a programmable AND gate array but a fixed OR gate array.
• ROM has a fixed AND gate array but programmable OR gate array.
• PLA is similar to a ROM in concept; however, it does not provide
full decoding of variables and does not generate all minterms as in
the ROM. Though its name consists of the word "programmable", it
does not require any type of programming like in C and C++.
• Memory organization is essential for efficient data processing and
storage. The memory hierarchy ensures quick access to data by
the CPU, while larger, slower storage devices hold data for the
long term. Effective memory management ensures the system
operates efficiently, providing programs with the memory they
need and preventing unnecessary delays in processing.
Types of Memory in a Computer System
• Auxiliary Memory (Non-Volatile)
• Devices that provide secondary or backup storage are called auxiliary
memory. For example, Magnetic disks and tapes are commonly used
auxiliary devices. It is not directly accessible to the CPU, is accessed using
the Input/Output channels.
• Hard Disk Drive (HDD): A permanent storage device that holds large amounts
of data even when the computer is turned off. It is slower than RAM but offers
much more capacity.
• Solid-State Drive (SSD): A faster alternative to HDDs with no moving parts.
SSDs provide faster read/write speeds compared to HDDs.
• Optical Discs and USB Flash Drives: Optical discs and USB flash drives are
other forms of secondary memory used for storage, though they are less
common in modern high-speed systems
Main Memory (Volatile)
The memory unit that communicates directly within the CPU, Cache memory is called
main memory. It is fast memory used to store data during computer operations.
Main memory is made up of RAM and ROM, majority part consists of RAM.
RAM Random Access Memory
DRAM: Dynamic RAM, is made of capacitors and transistors. It is slower and cheaper
than SRAM.
SRAM: Static RAM, retains data, until powered off.
ROM read Only Memory
• 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.
Cache Memory
• The cache memory is used to store program data that is currently
being executed in the CPU. Whenever the CPU needs to access
memory, it first checks the cache memory. If the data is not found
in cache memory then the CPU moves onto the main memory.
• Registers
• These are small, ultra-fast memory locations within the CPU used to hold data that
is being processed. Registers are crucial for executing instructions efficiently.
• Tertiary and Offline Memory
• Tertiary memory refers to storage devices used for backups and archives, like
• magnetic tapes.
• Offline memory is storage that is not directly accessible by the computer (e.g.,
external hard drives, optical discs) but data can be retrieved when connected.
Cache memory is a small, high-speed storage area in a computer. It stores
copies of the data from frequently used main memory locations. There are
various independent caches in a CPU, which store instructions and data.
The most important use of cache memory is that it is used to reduce the
average time to access data from the main memory. The concept of cache
works because there exists locality of reference (the same items or nearby
items are more likely to be accessed next) in processes.
By storing this information closer to the CPU, cache memory
helps speed up the overall processing time. Cache memory
is much faster than the main memory (RAM). When the CPU
needs data, it first checks the cache. If the data is there, the
CPU can access it quickly. If not, it must fetch the data from
the slower main memory.
Characteristics of Cache Memory
• Extremely fast memory type that acts as a buffer between RAM
and the CPU.
• Holds frequently requested data and instructions, ensuring that
they are immediately available to the CPU when needed.
• Costlier than main memory or disk memory but more economical
than CPU registers.
• Used to speed up processing and synchronize with the high-speed
CPU.
• Virtual memory is a memory management technique used by
operating systems to give the appearance of a large, continuous
block of memory to applications, even if the physical memory
(RAM) is limited and not necessarily allocated in contiguous
manner. The main idea is to divide the process in pages, use disk
space to move out the pages if space in main memory is required
and bring back the pages when needed.
Objectives of Virtual Memory
• A program doesn’t need to be fully loaded in memory to run. Only
the needed parts are loaded.
• Programs can be bigger than the physical memory available in the
system.
• Virtual memory creates the illusion of a large memory, even if the
actual memory (RAM) is small.
• It uses both RAM and disk storage to manage memory, loading
only parts of programs into RAM as needed.
• This allows the system to run more programs at once and manage.
Types of Virtual Memory
• In a computer, virtual memory is managed by the Memory
Management Unit (MMU), which is often built into the CPU. The
CPU generates virtual addresses that the MMU translates into
physical addresses. There are two main types of virtual memory:
• Paging
• Segmentation
• Memory than the physical memory using the disk space. This allows for
the running of larger applications.
• Memory Isolation: Virtual memory allocates a unique address space to
each process, such separation increases safety and reliability based
on the fact that one process cannot interact with another.
• Efficient Memory Management: Virtual memory also helps in better
utilization of the physical memories through methods that include
paging and segmentation.
• Simplified Program Development: For case of programmers, they can
program ‘as if’ there is one big block of memory and this makes the
programming easier and more efficient in delivering more complex
applications.