0% found this document useful (0 votes)
2 views

Unit 4 - Memory Organization

Chapter 4 discusses memory organization in computers, detailing the types of memory including volatile and non-volatile, as well as the hierarchy from auxiliary to cache memory. It explains the functions of main memory, cache memory, associative memory, and virtual memory, along with memory management techniques such as swapping, fragmentation, paging, and segmentation. The chapter emphasizes the importance of memory management in optimizing the use of memory resources during computer operations.

Uploaded by

chibunnajoe31
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit 4 - Memory Organization

Chapter 4 discusses memory organization in computers, detailing the types of memory including volatile and non-volatile, as well as the hierarchy from auxiliary to cache memory. It explains the functions of main memory, cache memory, associative memory, and virtual memory, along with memory management techniques such as swapping, fragmentation, paging, and segmentation. The chapter emphasizes the importance of memory management in optimizing the use of memory resources during computer operations.

Uploaded by

chibunnajoe31
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Chapter 4

Memory Organization
BCA , Sem - II
Computer Memory
• 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

Internal Memory External memory

• CPU Register • Main (Primary ) memory


• Auxiliary (Secondary) memory
• Cache memory
Memory Hierarchy

• 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.
• Auxiliary 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.
Main Memory

• The memory unit that communicates directly within the CPU, Auxiliary 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 holding 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.

• ROM: Read Only Memory


•It 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.
Auxiliary Memory

• Devices that provide backup storage are called auxiliary memory.


• For example: Magnetic disks and tapes are commonly used auxiliary devices.
• Other devices used as auxiliary memory are magnetic drums and optical disks.
• It is not directly accessible to the CPU, and is accessed using the Input/Output channels.
Cache Memory

• The data or contents of the main memory that are used again and again by CPU, are stored in the cache memory so that we can
easily access that data in shorter time.
• 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.
• It also transfers block of recent data into the cache and keeps on deleting the old data in cache to accommodate the new one.

Main
Memory CPU

Cache
Memory
Associative Memory

• An associative memory can be considered as a memory unit whose stored data


can be identified for access by the content of the data itself rather than by an
address or memory location.
• Associative memory is often referred to as Content Addressable Memory (CAM).
• When a write operation is performed on associative memory, no address or
memory location is given to the word.
• The memory itself is capable of finding an empty unused location to store the
word.
• When the word is to be read from an associative memory, the content of the
word, or part of the word, is specified.
• The words which match the specified content are located by the memory and are
marked for reading.
Virtual Memory

• Virtual Memory is a storage scheme that provides user an illusion of


having a very big main memory.
• This is done by treating a part of secondary memory as the main
memory.
• In this scheme, whenever some pages needs to be loaded in the
main memory for the execution and the memory is not available for
those many pages, then in that case, instead of stopping the pages
from entering in the main memory, the OS search for the RAM area
that are least used in the recent times or that are not referenced
and copy that into the secondary memory to make the space for the
new pages in the main memory.
• Since all this procedure happens automatically, therefore it makes
the computer feel like it is having the unlimited RAM.
Memory Management

• Memory management is the functionality of an operating system which handles or manages primary memory and moves
processes back and forth between main memory and disk during execution.
• Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or
it is free. It checks how much memory is to be allocated to processes.
• It decides which process will get memory at what time.
• It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status.
Memory Management Methods
Memory Management Methods

Swapping

• A process needs to be in memory for execution.


• But sometimes there is not enough main memory to hold all the currently active processes.
• So, the excess process is kept on disk and brought in to run dynamically.
• Swapping is the process of bringing in each process in the main memory, running it for a while, and then putting it back to
the disk.

Fragmentation

• A Fragmentation is defined as when the process is loaded and removed after execution from memory, it creates a small free hole.
• These holes can not be assigned to new processes because holes are not combined or do not fulfill the memory requirement of
the process.
• To achieve a degree of multiprogramming, we must reduce the waste of memory or fragmentation problem
Memory Management Methods

Paging

• Paging is a memory management scheme that eliminates the need for contiguous allocation of physical memory.
• This scheme permits the physical address space of a process to be non-contiguous.
• The mapping from virtual to physical address is done by the memory management unit (MMU) which is a hardware device
and this mapping is known as the paging technique.

Segmentation
• Segmentation refers to the technique of dividing the physical memory space into
multiple blocks.
• Each block has specific length and is known as a segment.
• Each segment has a starting address called the base address.
• The length of the segment determines the availability memory space in the segment.

You might also like