Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!es!Robert_Toxen%anvil.UUCP@harvard.arpa From: Robert_Toxen%anvil.UUCP@harvard.arpa Newsgroups: net.unix-wizards Subject: Re: vi & heavy loads Message-ID: <2144@brl-smoke.ARPA> Date: Sat, 12-Jul-86 01:10:52 EDT Article-I.D.: brl-smok.2144 Posted: Sat Jul 12 01:10:52 1986 Date-Received: Sat, 12-Jul-86 10:27:21 EDT Sender: news@brl-smoke.ARPA Lines: 22 A simple solution that I've implemented to allow reasonable response for vi on a system with heavy loads such as lots of compiles and nroffs is as follows. Rename vi vi_foo. Create a program called vi, set-UID to root that boosts its niceness to -10 and lock itself into core (for those UNIX versions allowing such things), set its effective UID to its real UID, and exec vi_foo with vi's arguments. Even with those versions of UNIX that don't explicitly have the "lock in core" feature you can fake it by copying code from ps that will find a process's process table entry and find its flag word. Then turn on one of the lock bits, perhaps the one for "lock in core for pending physical I/O". Since vi doesn't do such things, this bit won't be cleared and viola you've implemented the feature. I don't have the source any more. Bob Toxen Stratus Computer {ucbvax!ihnp4,harvard}!anvil!bob (Please use THIS address to reply) "panic: can't happen"