Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #4090 > unrolled thread

I have to prove my scalable reference counting algorithm

Started bycomputer45 <computer45@cyber.com>
First post2018-03-19 23:19 -0400
Last post2018-03-19 23:19 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

  I have to prove my scalable reference counting algorithm computer45 <computer45@cyber.com> - 2018-03-19 23:19 -0400

#4090 — I have to prove my scalable reference counting algorithm

Fromcomputer45 <computer45@cyber.com>
Date2018-03-19 23:19 -0400
SubjectI have to prove my scalable reference counting algorithm
Message-ID<p8pghe$am8$2@dont-email.me>
Hello,


I have to prove my scalable reference counting algorithm, like with 
mathematical proof, so i will use logic to prove like in PhD papers:

You will find the code of my scalable reference counting inside 
AMInterfacedObject.pas inside the zip file here:

https://sites.google.com/site/aminer68/scalable-reference-counting-with-efficient-support-for-weak-references


If you look inside the code there is two methods, _AddRef() and 
_Release() methods, i am using two scalable counting networks,
think about them like counters, so in the _AddRef() method i am
executing the following:

v1 := counting_network_next_value(cn1);

cn1 is the scalable counting network, and counting_network_next_value()
is a function that increment the scalable counting network by 1.

In the _Release() method i am executing the following:

v2 := counting_network_next_value(cn1);
v1 := counting_network_next_value(cn2);
v1 := counting_network_next_value(cn2);

So my scalable algorithm is "smart", because the logical proof is
that i am calling counting_network_next_value(cn1) first in the
above, so this allows my scalable algorithm to work correctly,
because we are advancing cn1 by 1 to obtain the value of cn1,
so the other threads are advancing also cn1 by one inside
_Release() , it is the last thread that is advancing cn1
by 1 that will make the reference counter equal to 0 , so
this scalable algorithm is working. Please look more carefully
at my algorithm and you will notice that it is working as
i have just logically proved it.


Thank you,
Amine Moulay Ramdane.



[toc] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web