Atomic reads and writes?
![John Abshier](https://forums.parallax.com/uploads/userpics/277/n0M6IITLXA6SM.jpg)
I am trying to understand Propeller multiprocessing.· I have multiple cogs running.· At any one time only one cog can address main memory.· In Spin is a read and a write an atomic operation?· In other words if cog1 is writing a value to memory (an assignment statement) and cog2 wants to read that value, is this operation safe for bytes? 32bit words?· Or will cog2 get part of the old value mixed with the new value?
Comments
If you use an array, you will probably need to use either an I/O or another memory location to indicate when writes are complete.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Southern Illinois University Carbondale - Electronic Systems Technologies
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
The HUB singulates accesses by the COGs so that there are no simultaneous access collisions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Okay.· How about semaphores?· For example, how would one Cog grab a semaphore while the others miss?·
Thanks,
Bye,
·
Its up to each cog to obey the fact that a semaphore is locked.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10
I read your response in the other thread. Thank you!
Does anyone know when the full documentation is going to be released?
For example, their HLL is cute (yet another HHL) but what do the actual opcodes look like?
Thanks,
Bye,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10
Bye