What is a "ring"?

Skip to first unread message


Sep 17, 2022, 1:33:34 PM (12 days ago) Sep 17
to Earthworm Community Forum

Can someone here explain to me, in simple language, what a "ring" is? :)
I've been working with Earthworm since 2013, and I do a lot with it. Back in 2013, I asked this question, and remember that I got good answers, but can't remember what the answers were :) 

I am doing some new work on our Earthworm system at Weston Observatory in New England, and I reached the point that I need to understand what I'm doing to the point of actually reading the manual! :)

Thanks for any clarification on what a "ring" is :) 
Geophysics, Earthquake Science, Environmental Systems,
and Community Science for the Public Good
“Raspberry Shakes and Booms Record the Darndest Things…”

Claude Felizardo

Sep 17, 2022, 2:42:10 PM (12 days ago) Sep 17
to Earthworm Community Forum
The Earthworm library manages memory that is shared between multiple earthworm modules or processes by organizing the memory into circular ring buffers. When an application tries to access data in a ring the library manages all of the internal pointer upkeep and semaphore locks to prevent memory corruption.  When writing to a ring the library will look for the next available location in memory and update pointers, resetting back to the start of the buffer space when the block of data won't fit.  To allow multiple readers, the library maintains individual pointers for each reader.  

If configured correctly the library will return various error codes such as when a reader does not read the data before it is overwritten by another process. To do this correctly you must use unique module Id's and allocate enough memory to each ring to handle the expected amount of traffic.



Sep 17, 2022, 3:50:27 PM (12 days ago) Sep 17
to Earthworm Community Forum
Thanks, Claude!
Very helpful.

- Alan
Reply all
Reply to author
0 new messages