Re: synchronization without hardware support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



can u plz explain how these techniques work without
any lock prefix kind of thing. i know only about the
implementation of spinlocks for ix86, in which we have
to use a lock prefix before the instructions for
testing and storing operation of the spinlock.

i am still not understanding how we can prevent any
other processor from getting control of the bus before
our lock operation is complete , say we have just
tested the spinlock and found it to be unlocked , but
before we set it to be locked the control of bus goes
to another processor which also operates on the same
lock , now if we do'nt have any hardware support for
preventing the control of bus going to another
processor during an operation that has to be atomic,
how can we ensure atomicity and avoid races.


Rgds,
pankaj chauhan 



 --- Avishay Traeger <atraeger@cs.sunysb.edu> wrote: >
There are software implementations for locking. 
> I've made my own
> semaphore classes in the end and used them for class
> projects, and if I
> remember correctly there are a couple other ways of
> implementing
> synchronization.
> 
> Avishay Traeger
> 
> 
> On Wed, 31 Dec 2003, [iso-8859-1] pankaj chauhan
> wrote:
> 
> > hi all ,
> >
> > i have a small doubt : Is it possible to have
> > synchronization between processes running on
> different
> > processors in a SMP without any harware support
> for
> > that. I mean can we implement mutual exclusion in
> > access of shared data without any 'lock ' prefix ,
> or
> > atomic_swap , or atomic test_and_set instructions
> in
> > the instruction set of the machine. If yes then
> How ??
> >
> >
> > Thanks,
> > Rgds ,
> > Pankaj chauhan
> >
> >
> >
> >
>
________________________________________________________________________
> > Yahoo! India Mobile: Download the latest
> polyphonic ringtones.
> > Go to http://in.mobile.yahoo.com
> > --
> > Kernelnewbies: Help each other learn about the
> Linux kernel.
> > Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> > 

________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux