From: Paul J. Brewer (pjb@cco.caltech.edu)
Date: 08/09/93


From: pjb@cco.caltech.edu (Paul J. Brewer)
Subject: NICE/TOP and priorities [Info]
Date: 9 Aug 1993 09:11:10 GMT

I was kind of confused with Linux process priorities as indicated
by top when something is run nice.,

In particular, nice gives processes lower priority numbers. On most
*ix I've seen, less is more -- i.e. processes with lower numbers get more
time.

A simple program provided the answer. I wrote a loop to sum 1/x for
the first 100000 positive integers. running two copies simultaneously,
one nice and one not, pretty much caused the nice one to wait until
the other was done (the nice one took twice as lomng, measured in user
time ).

So nice works correctly, and its the numbering scheme thats odd, or well,
different.

Incidentally, the same loop compiled by bcc 3.1, with the system running
DOS, 30 seconds, while on Linux, with no other user processes running,
takes 40 seconds (as measured by time).

This isn't too bad, i suppose. I guess for a real comparison, I should
try this under DV and Windows to see how other multitasking platforms do.

Important question: is a float the same length under gcc 2.4.5 and bc3.1?

Incidentally, this experiment was done running gcc 2.4.5, lib 4.4.1, kern .12alpha

NO math coprocessor on a 386/40 with 8 megs of ram.

I just installed Linux over the past week. For the most part, I'm pretty
happy with it -- its not as much of a hack as I would have initially expected.

Paul Brewer
pjb@cco.caltech.edu