• No results found

SHARED HASH TABLES IN PARALLEL MODEL CHECKING

N/A
N/A
Protected

Academic year: 2021

Share "SHARED HASH TABLES IN PARALLEL MODEL CHECKING"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

SHARED HASH TABLES IN PARALLEL MODEL CHECKING

ALFONS LAARMAN

JOINT WORK WITH MICHAEL WEBER AND JACO VAN DE POL

(2)

Introduction

Goal and motivation

What is model checking?

Hash tables

Related work

Lockless hash table

Experiments

(3)

Goal:

Realize efficient multi-core reachability

Motivation:

Multi-core is a necessity

Reachability is a the basis of many verification problems

Current model checkers do not scale as good as possible

If you cannot parallelize reachability efficiently, then how do you parallelize more complicated algorithms:

full LTL model checking, symbolic reachability, POR, etc

GOAL AND MOTIVATION

(4)
(5)

•PROMELA (SPIN) •DVE (DiVinE) •.NET (MoonWalker) •C/C++ (terminator) •Process algebraic (mCRL 1/2) •Timed (UPPAAL)

•Hardware model checkers

WHAT IS MODEL CHECKING?

P rocess

1

P rocess

2

x

x

+ 1;

1

if

y

==1

then

2

x

10;

3

end

4

y

y

+ 1;

1

if

x

==1

then

2

y

10;

3

end

4

State space

explosion

(6)

•States are arrays with variables •Search in state space graph •V stores all seen states

•DFS or BFS depending on T •Deadlocks and invariants

Parallelization: •High throughput

•Synchronization points

WHAT IS MODEL CHECKING?

Data: Buffer T =

{

s

0

}

, Set V =

while

state

T

.

get

()

do

1

count

0;

2

for

succ

in

next-state

(state)

do

3

count

count

+ 1;

4

if

V

.

find-or-put

(succ)

then

5

T

.

put

(succ);

6

end

7

end

8

if

0 ==

count

then

9

//DEADLOCK, print trace..

10

end

11

end

12
(7)

A key is associated with data by using its hash as an index in a table

(wikipedia)

Hash collisions:

•Create overflow list (chaining) large memory working set

•Continue probing (open addressing) asymptotic behavior when full • Linear probing, double hashing

(8)

Fast model checkers: SPIN

DiVinE 2.2

DiVinE with Shared storage

RELATED WORK

(9)

RELATED WORK

store Worker 1 Worker 2 Worker 4 Worker 3 Stack Stack Stack Stack Worker 1 Worker 2 Worker 3 Worker 4 Queue Queue Queue Queue store store store store

DiVinE 2.2: static partitioning

BFS only, high comm. Costs,

static load balancing

SPIN 5.2.4: shared storage + stack slicing

DFS only, multiple sync. points, specific

case of load balancing

(10)

RELATED WORK

store

Worker 1 Worker 2

Worker 3 Worker 4

Barnat, Rokai (2007) Shared hash tables in

parallel model checking

“Shared hash tables do not scale

beyond 8 cores”

“Could not investigate lockless hash

table solution”

• Flexible reachability algorithm

(11)

Design

Lockless hash table Load balancing

(12)

•Investigate requirements on shared storage •Investigate hardware (cache behavior)

Requirements

•Find-or-put operation only

•Scale by keeping a low memory working set •No pointers, no allocation

•No resize!

•Statically sized state vectors

(13)

Open addressing Hash memoization Separate data

Walking the line

Lockless (CAS + write bit)

See also Cliff Click JavaOne talk (2007)

LOCKLESS HASH TABLE

|state|

data

bucket

(14)

LOCKLESS HASH TABLE

Walk-the-line

Linear probing

Wait for write in data

array to complete

(15)

Static load-balancing

Workers can run out of work Work stealing/handoff

Synchronized random polling

[Sanders97]

(16)

As a summary, we implemented: •The lockless hash table (in C) •Reachability DFS + BFS

•Static load-balancing

•Synchronized random polling

Reused DiVinE next-state function

SUMMARY

(17)

Using CMS 16-way AMD Opteron cluster linux 2.6.18, 2.6.32+patch

30+ models from BEEM database

Translated models for SPIN (same state count!) Statically sized hash tables

Fair

Results

SETUP

(18)

EXPERIMENTS

(19)

EXPERIMENTS

(20)

EXPERIMENTS

(21)

EXPERIMENTS

(22)
(23)
(24)

DISCUSSION / LIMITATIONS

• Statically sized states • Reachability as a basis • Slower sequentially

(25)

Adapt applications to hardware (memory hierarchy)

Centralized state storage scales better and is more flexible

Scalable explicit exploration is a good starting point for future work on multi-core X. X {(weak) LTL model checking, symbolic exploration, space-efficient explicit exploration}

Holzmann’s conjectures:

works only for unoptimized sequential code

works only for small state vectors/long transition delays

SPIN has many features though, but backwards compatibility seems wrong starting point for scalable multi-core algorithms

HTTP://FMT.CS.UTWENTE.NL/TOOLS/LTSMIN/

(26)
(27)
(28)

References

Related documents

Nicht alle über die Blockchain entwickelten Techniken werden bestehen bleiben, aber wenn das große Potential der Technologie die Risiken überwiegt, sieht die Chance für die

James P Grant school of Public Health BRAC University in collaboration with UNICEF organized a short course on Evaluation of Development Programme (EDP) from March 23 to 30,

While not directly tied to the Coastal Wetlands enhancement area, boundary expansion of the Lake Erie Coastal Zone offers the potential for wetland protection in priority areas of

In this work the dynamic optimization via nonlinear programming techniques and the robust control of a non-isothermal batch crystallizer with two practical robust control approaches

(1999) also observed higher concentrations of GEM following a rain event and irrigation and concluded that liquid precipitation promotes mercury emissions from the soil.. By the

Bass Congas Dr... Bass

A literature review commissioned by the European Commission (TNO, 1997), which examined the above studies and others, concluded that there was ‘no scientific evidence that engine

On Skin Contact: Remove contaminated clothing and wash skin with soap and water.. Wash or clean clothing