Skip to contentSkip to conversation

Possible spin-problem in nanosleep()

DISCUSSION Robert Hancock 1 participant 1 message Jun 23, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Richard B. Johnson

Is this a known problem? Is it going to be fixed? In a possibly related note, the following:

main()

{
    for(;;)
        sched_yield();
}

.... is shown to be spinning, by 'top' not sleeping. This, even though it is giving up its quantum continuously.

If no other processes are runnable, this will still use 100% of the CPU.

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/