[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 28 Jun 2009 12:13:09 -0700
Thunderbird 220.127.116.11 (Windows/20090605)
I thought I remembered a 'bgnice' value under the 'set' or shopt
options.... It doesn't seem to be in my current bash. Was that
only a ksh-ism?
Maybe a feature add for bash? (also, adding a ENV var to alter the
the bg-process prio mod would be a cool addition...but no biggy either
way -- there's always nice & renice for those who always remember in
For those who don't know what I'm talking about, bgnice (as I remember
it, been a while), when it was set to "on", automatically
"niced" any process that you launched with a "&" (i.e. in background).
If you launched a process in foreground, then suspended, then did a "bg",
the nice value was not changed -- so it only applied to processes you
explicitly launched in background.
The background processes ran at a default 4 levels below the foreground
process (like nice -4 ..., or renice 4 xxx).
Always thought it might be 'nice' if the default was able to be user-specified.
Along the methods I mentioned above:
ENV: export BGNICE="19".
My _tendency_ would be to limit the auto-bg-nicing to "lowering the cpu or
nice value (use absolute value of BGNICE). That way if either BGNICE=-19 or BGNICE=19 would set the bg-nice to lower the prio by 19 from the current
process. If a user really wanted to put a background process into a higher
priority, they'd have to do it manually (nice/renice), but the bgnice feature
would only create background processes with lower priority.
Additional: perhaps if user specifies "20/-20" and is using an OS that
supports "idle" scheduling, then set scheduling class to 'idle' (sgi unix did
this automatically, if I remember, just using the standard 'nice' command).
Just a question, maybe idea for future...
Linda Walsh <=
- Re: bgnice?, Chet Ramey, 2009/06/28
- Message not available