From: Laurence H. <L.H...@ke...> - 2009-04-06 17:47:22
|
Hi, I'm trying to understand the native threading model and it's consequences for @Uninterruptible code As I understood it - previously under Green Threads on a n core machine invoking the rvm with -X:vm:processors=1, code in a @Uninterruptible method would have been executed atomically as there was no possible way for another thread to be scheduled. With native threading each Java thread is now it's own pthread... On a 1 logical processor machine am I right in thinking that an @Uniterruptible method is no longer guaranteed to execute atomically and that another mutator thread could be scheduled to run part way through the @Uniterruptible method - the @Uninterruptible annotation merely disables yieldpoints which are responsible for handshakes with the GC What is the most efficient method to prevent other threads from running whilst my @Uninterruptible method is running on a 1 core machine? I noticed that the Wiki pages at: http://jikesrvm.org/Threading+and+Yieldpoints and http://jikesrvm.org/Thread+Management are sadly out of date - I would offer to up date them but as you might be able to tell I don't feel confident in this area of the RVM (yet)! Kind regards Laurence -- Laurence Hellyer Research Student Computing Laboratory University of Kent More info: http://www.cs.kent.ac.uk/people/rpg/lh243/ |