I once wrote a Clojure app that communicates with jackd audio server through JNA in real time. It periodically fills an audio buffer and calls a couple of native functions, and it works reliably with an audio buffer of 10ms. I tried it under OpenJDK on Linux.
So the HotSpot VM used in OpenJDK and Oracle JDK may be suitable at least for soft realtime tasks with acceptable latencies of several milliseconds. Also how do you time the JNI calls? I would recommend using more precise java.util.concurrent.locks.LockSupport.parkNanos method rather than Thread.sleep. On Fri, 8 Apr 2011 09:08:06 +0100 Sam Aaron <samaa...@gmail.com> wrote: > > On 8 Apr 2011, at 08:05, Michael Jerger wrote: > >>> A couple of hundred ms seems very very plausible for GC. What is your > >>> target/desired maximum pause time? > >> > >> below the 10s of milliseconds if possible. > > > > There is a real timeable vm from AICAS (http://www.aicas.com/). > > If "10s of milliseconds" mean 10 ms - than you will nead a real fast > > realtime vm. > > Sure, also IBM have Metronome and Sun/Oracle have JRockit. I'm trying to > avoid using these as they're not open source and freely available. It's > important to me that the system I'm building is free and open to everyone. > > Perhaps I'm not reading the GC logging information correctly, but it didn't > appear to me that the GC was to blame for the pauses. Perhaps it might not > even be the JVM but the OS kernel? Until I have a good idea what's causing > them, it seems that throwing solutions (such as moving to a realtime VM) is > just stabbing at the dark. > > Does anyone have any other ideas of what might cause these pauses and how I > might be able to observe them with some technique or tool? > > Sam > > --- > http://sam.aaron.name > -- Mikhail -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en