Go to Post It doesn't always work when you put the word gracious in front of anything. Think Battle bots, after a winning match do ya go over to the loser and go we Graciously kicked your butt!? - Alex Cormier [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
View Poll Results: Do you want threads?
Yes 10 27.03%
No 22 59.46%
What's a thread? (Read below. If you choose this I'll be mad... ;->) 5 13.51%
Voters: 37. You may not vote on this poll

Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-04-2004, 16:46
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Muti-threading

I want to know everyone's opinion on threading. Would you like to have the ability to create threads for the RC, or are you happy with the way the things are now?

(For those of you who don't know, having threads is a way of allowing mutiple things to be happening in your code at the same time and independently.)
__________________

  #2   Spotlight this post!  
Unread 05-04-2004, 20:28
Grommit Grommit is offline
Registered User
#0115 (Monta Vista Robotics)
 
Join Date: Oct 2002
Location: Cupertino
Posts: 47
Grommit will become famous soon enoughGrommit will become famous soon enough
Send a message via AIM to Grommit
Re: Muti-threading

I'm not certain, but I doubt this would substantially improve performance.

What I need is a math library, readily accessible... how can one live without exponentials, hyperbolic secants, and zeta functions!?

I realize that many are available (like the open source Sun Microsystems library, which we ended up using) but it is difficult, with a large library, to pick out the functions you actually need. A library in the firmware or somehow better accessible, with only the functions that one really would need, like trig/powers, would be quite welcome.
  #3   Spotlight this post!  
Unread 05-04-2004, 20:31
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Muti-threading

Quote:
Originally Posted by Grommit
I'm not certain, but I doubt this would substantially improve performance.
I'm not necessarally thinking of performance, in fact, unless done well, this might slow it down some. (very little) I'm really thinking of the advantages of being able to have, say, a thread that is continuously running, watching encoders on the wheels and ensuring they are turning at the correct rates for the desired turn/staight.
__________________

  #4   Spotlight this post!  
Unread 05-04-2004, 20:33
piotrm's Avatar
piotrm piotrm is offline
Registered User
AKA: Piotr Mardziel
FRC #0190 (Gompei and the HERD)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Dudley, MA
Posts: 96
piotrm has a spectacular aura aboutpiotrm has a spectacular aura about
Send a message via AIM to piotrm
Re: Muti-threading

I guess that it might be nice to have them just as another option. It is nice to have more than one way of doing things. I personally never use threads for anything. But then I don't do robot programming (but if I did robot programming, I wouldn't use threads anyway).
  #5   Spotlight this post!  
Unread 05-04-2004, 20:51
Xufer's Avatar
Xufer Xufer is offline
8 Seasons and as stable as ever
AKA: Working, 2/4 degrees complete still schooling...
FRC #1740 (The Cyber Colonels)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Waterford, CT
Posts: 231
Xufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to behold
Send a message via AIM to Xufer Send a message via MSN to Xufer Send a message via Yahoo to Xufer
Re: Muti-threading

it wouldnt be too much of a problem to have and use threads but do oyu really have that much use for them ? Theres not really that many things you would need to have running at once? I think it would be agreat idea but I am at a loss as to what would it be used for. I also dont know what kinda crazy programming things you guys do some times.
__________________


If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.

Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy
Photonics, It's Your Future
  #6   Spotlight this post!  
Unread 05-04-2004, 22:13
10intheCrunch's Avatar
10intheCrunch 10intheCrunch is offline
Who's John V-Neun?
AKA: Alex Baxter
None #0254 (Cheesy Poofs)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: San Jose, CA
Posts: 129
10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough
Send a message via AIM to 10intheCrunch
Re: Muti-threading

While it might be cool, interrupts seem capable for the tasks we need to do. Threads would probably just complicate things, and while I doubt I'd use them, I don't really care if they are there and someone else wants to...
__________________
~Alex Baxter
Programming, Arms operation, Team 254
  #7   Spotlight this post!  
Unread 05-04-2004, 22:32
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Muti-threading

Quote:
Originally Posted by Texan
I want to know everyone's opinion on threading. Would you like to have the ability to create threads for the RC, or are you happy with the way the things are now?

(For those of you who don't know, having threads is a way of allowing mutiple things to be happening in your code at the same time and independently.)
Since the current controller supports timer interrupts, you could code a simple OS to do pre-emptive multi-tasking and have prioritized threads that way.

Really, I doubt anything is stopping you, other than having capable programmers to be able to deal with concurrency issues. I wouldn't however make threads available by default though. With 6 weeks to build, I know that I would much rather spend my time getting the robot working rather than fighting with concurrency =).

Which means my vote is for keeping them the way they are.
  #8   Spotlight this post!  
Unread 05-04-2004, 22:52
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Re: Muti-threading

Quote:
Originally Posted by Texan
I want to know everyone's opinion on threading. Would you like to have the ability to create threads for the RC, or are you happy with the way the things are now?

(For those of you who don't know, having threads is a way of allowing mutiple things to be happening in your code at the same time and independently.)
Threads are overkill, right now, for what we're doing. Ask this question in a few years, and I might have a different answer for you ;-).

For now, I think adding threads just adds needless complexity to the coding, we already only have a day to actually test programming, let's keep it as simple as we can.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #9   Spotlight this post!  
Unread 06-04-2004, 13:02
Gene F's Avatar
Gene F Gene F is offline
FIRST Fanatic
AKA: Gene Falendysz
#0343 (Metal in Motion)
Team Role: Engineer
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Oconee County, SC
Posts: 218
Gene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to behold
Send a message via AIM to Gene F
Re: Muti-threading

As a way to approximate multiple threads, we use multiple finite state machines. One for the tracks, one for the arm, one for the wrist, etc. Each one gets called every pass through the main loop. It allows multiple threads of conciousness without the overhead of task switching. It does take a bit more thought to come up with the state machines and the coordination mechanisms.
__________________
- Gene Falendysz
  #10   Spotlight this post!  
Unread 06-04-2004, 13:32
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Muti-threading

It would be cool, but it complicates programming. Even on PCs, this is true.
  #11   Spotlight this post!  
Unread 06-04-2004, 13:38
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Muti-threading

Personally, I dislike the idea. I was working with threads on my FIRST Editor project, and it's very unsafe. You have to make sure the thread is closed (securely), or else there will be many problems arisen.

Picture this: 10 seconds left of the 2nd finals match, and you're 1-0, score is 40-5 your favor. Then, at 5 seconds, your robot which was supposed to close a thread, didn't. Robot goes *POOF* into a big flame.

Even if FIRST, IFI, and whoever is our supplier next year saids they made it to where the threads close safely all by themselves, there's never a 100% chance that it will close safely.

I dunno, I just feel it's more trouble than it's worth. Not to mention the fact that a lot of things would have to change.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #12   Spotlight this post!  
Unread 06-04-2004, 13:41
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Muti-threading

What I said. it would be cool, but I would probably just use one thread because of the complexities.
  #13   Spotlight this post!  
Unread 06-04-2004, 16:17
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Muti-threading

Whats to prevent you from implementing software threading now? Absolutely nothing at all. If you really feel you need threading ,then write yourself some threading. On an architecture this small, the overhead of full threading capabilites usually outweighs the benefits of threading.

I personally do not think threading is necessary at this point. If at any point it were necessary, then i would say write your own. We implemented a few processes that ran in the background, but i would hardly call it threading.
__________________
1139 Alumni

Last edited by Rickertsen2 : 06-04-2004 at 16:22.
  #14   Spotlight this post!  
Unread 06-04-2004, 16:54
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Muti-threading

Quote:
Originally Posted by Rickertsen2
Whats to prevent you from implementing software threading now? Absolutely nothing at all. If you really feel you need threading ,then write yourself some threading. On an architecture this small, the overhead of full threading capabilites usually outweighs the benefits of threading.

I personally do not think threading is necessary at this point. If at any point it were necessary, then i would say write your own. We implemented a few processes that ran in the background, but i would hardly call it threading.
I'm considering it. Or at least a psuedo-threading that would appear to the "threads" as either a pre-empitive or cooperative threading environment. I know that the RC has enough power to handle the threads. The RCX from LEGo Mindstorm uses a chip with similar specs and that handles threading fine. I was just curious on people's opinions.
__________________

  #15   Spotlight this post!  
Unread 24-04-2004, 15:14
jdong jdong is offline
Linux Nerd
AKA: John D
#0245 (Adam-Bots)
Team Role: Programmer
 
Join Date: Apr 2004
Location: Rochester, MI
Posts: 98
jdong will become famous soon enoughjdong will become famous soon enough
Re: Muti-threading

Perhaps implemented by a vector of callback function pointers, itinerated by an interrupt loop?


Pre-emption won't be much of a possibility, but doing little chunks of code would be possible.
__________________
John Dong
Co-Captain, Webmaster / Programmer
Team 245 -- Rochester Adams Robotics
Closed Thread


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


All times are GMT -5. The time now is 17:52.

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