Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!versatc!leadsv!laic!nova!hart From: hart@nova.laic.uucp (Howard C. Hart) Newsgroups: comp.unix.questions Subject: Re: Question about paging and swapping Summary: paging/swapping in a nutshell Keywords: paging swapping Message-ID: <584@laic.UUCP> Date: 13 Jun 89 20:03:47 GMT References: <381@biophys.UUCP> Sender: news@laic.UUCP Reply-To: hart@nova.UUCP (Howard C. Hart) Distribution: usa Organization: Lockheed AI Center, Menlo Park Lines: 29 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 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