Fragmentation | Memory Compaction |A/L ICT| S.N.VITHOO | ICT Foundation| Tamil | Operating Systems
2.8K views · 23 Mar 2022 · 11 min
Fragmentation
Fragmentation is an unwanted problem where the memory blocks cannot be allocated to the processes due to their small size and the blocks remain unused. It can also be understood as when the processes are loaded and removed from the memory they create free space or hole in the memory and these small blocks cannot be allocated to new upcoming processes and results in inefficient use of memory. Basically, there are two types of fragmentation:
Internal Fragmentation
External Fragmentation
Internal Fragmentation
In this fragmentation, the process is allocated a memory block of size more than the size of that process. Due to this some part of the memory is left unused and this cause internal fragmentation.
Example: Suppose there is fixed partitioning (i.e. the memory blocks are of fixed sizes) is used for memory allocation in RAM. These sizes are 2MB, 4MB, 4MB, 8MB. Some part of this RAM is occupied by the Operating System (OS).
Now, suppose a process P1 of size 3MB comes and it gets memory block of size 4MB. So, the 1MB that is free in this block is wasted and this space can’t be utilized for allocating memory to some other process. This is called internal fragmentation.
External Fragmentation
In this fragmentation, although we have total space available that is needed by a process still we are not able to put that process in the memory because that space is not contiguous. This is called external fragmentation.
Example: Suppose in the above example, if three new processes P2, P3, and P4 come of sizes 2MB, 3MB, and 6MB respectively. Now, these processes get memory blocks of size 2MB, 4MB and 8MB respectively allocated.
Previous Videos:
Disk Fragmentation : https://youtu.be/5F1wB8KeQ8A
Memory Addressing: https://youtu.be/v7mkVxU_frI
Word Processors: https://youtu.be/9JeEYLw2dvs
Token Ring Protocol : https://youtu.be/8YE9z0hRpQ4
Redundancy Law : https://youtu.be/pSWVr1AEeAo
Database. Transactions: https://youtu.be/4GP1mpmg7QA
Data Anomalies : https://youtu.be/JuPrwsoS4Ys
Database Schema : https://youtu.be/93SvvG6fiG0
Three way handshake : https://youtu.be/f3_kZxFk984
Follow us :
Web : http://bit.ly/ictfoundationofficial
Instagram : https://www.instagram.com/ict_foundation/
Telegram : https://t.me/joinchat/1lnmQnzMtxZiZmQ9
Facebook : https://www.facebook.com/ICT-Foundation-106879784957831
Youtube : https://www.youtube.com/channel/UCIrMAIw4JsCg3cCkqvH_R0Q
TikTok : https://vm.tiktok.com/ZSeCWo3yU/