Question regarding nice


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Question regarding nice
# 1  
Old 02-03-2006
Question regarding nice

If i use nice/renice to increase the priority of any process, will that process get a higher priority when it comes to I/O? If there are two processes waiting on I/O requests, will the process that has a higher priority have its I/O request processes first?

This came up in a discussion at work, and though I don't think that it will matter, would like to get some concrete answers.

Last edited by blowtorch; 02-03-2006 at 06:48 AM..
# 2  
Old 02-03-2006
No. Nice affects the order that processes on the run queue are selected by an idle cpu. There is a different priority value that sorta impacts I/O in that if two processes are sleeping waiting for the same disk block to arrive, the higher priority process will be awakened first. This depends on what the process was doing. Example: the lowest (worst) priority process finally gets a cpu and executes a mkdir() system call. Until the directory is created, this process will have a very high kernel priority (high enough to be unkillable). But its scheduling priority remains rather low. But two processes waiting for different disk blocks cannot influence which block arrives first. In fact, the disk driver re-orders disk operations to minimize head movement. As operations are queued to a disk drive, most modern disk drives do the same thing.

Note that sometimes numericly lower priority numbers are better than higher priority numbers. It is safer to talk about better and worse priority.
# 3  
Old 02-03-2006
Thanks for the reply Perderabo. And I meant higher priority as better priority (and a lower nice value).
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. AIX

nice and renice

hello , We would like to increase the priority of the oracle process . Process(240001 ) should get the priority like the process(240103 ). Am not sure what value i should mention in the renice command(aix 6.1). Please assist me. 240001 A oracle 26804312 1 0 60 20... (2 Replies)
Discussion started by: gowthamakanthan
2 Replies

2. Shell Programming and Scripting

Need a nice logic

Hi all, Given a scenario there is a folder and files will be coming into the folder at random time.The files that came in need to be mailed. And an important thing no file should be missed out as well as no file should be sent twice. One idea is that we can schedule a script that runs for... (2 Replies)
Discussion started by: kannangce
2 Replies

3. Programming

nice command and nice() system call

Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Discussion started by: tejbuch
2 Replies

4. Shell Programming and Scripting

Not a question but nice inclusion in scripts

Hi there, I produced a script that can sometimes take a lot of time to run. To make sure that it was running I was printing ". " to the screen. I found this could easliy scroll through lots of pages before it finsihed. So I came up with this. I put this at the beginnig. do_next() { ... (0 Replies)
Discussion started by: nhatch
0 Replies

5. Post Here to Contact Site Administrators and Moderators

Very Nice

Just a quick message to say great work to Neo and any others who have helped with the upgrade - the layout, appearance and functionality of this forum ROCKS. By far the best I have seen. Excellent! (1 Reply)
Discussion started by: alwayslearningunix
1 Replies
Login or Register to Ask a Question