Re: [Gems-users] About get pid in ruby (again)


Date: Fri, 25 May 2007 07:40:27 -0500
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] About get pid in ruby (again)
You could simply pass the thread identifier as the parameter to the magic call macro -- then you should be able to follow the thread reasonably well from CPU to CPU.  You can also just bind your threads to processors to prevent migration...

Regards,
Dan

Daniel Sánchez Pedreño wrote:
Dear list,

im actually interested in calculating the acquisiton time of locks and barriers in  Ruby. For that, i've modified my benchmarks with magic instructions  every time a LOCK, UNLOCK or a BARRIER macro is called.

But the problem is the context switch. Often, the initial phase of an acquisition (the busy wait) is done in two differents CPUs and i cant track acquisitions through ruby with only the cpu number where they are executed. The solution would be tracking the pids, but at the moment, i dont know how to do that.

i've read about this in the list. Messages like https://lists.cs.wisc.edu/archive/gems-users/2007-January/msg00010.shtml and https://lists.cs.wisc.edu/archive/gems-users/2005-June/msg00014.shtml  talk about get pid from ruby, but it seems to have no solution yet.

Did anybody solve this problem?

--
http://sanatox.es

_______________________________________________ Gems-users mailing list Gems-users@xxxxxxxxxxx https://lists.cs.wisc.edu/mailman/listinfo/gems-users Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
[← Prev in Thread] Current Thread [Next in Thread→]