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

Re: synchronization without hardware support



Hi,

AFAIK, Dekker's algorithm provides a strict turn based solution. It assumes
that the two processes are always competing for the resource.

After one process has completed using the resource it will not be able
to make use of the resource again until the other process has used it
atleast once. This is done so as to satisfy the progress requirement.

So if there are two processes and if one process requires use of the 
resource
aggresively and if the other process uses the resource rarely then Dekker's
algorithm may not be the best solution to ensure performance.

I guess all processors should have some kind of 'Test and Set' instructions
which is required to implement locks in SMP.

john



On 05 Jan 2004 10:35:55 +0200, Momchil Velikov <velco@fadata.bg> wrote:

>>>>>> "pankaj" == pankaj chauhan <chauhan_ait@yahoo.co.in> writes:
>
> pankaj> hi all ,
> pankaj> i have a small doubt : Is it possible to have
> pankaj> synchronization between processes running on different
> pankaj> processors in a SMP without any harware support for
> pankaj> that. I mean can we implement mutual exclusion in
> pankaj> access of shared data without any 'lock ' prefix , or
> pankaj> atomic_swap , or atomic test_and_set instructions in
> pankaj> the instruction set of the machine. If yes then How ??
>
> Search for Dekker's algorithm.
>
> ~velco
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/