The riddle of atomic data transfer from process A to process B

The riddle of atomic data transfer from process A to process B

Omer Zak w1 at zak.co.il
Wed Apr 13 16:41:12 IDT 2011


A full fledged queue would force the consuming process (process A) to
read and process all data written by the producing process (process M)
even when process A needs only the most recent value whenever it reads
process M's data.

On Wed, 2011-04-13 at 16:21 +0300, Shachar Shemesh wrote:
> On 13/04/11 16:07, Omer Zak wrote:
> > The riddle:
> > 1. If the operating system being used is Linux, what other mechanisms
> > (besides turning off interrupts) are available to single-processor
> > systems to accomplish this?
> > 2. If the system has a multi-core processor or several processors, which
> > low overhead synchronization method can be used to accomplish this?
> >
> >    
> Read in Linux Device Drivers how to implement a queue with no locks. You 
> don't need the data access to be atomic, so long as the queue pointer 
> can be accessed atomically.

-- 
QA People of Curse.
My own blog is at http://www.zak.co.il/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html




More information about the Linux-il mailing list