Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   periodic tasks in autonomous independent (http://www.chiefdelphi.com/forums/showthread.php?t=84395)

Greg McKaskle 22-03-2010 22:43

Re: periodic tasks in autonomous independent
 
For simplicity, the LV queue has been described generically as a Queue. In reality, it is implemented as a priority Q. OS threads are lazily allocated to service the head of each priority in use -- by default a few threads per CPU core per priority in use. This means that if tasks at different priorities become available, the OS scheduler is aware of the requests and will schedule accordingly.

Not being on the VxWorks RT team, I can't say exactly how the threads were created or how the Queue is implemented for the OS. I can't say exactly how VxWorks is expected to behave in the case of competing priorities, inversions, etc. So, I'm being vague about the implementations I don't know in great detail. If I had a cRIO available, I could write tests that measure the response, however.

Greg McKaskle

Ether 22-03-2010 22:56

Re: periodic tasks in autonomous independent
 
Quote:

Originally Posted by Greg McKaskle (Post 941461)
If I had a cRIO available, I could write tests that measure the response, however.

Interesting you should say that. I was taking a walk in the woods just this afternoon and had the exact same thought. If I had a cRIO, I would take the time to learn enough LabVIEW so I could write some simple experiments and get some insight. I'm going to ask around and see if the team would let me take it home after the season. Does the Chief Delphi forum go completely off the air off-season? Or do a few die-hards stick around?


~

Vikesrock 22-03-2010 22:58

Re: periodic tasks in autonomous independent
 
Quote:

Originally Posted by Ether (Post 941478)
Does the Chief Delphi forum go completely off the air off-season? Or do a few die-hards stick around?

It definitely gets much quieter, but some of us are here year round.

Ether 31-03-2010 00:36

Re: periodic tasks in autonomous independent
 
I'm going to go ahead and answer my own questions here, based on what I've learned since my questions were posted, for the benefit of any other readers who may have been wanting the answers to the same questions.

Caveat: Don't take my word as authoritative. And a note to gurus: If I get any of this wrong please slap me upside the head:

Quote:

Originally Posted by Ether (Post 941433)
I'm still wondering if "cuts in the queue" includes not only "going to the head of the line" in the queue, but also preempting a presently-running lower-priority task.

Answer: YES. When a higher-priority task becomes ready to run it will preempt a presently-running lower-priority task.

Quote:

Originally Posted by Ether (Post 941433)
I'm also wondering how the 2010 FRC LabVIEW framework handles what I will call the "standard form" periodic tasks, i.e. like the default templates provided in the framework periodic vi. Does LabVIEW set them up with the same priority?

Answer: YES.

Quote:

Originally Posted by Ether (Post 941433)
...And if so, does the OS preemptively time-slice-multitask all equal-priority tasks, or is the multitasking strictly cooperative (in the "standard form").

Answer: The vxworks RTOS preemptively time-slice-multitasks all tasks of the same priority. In addition, tasks can cooperatively give up their time-slice when waiting for resources.




~

Greg McKaskle 31-03-2010 07:15

Re: periodic tasks in autonomous independent
 
A+ on the quiz.

Greg McKaskle


All times are GMT -5. The time now is 09:44.

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