Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!tut.cis.ohio-state.edu!att!cbnewsh!dwc From: dwc@cbnewsh.ATT.COM (Malaclypse the Elder) Newsgroups: comp.unix.questions Subject: Re: Question about paging and swapping Keywords: paging swapping Message-ID: <1449@cbnewsh.ATT.COM> Date: 15 Jun 89 02:22:47 GMT References: <381@biophys.UUCP> <584@laic.UUCP> Distribution: usa Organization: The Legion of Dynamic Discord Lines: 36 In article <584@laic.UUCP>, hart@nova.laic.uucp (Howard C. Hart) writes: > In article <381@biophys.UUCP> ruba@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 > > AN ANALOGY WAS GIVEN HERE i have my own analogy that i have been using and it gives a good feel for the tradeoffs involved. imagine a copy machine with a number of users who must copy memos. and suppose this copy machine has one of those automatic feeders. then the difference between swapping and paging is akin to allowing the users to use the feeder (swapping) or limiting them to one sheet at a time and then getting on the end of the line (paging). you might say that it would seem that swapping is always preferable but note that the paging scheme is "fairer". and more importantly, what if the purpose of the copying were to copy on a few (maybe every Nth) pages out of each memo? then the analogy becomes forcing them to use the sheet feeder for their entire document (swapping) or allowing them to do a single sheet, the one they really need, at a time (paging). i think this captures the essence of the tradeoff. of course the obvious solution is to allow the users to use the feeder when it is prudent to do so, subject to some limits (in our company there is a sign at the public service machines that says "please limit yourself to 20 copies of 20 originals"), and to do single sheet at a time when they think it wise. thus most systems have some form of both paging and swapping although i feel that there is usually too much reliance on the paging mechanism to manage memory resources (extend the analogy further to include requiring the users to both get to the copy glass AND obtain plain paper to copy on (ie obtain physical memory), etc. and imagine the lines at the copy machine) danny chen att!hocus!dwc