Operating System - HP-UX
1834809 Members
2751 Online
110070 Solutions
New Discussion

Does larger value of PRI in top reflect that the process is using more resources than lower value?

 
SOLVED
Go to solution
Jack C. Mahaffey
Super Advisor

Does larger value of PRI in top reflect that the process is using more resources than lower value?

Here's the first n lines from top. Does the value of 232 indicate that the process is runninging at a higher priority than the process that has PRI value of 154?

Load averages: 2.69, 2.44, 2.31
633 processes: 600 sleeping, 33 running
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
2.69 83.3% 6.1% 10.6% 0.0% 0.0% 0.0% 0.0% 0.0%

Memory: 406248K (173056K) real, 510640K (206320K) virtual, 9828K free Page# 1/34

TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
? 6323 frs2mgr 232 20 59732K 55488K run 43:39 56.33 56.23 MxCase
pty/ttyp6 12096 receive 154 24 6112K 2032K sleep 0:01 11.63 6.66 MxMain
pty/ttyr1 11466 agj1 154 24 7408K 3388K sleep 0:04 3.09 3.08 MxMain


Thanks in advance... jack...
3 REPLIES 3
John Dvorchak
Honored Contributor
Solution

Re: Does larger value of PRI in top reflect that the process is using more resources than lower value?

No on the contrary, the higher number is a lower priority. Now that doesn't mean that it is going to use less resourses. It will use the same resources that it would if the pri number were lower. In other words it will still use the same memory, disk I/O etc no matter what the pri number is, and that is dictated by how the process is written. The pri(ority) number is the nice value. The higher the number the lower the priority it has. When a process with a lower number (higher priority) wants to use run, it will bump the lower priority numbered process out of the run queue.
If it has wheels or a skirt, you can't afford it.
S.K. Chan
Honored Contributor

Re: Does larger value of PRI in top reflect that the process is using more resources than lower value?

In addition ..
User prioroties are set between 178->255 , 255 being the lowest and system related priroties are between 128->177. Also take note if you're comparing 2 processes with the same PRI value but different NI (nice) value, the process with the higher NI value runs at a lower priority.
Jack C. Mahaffey
Super Advisor

Re: Does larger value of PRI in top reflect that the process is using more resources than lower value?

Thanks... I wasn't sure if the PRI attribute worked in the same direction as the nice attribute.

Jack...