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


Date: Fri, 25 May 2007 11:52:10 +0200
From: "Daniel Sánchez Pedreño" <sanatox@xxxxxxxxx>
Subject: [Gems-users] About get pid in ruby (again)
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
[← Prev in Thread] Current Thread [Next in Thread→]