Go to Post It's super-ironic that a question about searching was found via searching. Whodathunk? - Brandon Martus [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 19-01-2009, 19:48
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Image processing and performance

Quote:
Originally Posted by ellisk View Post
I'm using threads ("tasks" on the cRIO) for the different parts of our code, and there's currently 3 threads. I'm wondering if the threads are all getting 1/3 of the CPU, and so that's slowing down our code. Is that possible?
It's possible but not likely. The vxWorks kernel doesn't schedule tasks for a fixed length of time. If it did, and there were only 3 tasks, then each would 'use' approximately 1/3 of the CPU time. Under vxWorks, tasks are made ready by events and the highest priority ready task is scheduled to run. That task will run until a) it relinquishes control or b) is preempted by a higher priority task becoming ready. (think about the implications of a high priority task that doesn't relinquish control)

Quote:
Originally Posted by ellisk View Post
can I set the priority of some threads to be higher? I noticed in the constructor for the Task class that I can specify a priority (it defaults to 100). Is 1 the highest or 100?
Yes. You can do so before the task is created or any time after.
The highest priority is 0 -- 255 is the lowest.
Take my word for this, you don't want to use a priority higher than 51 for your robot tasks unless you know exactly what you're doing.

Quote:
Originally Posted by ellisk View Post
How can I set the priority of the thread which runs OperatorControl?
If you can get hold of the 'object' for that task, then yes.
Just call the SetPriority method.
I'm neither a C++ fan nor a C++ expert, so I can't tell you how to 'get' a task object for a task your didn't 'instantiate'.
Note that you can create tasks and do whatever you like with them, in a less obfuscated way, by simply calling the vxWorks taskLib API.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[not-FIRST] Camera Image Processing Greg Marra Programming 11 11-03-2008 21:10
Image Processing on mouth ROI tommy_chai Programming 0 20-11-2007 08:32
thoughts about image processing 3dude_2231 Technical Discussion 5 12-11-2007 13:26
Critique my image processing program... Salik Syed Programming 13 29-06-2006 16:57
STAMP (Statistical Team Analysis of Match Performance) is off and running! Ethulin Scouting 6 04-02-2006 23:12


All times are GMT -5. The time now is 11:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi