eli@ursa-major.spdcc.com (Steve Elias) (02/16/89)
what are people's feelings about using the sticky bit to improve interactive performance on workstations? would i be shooting anyone in the foot if i turned on the sticky bit for our gnu-emacs editor? has anyone tried this? steve elias (eli@spdcc.com) [[ I've often wondered just what the sticky bit does in a demand-paged VM system. The documentation isn't what I would call descriptive about this. I have a vague idea what it's suppsed to do, but what does it *actually* do? --wnl ]]
galvin-peter@yale-bulldog.arpa (Peter Baer Galvin) (02/28/89)
Under Berkeley Unix an executable program is copied into system swap space before execution is started. Paging of the program is done from swap space rather than from the executable in the file system because (according to Karels I think) going through the file system would take 3 times longer. When the last processes using the image exits, the image is removed from swap. The sticky bit tells the OS not to delete the image in swap space, even if no processes are using that image. This saves the overhead of the copy from file system to swap space. The down side is that the swap space is then not usable by other programs until the system in question reboots. If you always have an emacs running (as I do) then setting it sticky doesn't do much, one way or the other. --Peter Peter Baer Galvin (203)432-1254 Senior Systems Programmer, Yale Univ. C.S. galvin-peter@cs.yale.edu 51 Prospect St, P.O.Box 2158, Yale Station ucbvax!decvax!yale!galvin-peter New Haven, Ct 06457 galvin-peter@yalecs.bitnet
joerg@sun.com (Joerg Schilling) (03/02/89)
The sticky bit has been redefined for Sun OS 4.0 : It now means not to cache write blocks and is used for NFS swap partitions to prevent blowing up the page cash on a server. Do not use it on executable files. (The only file on a 3.x Release with the sticky bit turned on was vi which now has 755) The manual pages are *wrong* in case of executable files !!!! For directories have a look at the manual page: man 8 sticky. J. Schilling H. Berthold AG Teltowkanalstr. 1-4 D 1000 Berlin 46 +49 30 7795 - 400 joerg@berthold.DE ... tub!berthold!joerg ... unido!berthold!joerg ... sunmuc!berthold!joerg ... sun!sunmuc!berthold!joerg
glenn@wheaties.ai.mit.edu (Glenn A. Adams) (03/06/89)
> I've often wondered just what the sticky bit does in a demand-paged VM > system. The documentation isn't what I would call descriptive about this. > I have a vague idea what it's suppsed to do, but what does it *actually* > do? --wnl At least under 4.3BSD, it is superfluous since freed text pages and text page tables are kept around for reclaim unless memory demands are really heavy. See the discussion in Leffler's "4.3BSD Implementation" for more details. I'm almost certain Sun's OS maintains this reclaim policy also. Glenn Adams