Does it actually work?
Does it actually work?
Posted Apr 11, 2025 12:44 UTC (Fri) by khim (subscriber, #9252)In reply to: Does it actually work? by Wol
Parent article: Three ways to rework the swap subsystem
> And I may well be out of date, but people seem to be conflating swapping and paging.
Well… there's a reason for that. Indeed, you are a bit out of date. About 30-40 years our of date, give or take.
> Am I right, in that a *swap* system *swaps processes* in and out of memory. While a *paging* system *swaps pages* in and out of memory. Which is why systems that page don't become as slow as systems that swap.That's true, but the problem here is that the last system that was swapping out processes that someone may have had a chance to use was probably a DOS Shell that was included in MS DOS 4 (that's year 1988), moved to supelement disk in MS DOS 6 (that's year 1993) and excluded from Windows 95 (and later version). DR-DOS also had similar thing (it was born out of Concurrent_CP/M-86 that was used swapping, after all), but I don't remember the dates.
Linux, Windows and macOS never used this strategy and thus it's very hard for anyone to even recall that ever existed.
> So a swapping system will be (relatively) slow because it's forever flushing and retrieving entire processes. A paging system on the other hand, will be dropping clean cold pages if required, so any program that is actively running will normally keep its hot paths in RAM without being dropped.You are absolutely correct, but in a world where “a swapping system” is “something that briefly existed very long time ago and for a relatively short time”… most people wouldn't even understand what you are talking about when you would start discussing that difference. Paging needs support in hardware to be efficient, but after Intel made said support mandatory with introduction of 80386 in 1985 no one was even thinking about using “a swapping systems” for anything anywhere.
From what I understand swapping was popular before introduction of IBM/370 in 1970, but I don't know the history of computers well enough to say how exactly “a swapping systems” and “a paging system” competed 50 years ago. “A swapping systems” were already a stuff that you read in a history book and not use for work, when Linus started work on Linux, thus, of course, in the context of Linux they don't matter at all.
