@@ -37,7 +37,9 @@ Multi-threading is easier when there is confidence that existing objects will no
\section{Basic Constructs}
We will explore several easy concepts, which we will later combine to reach optimal persistent pointer-based structure. Before that however, we notice that some data structures are persistent in their default implementation. Take stack for example.
We will explore several easy concepts, which we will later combine to reach optimal persistent pointer-based structure.
Before that however, we notice that some data structures are persistent in their default implementation.
Take stack for example.
\subsection{Persistent Stack}
...
...
@@ -141,6 +143,13 @@ The order in which these allocations are executed can be arbitrary.
We can place an upper bound on the number of newly allocated fat nodes -- total number of vertices in the tree (including deleted vertices).
At most one new slot is occupied for every vertex in the tree.
Consider a tree with one vertex A and a sequence of updates.
First B is inserted as a left child of A, then C is inserted as a left child of B, then D is inserted as a right child of A, finally B is deleted and C becomes left child of A.
These operations are captured by a schema of fat vertices in figure \figref{taf-nodes}.
Inverse pointers for the latest version are dotted.
\figure[fat-nodes]{fat-nodes.pdf}{Fat Nodes}
To take advantage of fat nodes, we need the balancing algorithm to limit the number of vertices that change in one operation.
It is sufficient that the changes can be amortized to a constant number per update.
Furthermore, we need a limit on the number of pointers that can target one vertex at one time.