Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!apple!bionet!agate!ucbvax!decwrl!labrea!polya!shap From: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Newsgroups: comp.sys.next Subject: Re: Paging and swapping to a removable disk? Message-ID: <4632@polya.Stanford.EDU> Date: 23 Oct 88 21:53:41 GMT References: <12670001@eecs.nwu.edu> <3924@encore.UUCP> <783@drexel.UUCP> Reply-To: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Organization: Stanford University Lines: 42 In article <783@drexel.UUCP> jeff@drexel.UUCP (Jeff White) writes: [ The context is a discussion of switching removable optifloppies] > Would it be possible to just turn off the paging/swapping feature? We need to distinguish two sorts of things here. The first is using information actively from two different floppies using 1 drive. The second is copying data between drives. If you will, the issue is interactive versus archival use of the second optifloppy. If the system pages to one device, it is reasonable to expect that even if you *could* address the problem, you wouldn't want to. The need to swap optifloppies would arise too often, and figuring out just what in the UNIX system to make memory resident to manage the problem is nontrivial. If, on the other hand, you are concerned with copying distributed software onto/off-of your active optifloppy, or backing it up, you have something of a different problem, and one which is more practically doable. Mind you, I don't know if NeXT has done this, but here is how I think it might be done: 1. *Swap* out all of the currently running processes. This would use the same mechanism that the BSD kernel uses when paging gets to be too bad. At some point it gives up and forces someone out to make paging work again. 2. flush the buffer cache(s) 3. Swap in whatever system programs you *really* need. 4. Swap in the disk copy program, and make it runnable. 5. Disk copy program can now allocate memory, using a priori knowledge ofthe amount of memory available given the system memory configuration. 6. Disk copy program then copies whatever. 7. Disk copy program exits. OS swaps rest of world back in. Now there are lots of details to worry about, but this strategy might work.