Distributed Verification of Multi-threaded C++ Programs Stefan Edelkamp joint work with Damian Sulewski and Shahid Jabbar.

Slides:



Advertisements
Similar presentations
Algorithm Engineering Parallele Suche Stefan Edelkamp.
Advertisements

Lecture 12: MapReduce: Simplified Data Processing on Large Clusters Xiaowei Yang (Duke University)
Part IV: Memory Management
Practical techniques & Examples
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
CS 484. Discrete Optimization Problems A discrete optimization problem can be expressed as (S, f) S is the set of all feasible solutions f is the cost.
Accelerating External Search with Bitstate Hashing Stefan Edelkamp Shahid Jabbar Computer Science Department University of Dortmund, Dortmund, Germany.
ITEC 352 Lecture 27 Memory(4). Review Questions? Cache control –L1/L2  Main memory example –Formulas for hits.
Configuring the Operating System Configure Performance Options Processor scheduling and memory usage Virtual memory Memory for network performance Configure.
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
Memory Management (II)
Multiprocessing Memory Management
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Memory Management 2010.
Memory Organization.
Science Advisory Committee Meeting - 20 September 3, 2010 Stanford University 1 04_Parallel Processing Parallel Processing Majid AlMeshari John W. Conklin.
CS 584. Discrete Optimization Problems A discrete optimization problem can be expressed as (S, f) S is the set of all feasible solutions f is the cost.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
Mapping Techniques for Load Balancing
Design and Implementation of a Single System Image Operating System for High Performance Computing on Clusters Christine MORIN PARIS project-team, IRISA/INRIA.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
Memory Management. Process must be loaded into memory before being executed. Memory needs to be allocated to ensure a reasonable supply of ready processes.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Chapter 1 Computer System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Kinshuk Govil, Dan Teodosiu*, Yongqiang Huang, and Mendel Rosenblum
Introduction, background, jargon Jakub Yaghob. Literature T.G.Mattson, B.A.Sanders, B.L.Massingill: Patterns for Parallel Programming, Addison- Wesley,
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Sandor Acs 05/07/
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Parallelization of the Classic Gram-Schmidt QR-Factorization
Chapter 4 Memory Management Virtual Memory.
Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
The Cosmic Cube Charles L. Seitz Presented By: Jason D. Robey 2 APR 03.
External Program Model Checking Stefan Edelkamp, Shahid Jabar, Dino Midzic, Daniel Rikowski and Damian Sulewski Computer Science Department University.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Computer Systems Week 14: Memory Management Amanda Oddie.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Parallel External Directed Model Checking with Linear I/O Shahid Jabbar Stefan Edelkamp Computer Science Department University of Dortmund, Dortmund, Germany.
Ronny Krashinsky Erik Machnicki Software Cache Coherent Shared Memory under Split-C.
External A* Stefan Edelkamp, Shahid Jabbar (ich) University of Dortmund, Germany and Stefan Schrödl (DaimlerChrysler, CA)
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
Department of Computer Science and Software Engineering
CS 584. Discrete Optimization Problems A discrete optimization problem can be expressed as (S, f) S is the set of all feasible solutions f is the cost.
I/O Efficient Directed Model Checking Shahid Jabbar and Stefan Edelkamp, Computer Science Department University of Dortmund, Germany.
COMP381 by M. Hamdi 1 Clusters: Networks of WS/PC.
1 Distributed BDD-based Model Checking Orna Grumberg Technion, Israel Joint work with Tamir Heyman, Nili Ifergan, and Assaf Schuster CAV00, FMCAD00, CAV01,
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
Large Scale External Directed Liveness Checking Stefan Edelkamp Shahid Jabbar Computer Science Department University of Dortmund, Dortmund, Germany.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Memory Management Chapter 5 Advanced Operating System.
1 Hierarchical Parallelization of an H.264/AVC Video Encoder A. Rodriguez, A. Gonzalez, and M.P. Malumbres IEEE PARELEC 2006.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Main Memory CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Chapter 2 Memory and process management
Segmentation COMP 755.
Modeling Page Replacement Algorithms
Program Execution in Linux
Architecture Background
Page Replacement.
Modeling Page Replacement Algorithms
Chapter 8: Memory management
Prof. Leonardo Mostarda University of Camerino
CSE451 Virtual Memory Paging Autumn 2002
CSE 542: Operating Systems
Presentation transcript:

Distributed Verification of Multi-threaded C++ Programs Stefan Edelkamp joint work with Damian Sulewski and Shahid Jabbar

Motivation: IO-HSF-SPIN Arrives at the final state Arrives again at same final state Same states in both parts Current state Already seen final state Large jumps due to 2nd heuristic 2.9 TB 20 days 1 node days 3 nodes

Overview Software Checking in StEAM Externalization Virtual Addresses Parallelization

Overview Software Checking in StEAM Externalization Virtual Addresses Parallelization

Software Checking Advantages + Building a model unnecessary + Learning specification language unnecessary + Checking can be done more often Disadvantages - Code has to be executed - Huge number of states - Huge states

StEAM Can check concurrent C++ programs Uses a virtual machine for execution supports BFS, DFS, Best-First, A*, IDA* finds Deadlocks Assertion Violations Segmentation Faults

Objectcode StEAM - Checking a C++ Program igcc Compiler Model checker Virtual Machine char globalChar; int globalBlocksize = 7; int main(){ allocateBlock(blocksize); } void allocateBlock(int size){ void *memBlock; memBlock = (void *) malloc(size); }

StEAM - Interpreting the Object Code char globalChar; int globalBlocksize = 7; int main(){ allocateBlock(blocksize); } void allocateBlock(int size){ void *memBlock; memBlock = (void *) malloc(size); } Register BSS Section Data Section Text Section Stack Memory Pool ICVM Virtual Machine Objectcode

StEAM – Generating States Register BSS Section Data Section Text Section Stack Memory Pool ICVM Virtual Machine StEAM Register BSS Section Data Section Text Section Stack Memory Pool Initial State Register BSS Section Stack Memory Pool State 1 Register BSS Section Data Section Stack State 2

Overview Software Checking in StEAM Externalization Virtual addresses Parallelization

Externalization - Motivation Internal External time problem size

Externalization – Mini States pointer to a state in RAM or on Disk pointer to the predecessor mini state constant size Disk RAM [EJMRS 06]

Externalization – Expanding a State Mini States Secondary Memory Cache Internal Memory

Externalization – Flushing the Cache Mini States Secondary Memory Cache Internal Memory

Externalization – Collapse Compression Register BSS Section Data Section Text Section Stack Memory Pool State CachesFiles on Disk

Overview Software Checking in StEAM Externalization Virtual Addresses Parallelization

Virtual Addresses programs request memory memory assignment done by system moving program between nodes impossible two possible strategies  converting the addresses before executing  using virtual addresses

Virtual Addresses – Memory Management Stack Stack pointer Text BSS Data Program counter Memory pool 0 RAM real address: x virtual address: y y x, size AVL-Tree Stack pointer

Virtual Addresses - Overhead real virtual nodes time

Overview Software Checking in StEAM Externalization Virtual Addresses Parallelization

Parallelization – Motivation Distributed (Shared) Memory  MPI channels/shared RAM communication Sending full states too expensive (if not used for expansion)  Exploit externalization  DualChannel (Speedup vs. Load Balance)  Appropriate State Space Partitioning

Parallelization – Dual Channel Communication

Parallelization – Hash Partitioning Partitioning by hashing full state Problem: Successors often not in same partition  high communication overhead Partitioning by hashing partial state, e.g. memory pool Problem: Too many states map to one hash value  Load balancing

Parallelization – Incremental Tree Hashing h(3,1) = 3*3+1*9 mod 17= 1 h(1,2) = 1*3+2*9 mod 17 = 4 h(2,2,1,2) = 9 = 6+h(2,1,2)*3^1 = 6+1*3 mod 17 h(2) = 2*3^1 mod 17= 6 h(s) = (Σ i s i 3^i) mod 17 h(1,2,3,1,2,2,1,2) = 4+1*3^2 + 9*3^(2+2) mod 17 = 11 [EM05]

Parallelization – Search Partitioning DFS [Holzman & Bosnacki 2006] Best-First, A* horizontal slicesvertical slices

Parallelization - Hardware Cluster Vision System (PBS) Linux Suse 10.0 MPI via infiniband Files via GBit Ethernet 224 nodes (464 procs), < 15 used AMD Opteron DP 50 (2.4 GHz)

Experiments: 15-Puzzle Partial Hash time nodes speedup

Experiments – Depth-First Slicing 200 Philosophers time processors Top Result: 600 Phils / 6 nodes 97 KB /state Ex Collapse Compression & Distribution 16GB  1.5 GB per node

Experiments - Bath-Tub Effect (50 phils-avg.) Time Size of Depth Layer validates Holzmann & Bosnacki

Experiment - Shared Memory Bakery (pthread) 4 Opteron MP 852 (2.6 GHZ) nodes speedup time

Conclusion Preceeding Work: Full Externalization of States, inIO-HSF-SPIN  Constant-Size RAM, e.g. 1.8 GB RAM, 20 days 1 proc, 8 days 4 procs, 2.9TB disk [EJ06], Distribution via (g+h)-Value Problem: Huge & Highly Dynamic States Solution: Mini States as Constant Size Finger Prints of States in RAM for Dual-Channel Communication to combine External and Parallel Search with Memory-Pool, Best-First Slicing Partitioning