The top uncertainty principle

djberg96 on 2002-11-11T16:00:26

I spent about two hours attempting to track down a ghost last night. I happened to notice that the priority level returned by my extension wasn't returning what 'top' was showing (or the stat file itself, for that matter), even approximately. Top was showing a priority level of about 14-19 for mpg123, while my extension was showing 9-14.

I was like, WTF? Am I parsing the stat file wrong? No - a pure-C version (literally copied and pasted) works fine and I'm getting all the other data correctly. Could it be a datatype issue? No, I tried several just in case.

Irritated and frustrated, I went to bed and came to the conclusion, in my half-unconscious state, that the mere act of starting up the interpreter was causing the priority level to drop, as the interpreter itself now got a higher priority. I couldn't see that with top since the program started and finished before top refreshed.

I hate it when stuff like that happens...


measuring something changes it

nicholas on 2002-11-12T10:22:54

the mere act of starting up the interpreter was causing the priority level to drop, as the interpreter itself now got a higher priority. I couldn't see that with top since the program started and finished before top refreshed.
I hate it when stuff like that happens...

One of the problems of doing science - measuring something actually changes its value. Trying to minimise that change is part of the "fun".