[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDL and 'nice' question




Randall Skelton <rhskelto@atm.ox.ac.uk> writes:


> Hi all,
> 
> I have a question regarding setting the priority of IDL on a *nix
> operating system.  There are certain instances when it is desirable to
> set the priority of idl to a lower priority with the nice command.  Of
> course, typing 'idl' at the command-line is actually a front-end to a shell
> script and not an actual binary.  Are there any foreseeable problems in
> starting the idl binary directly with 'nice -19 $IDL_DIR/bin/idl' as
> opposed to staring the shell script?

Before you go get yourself all twisted in a knot of DLMs, I think
things are alot easier than you thing.

First thing, I think you are confusing low and high priority.  For the
non-unix among us, the "nice" command allows a user to set the process
priority, which is essentially how much attention the CPU will give a
program.  Running programs with low priority are readily bumped in
favor of higher priority programs.  A *positive* nice number indicates
a lower priority -- it is more "nice" to others; a negative nice
number is a higher priority.  Thus your use of "-19" and "low
priority" don't seem to be the right mix.

Second, I believe that a process's "nice" level is inherited by any
subprocesses.  [ That has to be the case, otherwise a program could
escape it's priority constraints by spawning a new copy of itself. ]
So it shouldn't matter that the "idl" command is a script.

If you really need to nice the binary itself, why not copy the
existing idl script to a new file called "niceidl" and add the nice
command at the last step?

Good luck,
Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------