Problem 2: unpinning a
pinned (referenced) block
We cannot free the
memory space used to
store a referenced block !!
Some record references will
reference to
non-existing data
after the release !!!
Problem 2: unpinning a
pinned (referenced) block
We must
first unswizzle
all (virtual) memory addresses
that point to the freed block
This will unpin a
pinned block....
Key to finding an efficient solution
We must know the
locations of
all
memory references
to
data in the pinned block
Key to finding an efficient solution
We must know the
locations of
all
memory references
This is an
information problem
-
solve it using
a
suitable
data structure
!!
Pre-requesite assumption
How to use the database address field
in pointer swizzling
Example on the use of the linked memory addresses:
initial state
Initial state...
Example on the use of the linked memory addresses:
we read in a
block
The Linked List for a new
block in memory is
empty because there are
no references to its data
Example on the use of the linked memory addresses:
before 1st pointer swizzling
We read another block of data
into the memory buffer...
and we perform
pointer swizzling next !
Example on the use of the linked memory addresses:
AFTER pointer swizzling
We also insert the
location of the
database address in the
Linked list
Example on the use of the linked memory addresses:
before 2nd pointer swizzling
We read another block of data
into the memory buffer...
and we perform
pointer swizzling next !
Example on the use of the linked memory addresses:
AFTER pointer swizzling
The linked list contains
all memory references
that needs
to be
unswizzled
How to unpin a record
(Hash(x) and
use the reverse hash table for
fast look up in
the translation table)
How to unpin a record
❮
❯