1.碎片:
顾名思义,碎片化实际上是将可用内存空间分解成小块的过程。在这种情况下,由于存储块的尺寸较小,因此无法将其分配给进程,并且这些块仍未使用。当许多可用块太小而无法满足任何请求时,通常会在动态内存分配系统中发生这种情况。
2.细分:
顾名思义,分段基本上是一种支持用户的内存视图的内存管理技术,也称为非连续内存分配技术。在这种情况下,每个过程分为多个段,有关每个段的详细信息可以存储在称为段表的表中。从本质上讲,这是一个在计算机存储中为相关数据创建大小可变的地址空间的过程。段的大小不固定。
OS中的分段和分段之间的区别:
Fragmentation |
Segmentation |
---|---|
In this, storage space is used inefficiently that in turn reduce capacity and performance. | In this, memory is divided into variable size parts usually known as segments. |
Types of fragmentation includes internal and external fragmentation. | Types of segmentation includes virtual memory and simple segmentation. |
Its main purpose is to help operating system use the available space on storage device. | Its main purpose is to give user’s view of process. |
It reduces efficiency in memory management. | It simply allows for better efficiency in memory management. |
In this, memory blocks are not used i.e., it remains unused. | It usually works a memory management technique to execute processes. |
It is generally associated with IP. | It is generally associated with TCP. |
It is an unwanted problem that causes wastage of memory and inflexibility. | Its advantages include less overhead, larger segment size than actual page size, no internal fragmentation, etc. |