[coyotos-dev] sleep capability

Jonathan S. Shapiro shap at eros-os.com
Tue Jan 23 10:00:59 CST 2007


On Tue, 2007-01-23 at 15:57 +0100, Pierre THIERRY wrote:
> Scribit Jonathan S. Shapiro dies 23/01/2007 hora 09:21:
> > 	uint64_t counter;	// on a shared page
> > 	for(;;)
> > 		counter++;
> > 
> > Other thread reads counter. Every bit as good as rdtsc.
> 
> Won't that be made inaccurate by the priority of the process, if it is
> too low, and many other processes with higher priority run in parallel?

Remember that the scenario assumes two CPUs, and that CPUs are idle most
of the time.
> 
> Astonishingly,
> Pierre
> _______________________________________________
> coyotos-dev mailing list
> coyotos-dev at smtp.coyotos.org
> http://www.coyotos.org/mailman/listinfo/coyotos-dev
-- 
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC
+1 443 927 1719 x5100



More information about the coyotos-dev mailing list