Which of the following statement(s) is/are True regarding ‘nice’ command of…
2016
Which of the following statement(s) is/are True regarding ‘nice’ command of UNIX ?
I. It is used to set or change the priority of a process.
II. A process’s nice value can be set at the time of creation.
III. ‘nice’ takes a command line as an argument.
- A.
I, II only
- B.
II, III only
- C.
I, II, III
- D.
I, III only
Attempted by 94 students.
Show answer & explanation
Correct answer: C
Correct answer: I, II, III — all three statements are true.
Statement I: The nice command is used to set or change a process's niceness (a value that influences its scheduling priority).
Statement II: A process's nice value can be set at the time of creation by invoking nice when starting the process (this sets the initial niceness). To change niceness of an already running process, use renice or the setpriority system call.
Statement III: The nice command takes a command line as its argument; for example, nice -n 10 sleep 60 runs the sleep command with an increased niceness.