Unit 4 - Memory Organization
Unit 4 - Memory Organization
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
• 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.
• 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
• 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
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.