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

About Iteratoris and concurrency

1 view
Skip to first unread message

Ramine

unread,
Mar 12, 2015, 1:44:26 PM3/12/15
to
Hello,

I was thinking about the Iterators and concurrency and thinking about
the following Iterators:

Fail Safe Iterators
Fail Fast Iterators

I think that Fail Safe takes too much memory, and Fail Fast is not good,
so what i was thinking about is since we are using concurrency the
iterator can use the "Binary Search" and return the position of the
element and if it doesn't find the element it returns the positions
lesser than the element and if the element is not the first element of
the datastructure, or is not the last element of the datastructure , it
will return the next element of the element that is lesser than the
element that we didn't find in the datastructure, and if the element
that is lesser is the first element it will test if the element is
lesser so it will return the next element, or if the element is greater
it will return the element , and if the element that is returned is the
last element of the datastructurte it will return "no element found"..
this way the iterator in the presenc of concurrency will use a Binary
search that return a view of the datastructure that look like Fail Safe
Iterators, but my way will allow to use less memory than Fail Safe
Iterators.


This is how i will implement my Iterators for my concurrent AVL tree and
my concurrent Red Black Tree..



Thank you,
Amine Moulay Ramdane.




Ramine

unread,
Mar 12, 2015, 1:54:00 PM3/12/15
to

Hello,


My Iterator is not actually using a Binary search, it is using something
that look like Binary search that gives the same result as a binary
search and that works on concurrent AVL trees and concurrent Red Blck
trees and my Iterator is better than the Fail Safe Iterator.
0 new messages