First page Back Continue Last page Overview Graphics
Bad memory management examples
Both host and UML are swapping
- They will both swap out the same pages
- Host swaps out an unused UML page
- UML swaps out the same page
- UML reallocates it
- Host is immediately forced to read it back in
- Makes a bad situation worse if the host is I/O bound, which is likely
Notes:
Here is an example of two independent memory management systems interacting to produce a very bad situation.
If both the UML and host are swapping, they will both need to choose pages to write to swap. It is likely that they will choose some of the same pages, since they are using the same criteria to choose them.
So, if both the host and UML choose the same page for swapout, and the host wins the race, and writes it out and frees it, the UML will follow by swapping it out to its own swap area, release it, and reuse it. This will immediately force the host to read it back in from its own swap.
The result is extra, unnecessary IO in a situation where the host was already likely to be IO bound. In a truly bad situation, the UML forcing pages to be immediately read back in after being swapped could contribute to thrashing.