Realtime blue

View: New views
2 Messages — Rating Filter:   Alert me  

Realtime blue

by Atte :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I've looked into the source and didn't find a quick fix. Since I'm not a
java programmer, I have some questions:

Did you (Steven) look at the Real-time Specification for Java?
http://jcp.org/en/jsr/detail?id=1
http://www.rtsj.org/specjavadoc/AlteredStdJava.html

It seems to me that this might be needed for blue to actually start a
thread with realtime priorities. What do you think?

An interesting test (and possibly a quick, clean and final solution)
could be to use jack instead of ALSA, since jack clients automatically
gets the realtime priorities of the running jack daemon. Although I at
one point was able to use jack for rendering, I cannot make it work ATM.
I get errors like " *** rtjack: could not connect to JACK server" in the
Csound output. Could anyone help by explaining how to setup blue to use
jack?

In the meantime I wrote the following bash script, that every second
assigns realtime priority to the last blue thread. It's quick and dirty,
but works on my system:

#!/bin/bash

# rt priority to set the render thread to

rt_prio=80
# don't do anything before nb processes goes higher than this

skip=20
while [ 1 ]; do
     blue_count=`ps ax -T | grep java | grep blue | grep -v grep | wc -l`
     if [ $blue_count -gt 20 ]; then
         pid=`ps ax -T | grep java | grep blue | grep -v grep |\

              tail -n 1 | sed 's/ pts.*//' | sed 's/.* //'`
         sudo chrt -f -p $rt_prio $pid
     fi
     sleep 1;
done

--
Atte

http://atte.dk    http://modlys.dk

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluemusic-users mailing list
Bluemusic-users@...
https://lists.sourceforge.net/lists/listinfo/bluemusic-users

Re: Realtime blue

by Steven Yi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Atte,

Sorry I never replied to this, but I think the RTSJ is more a
specification for hard realtime systems like Java on embedded devices
(i.e. Java controllers for chips controlling manufacturing equipment,
etc.).  So I don't think this is anything one can choose to use or not
really.

If someone knows better, please let me know!

steven

On Thu, Oct 30, 2008 at 12:59 AM, Atte André Jensen
<atte.jensen@...> wrote:

> Hi
>
> I've looked into the source and didn't find a quick fix. Since I'm not a
> java programmer, I have some questions:
>
> Did you (Steven) look at the Real-time Specification for Java?
> http://jcp.org/en/jsr/detail?id=1
> http://www.rtsj.org/specjavadoc/AlteredStdJava.html
>
> It seems to me that this might be needed for blue to actually start a
> thread with realtime priorities. What do you think?
>
> An interesting test (and possibly a quick, clean and final solution)
> could be to use jack instead of ALSA, since jack clients automatically
> gets the realtime priorities of the running jack daemon. Although I at
> one point was able to use jack for rendering, I cannot make it work ATM.
> I get errors like " *** rtjack: could not connect to JACK server" in the
> Csound output. Could anyone help by explaining how to setup blue to use
> jack?
>
> In the meantime I wrote the following bash script, that every second
> assigns realtime priority to the last blue thread. It's quick and dirty,
> but works on my system:
>
> #!/bin/bash
>
> # rt priority to set the render thread to
>
> rt_prio=80
> # don't do anything before nb processes goes higher than this
>
> skip=20
> while [ 1 ]; do
>     blue_count=`ps ax -T | grep java | grep blue | grep -v grep | wc -l`
>     if [ $blue_count -gt 20 ]; then
>         pid=`ps ax -T | grep java | grep blue | grep -v grep |\
>
>              tail -n 1 | sed 's/ pts.*//' | sed 's/.* //'`
>         sudo chrt -f -p $rt_prio $pid
>     fi
>     sleep 1;
> done
>
> --
> Atte
>
> http://atte.dk    http://modlys.dk
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bluemusic-users mailing list
> Bluemusic-users@...
> https://lists.sourceforge.net/lists/listinfo/bluemusic-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluemusic-users mailing list
Bluemusic-users@...
https://lists.sourceforge.net/lists/listinfo/bluemusic-users