Which priority has the process?how do u view?

Answer Posted / ajit mohan b

Each process has a niceness value associated with it, which
is what the kernel uses to determine which processes require
more processor time than others. The higher the nice value,
the lower the priority of the process. In other words, the
“nicer” the program, the less CPU it will try to take from
other processes; programs that are less nice tend to demand
more CPU time than other programs that are nicer.
The priority is noted by a range of -20 (the highest) to 20
(the lowest). Using ps, you can see the current nice value
of all programs:
# ps axl

F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY
TIME COMMAND
4 0 1 0 16 0 2648 112 - S ?
0:01 init [3]
1 0 2 1 34 19 0 0 ksofti SN ?
0:02 [ksoftirqd/0]
5 0 3 1 10 -5 0 0 worker S< ?
0:00 [events/0]
You can see that init has a nice value of 0, while other
kernel tasks associated with PID 2 and 3 have a nice value
of 19 and -5 respectively.
Typically, a program inherits its nice value from its
parent; this prevents low priority processes from spawning
high priority children.

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What can you tell about the tar command?

561


What is llvm used for?

514


How do I check my disk space?

465


What is the export command used for?

515


How do I list all processes in linux?

508






What is the use of mv command in linux?

532


How do you run a command for a limited time?

573


Why we use pwd command in linux?

540


What command can you use to make a tape archive file of a /home directory and send it to the /dev/tape device?

554


What is the copy command in linux?

464


How many cmd commands are there?

524


What does grep command do?

565


What could be the problem when a command that was issued gave a different result from the last time it was used?

684


Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.

811


What make install does?

502