Accelerating External Search with Bitstate Hashing - PowerPoint PPT Presentation

About This Presentation
Title:

Accelerating External Search with Bitstate Hashing

Description:

Sorting the green bucket having one state for every edge from the 3 black buckets. ... Deadlock Detection in Optical Telegraph. 00:11.20. 00:22.25. 332,963. 420, ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 25
Provided by: sha8155
Category:

less

Transcript and Presenter's Notes

Title: Accelerating External Search with Bitstate Hashing


1
Accelerating External Search with Bitstate Hashing
  • Stefan Edelkamp
  • Shahid Jabbar
  • Computer Science Department
  • University of Dortmund, Dortmund, Germany

2
Model Checking
  • Given
  • A model of a system.
  • A specification property
  • Model Checking Problem Does the system satisfy
    the property ?
  • Method An exhaustive exploration of the state
    space to search for a state that does not satisfy
    the property.
  • Problem How to cope with large state spaces that
    do not fit into the main memory?

3
Two Very Effective Methods
  • External Search
  • Uses Harddisk to store the state space.
  • Implemented on top of SPIN model checker.
  • Promising Largest exploration so far took 20
    GB much larger than even the address limits of
    most computers.
  • Pause and Resume support Can add more
    harddisks.
  • - Slow duplicate detection phase
  • Bitstate Hashing (Partial Search)
  • Uses only a single bit per state for closed
    list gt faster duplicates removal.
  • What if the size of the open list becomes
    greater than the internal memory ?
  • - Solution reconstruction is not possible.

4
Best of the Both Worlds
  • External Search combined with Bitstate Hashing
  • Faster duplicates removal.
  • Open and Closed lists can be saved on the
    harddisk.
  • (Partial) Solution reconstruction.

5
Outline
  1. Directed Model Checking
  2. External Search
  3. Partial Search
  4. External Partial Directed Search
  5. Experimental Results
  6. Conclusions

6
Directed Model Checking (Edelkamp, Leue,
Lluch-Lafuente, 2004)
  • A guided search in the state space.
  • Usually by some heuristic estimate.
  • Only promising states are explored.
  • Under-certain conditions proved to be complete.
  • Shorter error trails
  • Better for human comprehension
  • Problem The inevitable demands of the model ..
    Space, space and space.

7
Possible Solution
  • Use Virtual Memory.
  • Assume a bigger address space divided into pages.
  • Saved on the hard disk but are moved back to the
    main memory whenever they are called Page
    Faults.
  • Pages are mapped to physical locations within the
    main memory and the desired content is returned
    from the main memory location.

8
Problem with the Virtual Memory
Virtual Address Space
0x000000
Memory Page
0xFFFFFF
9
External Memory Model (Aggarwal and Vitter)
If the input size is very large, running time
depends on the I/Os rather than on the number of
instructions.
M
Scan(N) O(N / B) Sort(N) O(N/B log M/B N/B)
Input of size N and N gtgt M
10
External Memory Graph Algorithms
  • External breadth first search Munagala and
    Ranade, 2001
  • Generated states flushed to the disk for every
    BFS level.
  • No hash table.
  • Duplicates are removed by sorting the nodes
    according to the indices and doing an scan and
    compaction phase.
  • Before expanding a layer t, the nodes in the
    layer t-1 and t-2 are subtracted from t.
  • O(V sort(V E)) I/Os.
  • where sort(N) O(N / B logM/B N / B) I/Os
  • Korf, 2003 presented the breadth first search
    version for implicit graphs.

11
External BFS
X Y Z A
X Y Z
A
t
t1
t2
12
A Algorithm a.k.a Goal-directed Dijkstra
  • A heuristic estimate is used to guide the search.
  • E.g. Straight line distance from the current node
    to the goal in case of a graph with a geometric
    layout.
  • Reweighing w(u,v) w(u,v) h(u) h(v)
  • Problems
  • A needs to store all the states during
    exploration.
  • A generates large amount of duplicates that can
    be removed using an internal hash table only if
    it can fit in the main memory.
  • A do not exhibit any locality of expansion. For
    large state spaces, standard virtual memory
    management can result in excessive page faults.

13
Take a closer look
h
  • Implicit, unweighted, undirected graphs
  • Consistent
  • heuristic
  • estimates.
  • gt ?h -1,0,1

0 1 2 3 4 5 6






0
1
2
3
4
5
Its a Bucket !!
g
14
Bucket
  • A Bucket is a set of states, residing on the
    disk, having the same (g, h) value,
  • Where, g number of transitions needed to
    transform the initial state to the states of the
    bucket,
  • and h Estimated distance of the buckets state
    to the goal
  • No state is inserted again in a bucket that is
    expanded.
  • If Active (being read or written), represented
    internally by a small buffer.

15
External A Edelkamp, Jabbar, and Schroedl,
2004
  • Buckets represent temporal locality cache
    efficient order of expansion.
  • If we store the states in the same bucket
    together we can exploit the spatial locality.
  • Munagala and Ranades BFS and Korfs delayed
    duplicate detection for implicit graphs.

External A
16
Complexity Analysis
  • Internal A gt Each edge is looked at most once.
  • Duplicates Removal
  • Sorting the green bucket having one state for
    every edge from the 3 black buckets.
  • Scanning and compaction.
  • O(sort(E))
  • Subtraction
  • Removing states of orange buckets (duplicates
    free) from the green one.
  • O(scan(V) scan(E))




17
I/O Performance of External A
  • Theorem The complexity of External A in an
    implicit unweighted and undirected graph with a
    consistent estimate is bounded by O(sort(E)
    scan(V)) I/Os.

18
Bitstate Hashing
  • Single bit per state to represent Closed list.
  • Guarantees duplicates removal.
  • But can remove non-duplicates too
    false-positive.
  • Average probability of a false-positive error
    during the search

Since the ith element collides with one of the
i-1 already inserted elements with a probability
of at most (i-1) / m
n size of the state space m size of the hash
table
19
External Partial Directed Search
H0 m 1 Bitstate Hashtable for i 0 to m
1 Hi ? false
  • Procedure External A
  • Bucket(0, h(I)) ? I
  • fmin ? h(I)
  • while (fmin ? 8)
  • g ? mini Bucket(i, fmin - i) ? ?
  • while (g fmin)
  • h ? fmin - g
  • forall v ? succ(Bucket(g, h))
  • if (not Hv)
  • Hv ? true
  • A(fmin),A(fmin 1),A(fmin 2) ? v
  • Bucket(g 1, h 1) ? A(fmin 2) U
    Bucket(g 1, h1)
  • Bucket(g 1, h) ? A(fmin 1) U
    Bucket(g 1, h)
  • Bucket(g 1, h - 1) ? A(fmin) U Bucket(g
    1, h - 1)
  • g ? g 1
  • fmin ? mini j gt fmin Bucket(i, j) ? ? U
    8

20
Experimental Results -1
  • Deadlock Detection in Optical Telegraph

Sta-tions Sol. Depth stored sates stored states with bitstate Time (mmss) Time with bitstate
7 45 333,877 243,318 0014.47 0007.39
8 50 420,531 332,963 0022.25 0011.20
9 57 9,186,611 6,350,087 1726.88 0410.33
21
Experimental Results -2
  • CORBA GIOP 1 Server, N Clients

Clients Sol. Depth stored sates stored states with bitstate Time (mmss) Time with bitstate
2 58 52,410 48,000 0011.36 0003.49
3 70 893,392 809,098 0303.79 0043.26
4 75 7,929,710 6,998,693 2249.23 0843.01
22
Experimental Results -3
  • CORBA GIOP 2 Servers, N Clients

Clients Sol. Depth stored sates stored states with bitstate Time (mmss) Time with bitstate
3 76 3,431,619 3,127,718 0543.16 0242.5
4 81 30,504,630 27,133,946 29300.00 3306.28
20 GB space requirement
23
Experimental Results 4Negative case
  • Deadlock Detection in Dining Philosophers

Philoso-phers Solution Depth stored sates stored states with bitstate Time (mmss) Time with bitstate
100 402 999,810 975,459 0105 0139
150 603 3,330,456 3,319,312 0544 0618
Time to compute the hash value is dominant than
external sorting!
24
Summary
  • State space explosion problem can be circumvented
    by Directed External Model Checking or Bitstate
    Hashing.
  • Both approaches have some flaws.
  • A fusion of both approaches cover individual
    flaws.
  • Implemented on top of IO-HSF-SPIN SPIN model
    checker with external heuristic search.
  • Gain in speed up till 9 times.

-- THE END --
Write a Comment
User Comments (0)
About PowerShow.com