Difference between internal and external fragmentation in operating system
In this video i will be explaining the difference between internal and external fragmentation or two types of fragmentation based on memory management techniques.
Internal Fragmentation
1)When a process is allocated more memory than required, few space is left unused and this is called as INTERNAL FRAGMENTATION.
2)It occurs when memory is divided into fixed-sized partitions.
3) It can be cured by allocating memory dynamically or having
partitions of different sizes.
External Fragmentation
1)After execution of processes when they are swapped out of memory and other smaller processes replace them, many small non contiguous(adjacent) blocks of unused spaces are formed which can serve a new request if all of them are put together but as they are not adjacent to each other a new request can't be served and this is known as EXTERNAL FRAGMENTATION.
2)It occurs when memory is divided into variable-sized partitions based on size of process.
3)It can be cured by Compaction, Paging and Segmentation.
Internal Fragmentation
1)It arises when we use fixed sized partitioning.
2)Some part of the memory is kept for operating system and the rest is available for user space.
3)In this case the user space is divided into blocks of 10 KB each.
When process 1 with size 8 KB is allocated a block of 10 KB, 2 KB space is left unused. When process 2 with size 10 KB is allocated a !0 KB block no space is left unused. When process 3 with size 9KB is allocated a 10 KB block, 1KB is left unused.
4)Here 2 processes are allocated space more than required and this unused space is so small to store a new process and is wasted. This is called as INTERNAL FRAGMENTATION.
External Fragmentation
1)It arises when dynamic partitioning technique is used.
2)Here memory is allocated to the processes dynamically based on their size.
3)So in the above example, the user space contains processes 1,2 & 3 Out of which process 1 & 3 complete their execution and are swapped out and two other processes, process 4 & 5 are swapped in their places.
4)Process 4 takes place of process 1 but as its size is only 8 KB, it is allocated only 8 KB and rest is left unused.
Process 5 takes place of process 3. It is allocated 6 KB space and 8 KB is left unused.
5)Now suppose a new process, process 6 wants to be swapped in and its size is 6 KB. Though we have total 6 KB space but we cannot service this request as these blocks are not contiguous(adjacent). This is called as EXTERNAL FRAGMENTATION.
Пікірлер: 32
the only clear and fast explanation on youtube, thanks!
tomorrow is my OS exam and now I understood this very clearly.Thanks so much.
@lastmomentlearning4184
6 жыл бұрын
+Manish Prabhakaran Happy to help you! All the best for your exam!
Clear as day, thanks for the quick explanation
brief but very detailed explanation. Thank you
@lastmomentlearning4184
6 жыл бұрын
+testament T welcome!
Superb bro!! Thank u🔥
Thanks for this video. ... its really simple and understandable for exam point if view. .... so keep sharing such videos
Thanks ...ab jaa k smjh aaya
Thank you for the effort for making this tutorial video. Really useful indeed. Keep it up
amazing bro really deep understanding
Very well explained, your pictures helped a lot.
Awesome video! Thanks!
Thankew so much man ❤️✌🏻
Great explanation for last minute :P
awesomeeeeeeeeeeeeeeeeee
thanks a lot bro..
@lastmomentlearning4184
6 жыл бұрын
Happy to help! :)
nice explanation
life saver!
Thanku sir
Nice explanation
@lastmomentlearning4184
6 жыл бұрын
+Kingberli Capellan Thank you :)
Tq hareesh
@lastmomentlearning4184
6 жыл бұрын
aswanth nayak it's Harsh! And you're welcome! :)
Thanks
Also Bankers Algorithm video
Very good way 👏explain but speak in Hindi also make us more comfortable.
Make voides on semiconductor and PN junction
Could you make a video on Inodes?
@lastmomentlearning4184
6 жыл бұрын
+Prithvi Kunder sure I'll try
fixed partion me external fragmentation hota h?? explain it..