lkml.org 
[lkml]   [1999]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Sleep-Slowdown
On Tue, 21 Dec 1999, Jan-Friso Evers wrote:

> Hello,
>
>
> while developing a compiler (www.informatik.uni-kiel.de/~sacbase),
> a problem with newer linux-kernels occured.
>
> I tracked it down to the following:
[SNIPPED]

Before there was a sched_yield(), many programs were written to
give up the CPU for a bit by executing sleep(0). Whether or not
this is "good/bad/etc" is moot. Changing sleep to return immediately
without first scheduling, will cause such programs to eat up a
lot of CPU time, slowing other tasks down.

Look at `top` while executing:

for(;;)
;

Then look at it with:

for(;;)
sleep(0);

Then decide if you want tp break sleep().


Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : The end of the world as we know it requires a new calendar.
Seconds : 921372 (until Y2K)


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.421 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site