Question about paging and swapping
Howard C. Hart
hart at nova.laic.uucp
Wed Jun 14 06:03:47 AEST 1989
In article <381 at biophys.UUCP> ruba at biophys.UUCP (Rudolf Baumann) writes:
>I would like a clear description about the difference of paging and
>swapping and which of both has more influence on the performance of
>a system. I could yet not found an clear answer to this question
As an instructor of mine very aptly put it, you're the manager of a
company, trying to get some work done (the CPU), but all the workers
(processess) keep interrupting with their inputs/tasks that just have
to be done right away. You can try to respond to each of them one
subtask at a time (a page), then interrupt that subtask to service
another workers subtask (another page) and so on, or you can be more
efficient and service a whole worker's task at a time (swap many pages
in sequence) without allowing interruptions by other workers. This
avoids the overhead of too many changes of subject (context switches)
brought on by answering a very small portion of each worker's questions
, then moving on to the other.
Please note, this analogy has holes in it big enough to drive a tank
through, but you did ask for a clear description. As for relative
performance, I'll give you the party line...it depends on the
size of the application and other factors. The above explanation should
give you a first cut at which method shows higher performance. Swapping
is usually better, but if you could fit many processes on one page each,
the inherent overhead in swapping would make it slower than paging.
Howard C. Hart UUCP:{sun!sunncal,pyramid}!leadsv!laic!nova!hart
Lockheed Missiles and Space Co.
Orgn 59-53, Bldg 593 Ph: (408) 743-2253 or -7353
Sunnyvale, CA 94086
More information about the Comp.unix.questions
mailing list