No, you just workaround a missing feature of the kernel: The ability to have
things run only if nothing important (interactive jobs ...) can be done.
With your shell script logic, you should start to try to figure out, what
the names of the processes, which were meant for IDLE scheduling, and sent
them SIGSTOP if you don't want to be disturbed. At the end you wake them
again with SIGCONT.
You are not even allowed to do that for other user's jobs on a multiuser
machine.
This is totally broken by design. You will have to guess which jobs were
meant for IDLE scheduling. You will use some heuristic and guess, that all
niced'19 jobs with names rc5des, cracker, ...
It's the one who starts an IDLE job who should decide about a job being idle
or not, not somebody who want to run a nice'd job (which is something
completely different!) and wants not to compete with IDLE jobs.
You need scheduler support for this, face it!
Nobody claims, that this makes Linux a full RT system, which a simple
scheduler patch won't do and which is probably not possible without changing
some major design features of Linux.
I do maintain, however, that this feature is very useful for a lot of
people, most of them just using rc5des or cracker.
Regards,
-- Kurt Garloff <K.Garloff@ping.de> (Dortmund, FRG) PGP key on http://student.physik.uni-dortmund.de/homepages/garloff Unix IS user friendly - it's just selective about who its friends are!- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/