nanogui: link app into server


Previous by date: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Robbie
Next by date: 11 May 2006 16:41:39 +0100 ViewML crashes, pradeep sawlani
Previous in thread: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Robbie
Next in thread: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Greg Haerr

Subject: RE: [nanogui] LINK APP INTO SERVER
From: "Martin Kajdas" ####@####.####
Date: 11 May 2006 16:41:39 +0100
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291512@mkmail.MKPROD.COM>

I do not think this question belongs to this group but here are some
suggestions:
- do not use max priority for anything
- use different priorities for each thread
- put some printf() with timing info in your threads and see if they are
really asleep

Things like this always require a lot of logging information (printfs)
for debugging.
Martin


-----Original Message-----
From: Robbie ####@####.####
Sent: Thursday, May 11, 2006 8:26 AM
To: Martin Kajdas; ####@####.#### ####@####.####
Subject: RE: [nanogui] LINK APP INTO SERVER



I asked a friend to post this on one of the embedded lists and below is
the posting:

> 
> Hi All,
> 
> I have a scheduling problem I need some help on. If you can offer any
> advise, please help.
> 
> I started my main application which spawns two threads. These threads
> runs as expected (well , so far) but the main program which stays in a
> loop checking for various events, fails to run at the appropriate
time.
> The sequence below shows my sequence.
> 
> main() {
> 
> 	inits......
> 
> 	if((sched_param.sched_priority =
(sched_get_priority_max(SCHED_RR))) <
> 0) printf("Get priority max failed\n");
>         if(sched_setscheduler(getpid(), SCHED_RR, &sched_param))
> printf("Scheduler RR FAILED %i\n",sched_param.sched_priority);
> 	if(pthread_attr_init(&my_t_attr) != 0) printf("FAIL to init
thread
> attr\n");
>         if((sched_param.sched_priority =
> sched_get_priority_max(SCHED_RR)) < 0) printf("Get priority max
> failed\n");
>         if(!pthread_attr_setschedparam(&my_t_attr, &sched_param))
> printf("FAIL to set sched param\n");
>         if(pthread_create(&parser_th, &my_t_attr, m_parser,  NULL) !=
0)
> printf("parser thread FAILED\n");
>         if(pthread_create(&omni_th, &my_t_attr, omni_com,  NULL) != 0)
> printf("Comm thread FAILED\n");
> 
> 	while(!quit) {
> 			...
> 		Check for events & identify if any
> 			....
> 		}
> } // main
> 
> The main program (event checker) fails to perform its tasks in
> appropriate time. It may take upto 3 minutes to be executed. The other
> threads will block (put to sleep) for 5 to 10ms if nothing needs to be
> done.
> 
> can anyone please help me out here?
> 
> Thanks, in advance.


> -----Original Message-----
> From: Martin Kajdas ####@####.####
> Sent: Thursday, May 11, 2006 10:12 AM
> To: ####@####.#### ####@####.####
> Subject: RE: [nanogui] LINK APP INTO SERVER
> 
> 
> 
> -----Original Message-----
> From: Robbie ####@####.####
> Sent: Wednesday, May 10, 2006 2:56 PM
> To: ####@####.####
> Subject: RE: [nanogui] LINK APP INTO SERVER
> Importance: High
> Seems that your two questions are not related:
> 1. How to link app to server?
> 2. Why the event loop is slow?
> 
> In both cases you must be doing something wrong.
> The first one is a matter of setting up the linking process properly
and
> the result application has a nanox server linked with it so it can run
> by itself (without starting a nanox server first).
> 
> In the second case, it would be nice to see the source code because
the
> problem is expected if you coded something wrong in you threads. You
> somehow must be preventing the event loop from running.
> 
> Martin
> 
> 
> 
> > -----Original Message-----
> > From: ####@####.####
> > Sent: Wed, 10 May 2006 16:46:01 -0400 (EDT)
> > To: ####@####.####
> > Subject: [nanogui] LINK APP INTO SERVER
> >
> >
> > Hi All,
> >
> > I've been trying to figure out how to use nanox with the option
> > LINK_APP_INTO_SERVER = y.
> >
> > I notice there is no nanox server app, so where do I start from?
> >
> > Could someone tell me how this is used and how to get started?
> >
> >
> 
> I would like to know the answer to this question, however let me add a
> description of a problem I'm having so you can get a wider scope.
> First, I ran two threads created from the main program prior to
entering
> the event loop. I've been observing considerible delay and
investigated
> that the two threads are running as expected, but the evant loop is
> running consideraply slower, someting in the order of a few seconds to
> minutes.
> This is quite  unusual considering I've changed the scheduler to
> SCHED_RR and all threads have the same priority.
> I later add another thread with the event loop and that did the same
> thing.
> 
> What could be the cause of this?
> Any suggestions anyone?
> 
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Previous by date: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Robbie
Next by date: 11 May 2006 16:41:39 +0100 ViewML crashes, pradeep sawlani
Previous in thread: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Robbie
Next in thread: 11 May 2006 16:41:39 +0100 Re: LINK APP INTO SERVER, Greg Haerr


Powered by ezmlm-browse 0.20.