Problems of virtual memory
implementation: Memory fragmentation
The main problem that occurs when using virtual memory is the efficiency
of its implementation. Because address conversions need to be done every
time memory is accessed, careless implementation of these conversions can
have the worst effect on the performance of the entire system. If most
memory accesses make the system actually have to access the disk (which
is tens of thousands of times slower than the main memory), it will be
virtually impossible to operate such a system. The
issue of improving the
performance of virtual memory implementation will be discussed.
Another problem is the memory fragmentation that occurs when free
memory cannot be used. There are
internal and
external memory
fragmentations. The external is reduced to the fact that due to the allocation
and
subsequent freeing of memory, it creates free blocks of small size
-
holes . Because of this situation may arise in which it is impossible to
provide a continuous memory block size N, because there is no contiguous
free block of size S ≥ N, although in general, the amount of free memory
space more than N.
So in the above case, there is not enough space to
execute the P5 process due to external fragmentation.
Internal fragmentation is the result that, on request, memory blocks larger
than actually used are allocated, resulting
in unused areas inside the
dedicated blocks that can no longer be allocated to something else.