Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!snorkelwacker!bloom-beacon!eng.sun.COM!dshr From: dshr@eng.sun.COM (David Rosenthal) Newsgroups: comp.windows.x Subject: Re: window manager swapping (was Re: Another R5 wish) Message-ID: <9009251613.AA19362@devnull.Eng.Sun.COM> Date: 25 Sep 90 16:02:38 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 37 > Quoting from the man page: > "If an executable file is set up for sharing (this is the > default) then mode 01000 (save text image after execution) > prevents the system from abandoning the swap-space image of > the program-text portion of the file when its last user ter- > minates." > > In other words, it won't get swapped out. The con is that it'll always > be there, but you'd probably want to keep the window manager in memory > anyway. > Even in old, pre-virtual-memory, Unix systems like the one you seem to have got the man page from the sticky bit had no influence on whether or not the program was swapped out while it was running. It controlled whether starting up a new version of the process could get its image from swap space or from the file system. Getting it from swap was typically faster. The con was that the image consumed swap space (not memory) all the time whether or not a process was running that image. Since the window manager is started once and runs continually, the sticky bit is irrelevant even in swap-based systems. In modern virtual-memory Unix systems the sticky bit on files typically has no effect. Swapping a process (which in this context means pushing its u-area to swap and unloading all its mappings) saves very little resource, so it isn't common. And since the image is moved to and from disk by random page faults rather than by a single contiguous I/O, there is no performance advantage to getting the image pages from swap rather than the file system. To decrease the time needed to get the window manager started, set its process priority higher (nice). This normally has no effect on the priority the system places on satisfying the winodw manager's page faults, but it will ensure that the system won't run any other process when it could be running the window manager, and thus the page faults will be detected earlier than they would otherwise be. David.