> Linux has some problems with scheduling:
>
> If you access disks or do other similar tasks (login), and there's
> background process running, you get scheduled at next timer tick - ie.
> 10ms later. This way, I was able to "feel" background while(1);
> processes on my 486/16. I'm currently running some tests (find / in
> fact), to see if this canbe measured in addition to 'felt'.
no. you get scheduled immediately. You can 'feel' it with a background
process running because starting up a shell is a multi-millisec CPU
excercise even on fast boxes and fully cached, and processes do not start
up with excessive priorities. (see how childs and parents share p->counter
in fork.c) Thus the login is timesharing with the background process.
but after a few seconds, your shell gathers enough 'interactiveness
priority' to not hang when you hit 'Enter'.
-- mingo
ps. you can also renice the background process, in that case even right
after fork() the typical shell process has higher priority than a CPU
eater. 'renice' is your friend.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/