embryo2 wrote:I don't want to convince anybody not to use paging, but I want to remind that the paging is just one of possible memory management strategies and it's disadvantages should be considered very carefully. And as a result - alternate memory management strategies also should be explored.
Well, the disadvantage of paging does NOT equal the disadvantage of not paging.
Without paging, you will never get into Long Mode, access >3GB of RAM, run multiple processes at once (yes segmentation exists on SOME processors so last is not 100% true) [just lost 70% of my systems resources, where's my 8GB of ram?]
With paging, you have to keep track of tables (1-4 layers depending on page size and type). [not much of a disadvantage IMO]
These are only the first things I thought of...
Even if an application haven't noticed anything the user really notices that the application is almost dead. And (at least under Windows) if there's not enough memory then the whole OS goes "down". Very unpleasant situation.
In my experience windows will not go down, paging to HDD will start and slow the system to a crawl. When the system is slow the app trying to use the pages on the HDD will be waiting for data and not responding the "I'm Alive" ping - and windows sees the program as crashed, if you touch it it closes if you don't it may stay open until its data arrives.
Or if its out of video memory you may have a full crash (I blame NVidia)
But, yes paging to HDD should be avoided! If you must, check speeds on disks and find the quickest one, and only cache low priority - hardly used - data