Memory Organization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Semiconductor Memory

Semiconductor memory is a type of digital memory technology that uses


semiconductors, such as silicon, to store and retrieve digital data. It is
commonly used in electronic devices, such as computers, smartphones, and
other digital devices, as a primary or secondary storage medium. The memory
implemented using the semiconductor chips is semiconductor memory.

Semiconductor memory can be divided into two main categories: volatile and
non-volatile memory. Volatile memory, such as dynamic random-access
memory (DRAM) and static random-access memory (SRAM), requires power
to retain stored data. Non-volatile memory, such as read-only memory (ROM),
flash memory, and Electrically Erasable Programmable Read-Only Memory
(EEPROM), can retain data even when power is turned off.
Various differences between volatile and non-volatile memory are there.

Semiconductor memory has several advantages over other types of memory,


including faster access times, higher data transfer rates, and lower power
consumption. These benefits make it an ideal storage medium for a wide
range of electronic devices and applications.

The semiconductor main memory subsystem includes a critical component of


a computer system that stores and retrieves data and instructions needed by
the processor to perform tasks.

Types of Semiconductor Memory

Semiconductor memory is a type of electronic memory that uses


semiconductor devices such as transistors to store digital information.
Semiconductor memory is widely used in modern electronic devices such as
computers, mobile phones, and digital cameras. Here are the main types of
semiconductor memory:
1. Random Access Memory (RAM): RAM is a type of volatile memory that
can be read and written to. RAM is used as temporary storage for data
and program instructions when the computer is running. RAM is further
divided into two types:

a. Static RAM (SRAM): SRAM is a type of RAM that uses flip-flops to


store each bit of data. SRAM is faster and more expensive than DRAM.

b. Dynamic RAM (DRAM): DRAM is a type of RAM that uses capacitors


to store each bit of data. DRAM is slower and less expensive than
SRAM.

2. Read-Only Memory (ROM): ROM is a type of non-volatile memory that


can only be read, not written to. ROM is used to store program
instructions and data that are not intended to be modified. ROM is
further divided into two types:

a. Mask ROM: Mask ROM is a type of ROM that is programmed during


the manufacturing process. Once programmed, the contents of the
ROM cannot be changed.

b. Programmable ROM (PROM): PROM is a type of ROM that can be


programmed once by the user. Once programmed, the contents of the
PROM cannot be changed.

3. Electrically Erasable Programmable Read-Only Memory (EEPROM):


EEPROM is a type of non-volatile memory that can be programmed and
erased electrically. EEPROM is used to store data that needs to be
modified occasionally, such as the BIOS settings on a computer
motherboard.
4. Flash Memory: Flash memory is a type of non-volatile memory that can
be electrically erased and reprogrammed. Flash memory is used in a
wide range of electronic devices such as USB drives, digital cameras,
and mobile phones. Flash memory is further divided into two types:

a. NOR Flash: NOR gate flash is used for executing code directly from
the memory. It has a slower write speed but a faster read speed.

b. NAND Flash: NAND gate flash is used for data storage. It has a
faster write speed but a slower read speed.

Registers and their Types

Registers are memories located within the Central Processing Unit (CPU).
Various types of registers are available within the CPU. Registers are small
but the CPU can access them quickly. Some of the registers available in the
system are given below.

 Instruction Register
 ALU I/O registers
 Status Register
 Stack pointer register
 The program counter, etc.

What is Dynamic RAM (DRAM)?


In this type of RAM, data is stored on capacitors and requires periodic
refreshments. Here a few points about the dynamic RAM are described below.

 Data is stored in MOS capacity.


 Only MOSFET is used for implementation.
 It is Slow compared to Static RAM.
 Dissipate less power.
 The memory capacity of Dynamic RAM is more.
 It can be used as the Main memory.
 Refreshing is required.
Advantages of Static RAM Over Dynamic RAM

Static RAM and Dynamic RAM both are types of Read Acess Memory. It can
be used for the purpose of data storage. Here few differences between
SRAM and DRAM are discussed below.

 The access time of SRAM is less and thus these memories are faster
memories.
 As SRAM consists of flip-flops thus, refreshing is not required.
 Less number of memory cells are required in SRAM for a unit area.

Read Only Memory (ROM) and Their Classifications

It is non-volatile memory, implemented using the combinational circuit. It is


also known as masked memory.

Classification of ROM

1. Mask-programmed ROM: The required contents of the memory are


programmed during fabrication. Data stored this way can never be
altered. It can be implemented using Fixed AND Fixed OR Circuit.
2. PROM (Programmable ROM): Required content is written in a
permanent way by burning out internal interconnections (fuses). It is a
one-off procedure. It can be implemented using Fixed AND
Programmable Circuits.
3. EPROM (Erasable PROM): Data is stored as a charge on an isolated
gate capacitor (“floating gate”). Data is removed by exposing the PROM
to ultraviolet light.
4. EEPROM (Electrically Erasable PROM): It is also called Flash
Memory. The content can be re-programmed by applying suitable
voltages to the EEPROM pins. Flash Memories are very important data
storage devices for mobile applications.

Programmable Logic Devices

Programmable logic devices are a special type of IC. Different types of logic
functions can be implemented using a single programmed IC chip of PLD.
PLDs can be reprogrammed because these are based on rewritable memory
technologies. PLDs are divided into three types. They are PLA, PAL, and
FPGA.
Programmable Logic Array (PLA)

 PLA is implemented using AND-OR gate arrays and programmed for


specific logic functions.
 It is used where the number of don’t care conditions are excessive.
 In PLA’s both AND and OR arrays are programmable.
 The AND and OR gates are fixed for any PLA chip.
 It depends on the number of inputs and outputs of PLA.
 Combinational circuits, Sequential Circuits, and Compact circuits can be
implemented using PLAs.
Programmable Array Logic (PAL)

 PAL is implemented using AND gate arrays are programmable and OR


gate arrays are fixed.
 Because only AND gates are programmable, the PAL is easier to
program, but it is not as flexible as the PLA (programmable logic array).

Field Programmable Gate Array (FPGA)

 It is a semiconductor device that is comprised of a different number of


logic elements, interconnects, and Input/Output blocks. All these
components are user-configurable.

A faster and smaller segment of memory whose access time is as close as


registers are known as Cache memory. In a hierarchy of memory, cache
memory has access time lesser than primary memory. Generally, cache
memory is very small and hence is used as a buffer
.
Cache Memory

Data in primary memory can be accessed faster than secondary memory but
still, access times of primary memory are generally in a few microseconds,
whereas the CPU is capable of performing operations in nanoseconds. Due to
the time lag between accessing data and acting on data performance of the
system decreases as the CPU is not utilized properly, it may remain idle for
some time. In order to minimize this time gap new segment of memory is
Introduced known as Cache Memory.
Role of Cache Memory
The role of cache memory is explained below,
 Cache memory plays a crucial role in computer systems.
 It provide faster access.
 It acts buffer between CPU and main memory(RAM).
 Primary role of it is to reduce average time taken to access data, thereby
improving overall system performance.
Benefits of Cache Memory
Various benefits of the cache memory are,
1. Faster access: Faster than main memory. It resides closer to CPU , typically
on same chip or in close proximity. Cache stores subset of data and
instruction.
2. Reducing memory latency: Memory access latency refers to time taken for
processes to retrieve data from memory. Caches are designed to exploit
principle of locality.
3. Lowering bus traffic: Accessing data from main memory involves transferring
it over system bus. Bus is shared resource and excessive traffic can lead to
congestion and slower data transfers. By utilizing cache memory , processor
can reduce frequency of accessing main memory resulting in less bus traffic
and improves system efficiency.
4. Increasing effective CPU utilization: Cache memory allows CPU to operate at a
higher effective speed. CPU can spend more time executing instruction
rather than waiting for memory access. This leads to better utilization of
CPU’s processing capabilities and higher overall system performance.
5. Enhancing system scalability: Cache memory helps improve system scalability
by reducing impact of memory latency on overall system performance.
In order to understand the working of cache we must understand few points:
 Cache memory is faster, they can be accessed very fast
 Cache memory is smaller, a large amount of data cannot be stored
Whenever CPU needs any data it searches for corresponding data in the cache
(fast process) if data is found, it processes the data according to instructions,
however, if data is not found in the cache CPU search for that data in primary
memory(slower process) and loads it into the cache. This ensures frequently
accessed data are always found in the cache and hence minimizes the time
required to access the data.
Cache Performance
 On searching in the cache if data is found, a cache hit has occurred.
 On searching in the cache if data is not found, a cache miss has occurred.
Performance of cache is measured by the number of cache hits to the number
of searches. This parameter of measuring performance is known as the Hit
Ratio.
Hit ratio=(Number of cache hits)/(Number of searches)
Types of Cache Memory
L1 or Level 1 Cache: It is the first level of cache memory that is present inside
the processor. It is present in a small amount inside every core of the processor
separately. The size of this memory ranges from 2KB to 64 KB.
L2 or Level 2 Cache: It is the second level of cache memory that may present
inside or outside the CPU. If not present inside the core, It can be shared
between two cores depending upon the architecture and is connected to a
processor with the high-speed bus. The size of memory ranges from 256 KB to
512 KB.
L3 or Level 3 Cache: It is the third level of cache memory that is present outside
the CPU and is shared by all the cores of the CPU. Some high processors may
have this cache. This cache is used to increase the performance of the L2 and
L1 cache. The size of this memory ranges from 1 MB to 8MB.

Virtual Memory
Virtual memory is the partition of logical memory from physical memory. This
partition supports large virtual memory for programmers when only limited
physical memory is available.

Virtual memory can give programmers the deception that they have a very high
memory although the computer has a small main memory. It creates the function
of programming easier because the programmer no longer requires to worry
about the multiple physical memory available.
Virtual memory works similarly, but at one level up in the memory hierarchy.
A memory management unit (MMU) transfers data between physical memory and
some gradual storage device, generally a disk. This storage area can be defined
as a swap disk or swap file, based on its execution. Retrieving data from
physical memory is much faster than accessing data from the swap disk.

There are two primary methods for implementing virtual memory are as follows

 Paging

Paging is a technique of memory management where small fixed-length pages


are allocated instead of a single large variable-length contiguous block in the
case of the dynamic allocation technique. In a paged system, each process is
divided into several fixed-size ‘chunks’ called pages, typically 4k bytes in length.
The memory space is also divided into blocks of the equal size known as
frames.

Advantages of Paging

There are the following advantages of Paging are −

 In Paging, there is no requirement for external fragmentation.


 In Paging, the swapping among equal-size pages and page frames is clear.
 Paging is a simple approach that it can use for memory management.

Disadvantage of Paging

There are the following disadvantages of Paging are −

 In Paging, there can be a chance of Internal Fragmentation.


 In Paging, the page table employs more memory.
 Because of Multi-level Paging, there can be a chance of memory reference overhead.
 Segmentation

The partition of memory into logical units called segments, according to the
user’s perspective is called segmentation. Segmentation allows each segment to
grow independently, and share. In other words, segmentation is a technique
that partition memory into logically related units called a segment. It means
that the program is a collection of the segment.

Unlike pages, segments can vary in size. This requires the MMU to manage
segmented memory somewhat differently than it would manage paged memory.
A segmented MMU contains a segment table to maintain track of the segments
resident in memory.

A segment can initiate at one of several addresses and can be of any size, each
segment table entry should contain the start address and segment size. Some
system allows a segment to start at any address, while other limits the start
address. One such limit is found in the Intel X86 architecture, which requires a
segment to start at an address that has 6000 as its four low-order bits.

Difference between Virtual Memory and Cache


Memory
The following table highlights all the important differences between Cache
Memory and Virtual Memory −

Factor Virtual Memory Cache Memory

Objective Virtual memory increase main Cache memory


memory capacity. increase CPU
access speed.

Memory Unit Virtual memory is a technique Cache memory is a


and involves hard disk and is memory unit and is
slower to access. very fast to access.

Management Operating System manages CPU and related


virtual memory. hardware manages
cache memory.
Size Size of virtual memory is much Cache memory is
larger than cache memory. small in size.

Operation Virtual memory keeps the Cache memory


programs which are not getting keeps recently used
accommodated in main data.
memory.

Mapping Mapping structures are required There is no need of


Structure in the virtual memory to map mapping structures
virtual addresses to physical in the cache
addresses. memory.

You might also like