Question

I am wondering why data fragmentation is a problem on main memory.

On a software level, virtual addresses are used anyway. So why can one address space not be split up into multiple segments, like a hard disk might do? I don't see how the performance would be affected, as the time needed to access memory addresses does not vary. Is this just a limit of the MMU?

In other words, my question is why does a process need continuous memory segments? For example:

Table, 1 Row, 5 equally big cells. Cell 1 is allocated to Process A, Cell 2 and 4 are free (not allocated), Cell 3 is allocated to Process B, Cell 4 is allocated to Process C.

Process D requests a memory block that could fit into the two free segments, if the block were split into two pieces. Why can't this be done?

Table, 1 Row, 5 cells. Cell 1 is allocated to Process A, Cell 2 and 4 are allocated to Process D (which got split/fragmented to fit), Cell 3 is allocated to Process B, Cell 4 is allocated to Process C.

It would be great if you could add a source so I could read more about this topic, if you have one.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top