From: Jeremy F. <je...@go...> - 2003-04-08 10:13:01
|
Quoting Sefer Tov <se...@ho...>: > Hi! > > I've been testing a short threaded program, and I noticed that sleep(x), > > although utilizes no cpu, it schdules poorly (the program slows down > almost > to a halt). Is your machine a laptop, or a desktop with power management enabled? Valgrind uses the TSC register as its timebase, and I've noticed on my laptop the TSC doesn't advance when the machine is idle. You can easily tell if this is the case: if you run a CPU-bound program at the same time, then the TSC advances at near full speed and the sleeps are for the right time. J |