Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About my SeqlockX...

1 view
Skip to first unread message

Ramine

unread,
Mar 16, 2015, 5:09:55 PM3/16/15
to
Hello,


Today i will speak about my SeqlockX that is a variant of the classical
Seqlock that eliminates livelock of the readers when there is many writer.

You will read on internet that Seqlock doesn't work with datastructures
that work with "pointers", because when you use the reader section
in an optimistic way, if the writers modify some pointers , you can get
an "exception", so since it is an exception what can we do about it ?
in Delphi and FreePascal you can catch this exception called
"EAccessViolation" inside the reader section like this:

try

// your reader section here

except
// IO error
On E : EAccessViolation do;
else
raise;
end;


So this way you can effectively use my SeqlockX with datastructures that
uses pointers.



Thank you,
Amine Moulay Ramdane.

Ramine

unread,
Mar 16, 2015, 5:50:21 PM3/16/15
to
Hello,


I think this will work with a linklist and with a SkipList,
i am not sure for AVL trees and Red-Black trees...



Thank you,
Amine Moulay Ramdane.




Ramine

unread,
Mar 16, 2015, 5:57:55 PM3/16/15
to

Hello,


Forget my method , i think it's not good...


If you are using a read-mostly datastructure with pointers don't use
Seqlock, please use instead the Scalable Distributed Reader-Writer Mutex
here:


https://sites.google.com/site/aminer68/scalable-distributed-reader-writer-mutex
0 new messages