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

  • @silviohoppen2352
    @silviohoppen23523 жыл бұрын

    the only clear and fast explanation on youtube, thanks!

  • @manishprabhakaran1561
    @manishprabhakaran15616 жыл бұрын

    tomorrow is my OS exam and now I understood this very clearly​.Thanks so much.

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    +Manish Prabhakaran Happy to help you! All the best for your exam!

  • @cossco8081
    @cossco80812 жыл бұрын

    Clear as day, thanks for the quick explanation

  • @supongmenwalling6929
    @supongmenwalling69296 жыл бұрын

    brief but very detailed explanation. Thank you

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    +testament T welcome!

  • @samruddhisatpute2526
    @samruddhisatpute25263 жыл бұрын

    Superb bro!! Thank u🔥

  • @rashmisingh8815
    @rashmisingh88155 жыл бұрын

    Thanks for this video. ... its really simple and understandable for exam point if view. .... so keep sharing such videos

  • @gforgaming8933
    @gforgaming89336 жыл бұрын

    Thanks ...ab jaa k smjh aaya

  • @Alvin-eq5rc
    @Alvin-eq5rc6 жыл бұрын

    Thank you for the effort for making this tutorial video. Really useful indeed. Keep it up

  • @sibgatwani3595
    @sibgatwani35956 жыл бұрын

    amazing bro really deep understanding

  • @rogermanea2140
    @rogermanea21405 жыл бұрын

    Very well explained, your pictures helped a lot.

  • @CamKnoppMusic
    @CamKnoppMusic4 жыл бұрын

    Awesome video! Thanks!

  • @ankityadav-nv3cd
    @ankityadav-nv3cd5 жыл бұрын

    Thankew so much man ❤️✌🏻

  • @sanarapremaratne2135
    @sanarapremaratne21356 жыл бұрын

    Great explanation for last minute :P

  • @pleasesirmorevideos4684
    @pleasesirmorevideos46843 жыл бұрын

    awesomeeeeeeeeeeeeeeeeee

  • @torpid3667
    @torpid36676 жыл бұрын

    thanks a lot bro..

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    Happy to help! :)

  • @rpafacts5574
    @rpafacts55745 жыл бұрын

    nice explanation

  • @taylorhao8868
    @taylorhao88685 жыл бұрын

    life saver!

  • @studywithmonalisha2048
    @studywithmonalisha20484 жыл бұрын

    Thanku sir

  • @kingberlicapellan2626
    @kingberlicapellan26266 жыл бұрын

    Nice explanation

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    +Kingberli Capellan Thank you :)

  • @aswanthnayak6445
    @aswanthnayak64456 жыл бұрын

    Tq hareesh

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    aswanth nayak it's Harsh! And you're welcome! :)

  • @sunita_official8676
    @sunita_official86765 жыл бұрын

    Thanks

  • @prithvikunder7110
    @prithvikunder71106 жыл бұрын

    Also Bankers Algorithm video

  • @nishchaysoni2972
    @nishchaysoni29726 жыл бұрын

    Very good way 👏explain but speak in Hindi also make us more comfortable.

  • @nishchaysoni2972
    @nishchaysoni29726 жыл бұрын

    Make voides on semiconductor and PN junction

  • @prithvikunder7110
    @prithvikunder71106 жыл бұрын

    Could you make a video on Inodes?

  • @lastmomentlearning4184

    @lastmomentlearning4184

    6 жыл бұрын

    +Prithvi Kunder sure I'll try

  • @adityaanand835
    @adityaanand8356 жыл бұрын

    fixed partion me external fragmentation hota h?? explain it..