View unanswered posts | View active topics It is currently Wed Aug 20, 2014 12:53 am






Reply to topic  [ 2 posts ] 
multi-tasking 
Author Message
Rookie

Joined: Wed Jun 26, 2013 2:22 pm
Posts: 11
Post multi-tasking
Could you take a few minutes and give an overview of multi-tasking as well as some links to articles that discuss Robotc multi-tasking.


Thu Jul 11, 2013 8:44 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 563
Post Re: multi-tasking
Unfortunately multitasking in ROBOTC would be too advanced and too lengthy of a discussion for a Summer of Learning web session; however, we are more than happy to answer any specific questions you may have on the subject. Some of the more common questions about multitasking (including links to various resources on the subject) can be found below.

What is multitasking?
- Multitasking is when the robot performs multiple complex behaviors at the same time (simultaneously). If a robot performs behaviors step-by-step (sequentially) then it is not multitasking and should not be programmed with multiple tasks. A more thorough definition of multitasking can be found on Wikipedia's 'Computer multitasking' page.

When should I use multitasking?
- There is a sticky right here on the ROBOTC forums that deals with this very topic; 'When and When Not to Multitask'. Essentially, multitasking should be used when you have to run two separate, complex behaviors at exactly the same time; otherwise, the program can probably be created using standard while loops, if statements, etc.

What are some examples of multitasking in ROBOTC?
- ROBOTC community members jpearman and magicode have created a 'ROBOTC programming tips' thread on the VEX forum which contains many, many useful programming tricks and features. Of particular note is the multitasking examples, which can be found on the ROBOTC 'Programming Tips' wiki page. You can also find a link to original VEX forum post here.

Are there any dangers to multitasking?
- Yes, there are some. For instance, there is a chance to encounter what is called a race condition, which can result in undesirable performance from the multi-tasking program. There are also instances where one task can 'hog' the CPU and not allow other tasks to ever run, which can cause severe issues with the program.

Is multitasking worth it?
- This depends on the comfort level of the programmer with multitasking, the behavior(s) that will run in their own tasks, and how exactly the program is created. Like any other tool in programming, it has uses and limits but as long as the programmer with them, it can be effectively used in certain programs.

I hope this helped answer some of the more common multitasking questions, if you have any specific questions please let me know and we'll be more than happy to answer them here!

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jul 11, 2013 3:10 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.