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 _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il