How is run queue length computed in linux proc filesystem

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri Aug 16 10:11:16 EDT 2013


On Fri, 16 Aug 2013 14:51:59 +0100, emani murali said:

> Exactly, I would like to know how is runq computed from load average. Are
> there any system calls to get this value.

Load average is computed from runq.  Not the other way around. Given runq,
you can comput load average.  Given load average, ti's very difficult to
compute runq.

Omeletts are made from eggs.  Not the other way around.  Given an egg,
you can create an omelette.  Given an omelette, it's very difficult to
make an egg.

The problem is that runq changes many times per second (potentially at
every system call, and it doesn't take much hardware to do a quarter million
system calls per second).  Load average is a smoothed average value, and
as such, loses information.  If I tell you that the average amount of folding
money in my wallet during July was $5.89, you can't figure out how much
was in my wallet at 2PM on July 12, or if there was $8 more in it at 10AM
that morning and I paid for lunch with cash that day.

There's also the minor detail that the *average* inclues 89 cents - but
folding money in the US is always an integer. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130816/827d1fef/attachment.bin 


More information about the Kernelnewbies mailing list