Monday, February 25, 2008

be nice

In my previous post, I gave an example command to create an (uncompressed) ISO image from a CD/DVD. The actual command was preceded by 'nice -n +19'.

Briefly, a little bit about this 'nice' command since even though I don't use it very often, it can be a very useful tool, specially on laptops like mine where I am anyways struggling for processor resources.

So, 'nice' is a command for POSIX-complaint OS'es using which you can control the priority of a process with -20 being the highest value and +19 being the lowest priority. The default value is 0, which is inherited from its parent (shell being the most likely parent).

Obviously, a lot depends on how the scheduler is designed, where the 'nice' value is probably just a part of a complicated set of parameters used to determine which task should be run next. But, it does give you a user-level control, specially when doing non-priority tasks like creating ISO copies, etc.

No comments: