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


Date: Wed, 30 May 2007 12:27:14 +0200
From: "Daniel Sánchez Pedreño" <sanatox@xxxxxxxxx>
Subject: Re: [Gems-users] About get pid in ruby (again)
As i know, the sethi instruction needs a constant value, so you can't use the getpid as a parameter, so i dont understand your reply. To bind the threads to processors is the last option i see.

I think another option could be write the pid in a physic register and read it in Ruby after the magic instruction is captured. I'll try this.

Regards

On 5/25/07, Dan Gibson <degibson@xxxxxxxx > wrote:
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.


_______________________________________________
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.





--
http://sanatox.es
[← Prev in Thread] Current Thread [Next in Thread→]