Propellers best feature is the hardest to keep straight (at least for me)
dennisap67
Posts: 3
Is anyone else having problems getting used to programming in parallel?
I keep switching into serial code execution mode and get confused (not an abnormal state for me).
I guess it is because I have never had access to a parallel processor before. This isn't a derogatory remark against the propeller btw, I love it and plan to keep playing with it. I might not ever get the hang of parallel processing but it will be fun trying.
I keep switching into serial code execution mode and get confused (not an abnormal state for me).
I guess it is because I have never had access to a parallel processor before. This isn't a derogatory remark against the propeller btw, I love it and plan to keep playing with it. I might not ever get the hang of parallel processing but it will be fun trying.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Say I have a Propeller program with video output, a keyboard, full duplex serial channel, servo controller, and compass. The fact that there are six (2 for VGA video) processors doing the "virtual" peripherals and they're programmed in the same language as my part of things ... well that doesn't really matter to what I have to do with the seventh ... and there's another one idle if I need it.
It's easy to think in terms of having a custom chip that does x. From there, it's kind of nice in that the follow on questions and data inputs and outputs all seem to flow fairly nicely. What data needs to move, what does it look like, how to set / communicate states, etc... I love this about the prop actually. The whole thing is really fun, compared to interrupts, handling kernels, etc...
One other method I sometimes explore is personification. Thinking through computer networks is easy and fun this way. Applying it to the Propeller isn't a bad way to start --at least it wasn't for me. I also do this with data management (which is my professional work) Getting people to grok how documents are managed, checked in, checked out, revisions, etc... is a total sleeper. Never teach it after lunch! It helped me with the Propeller.
So, I setup this scenario where there are up to 8 people, all working in their little offices. There are 32 phone lines that talk to the outside world directly, a central document storage area common to all offices, and the mail cart that moves documents (data) to and from the offices in round robin fashion. There is one company clock, everybody sees, with each office having their own clocks too, etc... Of course, no document moves between offices. You need to use the cart for that. The phone lines are shared, so a quick conversation can happen between offices, but that takes one of the 32 phone lines, that might be really busy depending on the business being done. All communication with the outside world happens via the phone lines, etc...
When the company starts, the central storage area is loaded up with the necessary startup data, one office comes up and is running. It can make requests for others to start operating, depending on what's having to be done, but that takes some time as all the necessary information for that person needs to come from the central document pool.
From there the trade offs are easily seen. Having a quick conversation between people directly office to office can happen, but it costs one of the phone lines that are needed to communicate with the outside world. The manager needs to be able to coordinate tasks between offices, so that takes memos being passed around to tell others what to do, and how to file their results. Etc...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Post Edited (potatohead) : 7/27/2007 7:06:44 PM GMT
@mike: I agree with it not being too different than a "single processor controller that happens to have a variety of on-chip peripherals". Most of the time I did ok but somewhere in the middle of working with the chip i would switch into thinking of the prop as a single processor controller and forget to coordinate the cog activity.
thanks for the help and ideas. I'm sure I will figure it out, I just need more of that patience thing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.