• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Ssbse12b.ppt
 

Ssbse12b.ppt

on

  • 215 views

Threads, bug patterns, interactions, concurrency

Threads, bug patterns, interactions, concurrency

Statistics

Views

Total Views
215
Views on SlideShare
196
Embed Views
19

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 19

http://www.ptidej.net 18
http://squirrel.polymtl.ca 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Ssbse12b.ppt Ssbse12b.ppt Presentation Transcript

    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Neelesh Bhattacharya Olfat El-Mahi, Etienne Duclos, Giovanni Beltrame, Giuliano Antoniol, Sébastien Le Digabel and Yann-Gaël Guéhéneuc Department of Computer and Software Engineering Department of Mathematics and Industrial Engineering École Polytechnique de Montréal, Québec, Canada SSBSE - September 30, 2012 Conclusion Future Work Pattern Trace Identification, Detection, and Enhancement in Java SOftware Cost-effective Change and Evolution Research Lab
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Outline Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Approach Algorithms Used Programs Under Test (PUTs) Programs Under Test (PUTs) Results Results Conclusion Conclusion Future Work 2 / 23 Future Work
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Introduction (1/2) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 3 / 23 Developers are seeking the use of concurrency extensively Extremely difficult to detect and remove data-race and interference bugs Might not detect a bug for system’s non-deterministic components
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Introduction (2/2) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 4 / 23 Interference bug pattern is the most frequently occurring and one of the hardest to expose CHESS [1] requires lot of testing effort to find interference bugs in concurrent systems Need to reduce the effort for finding interference bugs
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 5 / 23 Multiple concurrent threads access a shared variable At least one access is a write The threads use no explicit mechanism to prevent simultaneous access Generalized form of classical data race interference bug pattern
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Problem Statement Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 6 / 23 Expose interference bug pattern for Programs Under Test (PUTs), using a set of optimization algorithms: Random, Stochastic Hill Climbing and Simulated Annealing
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 7 / 23 ReSP - The Virtual Platform Used
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern ReSP - The Virtual Platform Used Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 7 / 23 No effect of the OS No delay in the hardware No cache effects
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern ReSP - The Virtual Platform Used Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work No effect of the OS No delay in the hardware No cache effects Thus our focus is only on the bug inherent in the code 7 / 23
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Research Questions Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 8 / 23 How to maximize interference probability between threads? How the search space dimension impacts the search algorithm performance?
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Approach (1/4) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 9 / 23 No delay injected
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Approach (2/4) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 10 / 23 Single delay injected
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 11 / 23 Approach (3/4)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 12 / 23 Approach (4/4)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Algorithms Used Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 13 / 23 Stochastic Hill Climbing (SHC) Simulated Annealing (SA) Random (RND)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 14 / 23 Programs Under Test (PUTs)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Programs Under Test (PUTs) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 14 / 23 Synthetic Programs Matrix Multiplication (MM) Count Shared Data (CSD) Average of Numbers (AvN)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Programs Under Test (PUTs) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement Synthetic Programs Matrix Multiplication (MM) Count Shared Data (CSD) Average of Numbers (AvN) ReSP - The Virtual Platform Used Research Questions Real World Programs Approach CFFT Algorithms Used CFFT6 Programs Under Test (PUTs) FFMPEG Results Conclusion Future Work 14 / 23
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Results (1/5) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 15 / 23 RND, SHC, and SA for search space upto 10Ms delay (RQ1)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Results (2/5) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 16 / 23 RND, SHC, and SA for search space upto 1Ms delay (RQ2)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Results (3/5) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 17 / 23 RND, SHC, and SA for search space upto 10s delay (RQ2)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Results (4/5) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 18 / 23 RND, SHC, and SA for search space upto 1s delay (RQ2)
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Results (5/5) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 19 / 23 Execution Times for Real-World Applications in ms SA HC RND CFFT 1 ×106 3118 3578 113521 1×107 5224 4976 107586 CFFT6 1×106 27443 27328 342523 1×107 2041 21943 339951 FFMPEG 1×106 1562 1378 59599 1×107 4672 5100 133345
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Conclusion (1/2) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 20 / 23 Proposed an approach to expose interference bugs in multi-threaded software systems Novel fitness function to allow exposing thread interference Reported results of our fitness function and the three search algorithms on six multi-threaded programs
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Conclusion (2/2) Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement For small search spaces, even a simple random strategy may suffice ReSP - The Virtual Platform Used In large search spaces, SA outperforms SHC marginally Research Questions Random performs the worst among all approaches Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 21 / 23
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Future Work Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 22 / 23 Verify the efficiency of our proposed approach on real-time, more complex programs Use more complex data structures such as pipes, shared memories or sockets Verify our approach on real hardware platform Compare our results with Genetic Algorithm and Tabu Search
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 23 / 23 Summary We propose an optimization approach to maximize interference probability between threads We framed and answered two research questions: How to maximize interference probability in threads? How search space dimension impacts search algorithms? Simulated Annealing is marginally the best approach to maximize interference bug Varying the search space affects the algorithm performances
    • Optimizing Threads Schedule Alignments to Expose the Interference Bug Pattern Neelesh Bhattacharya Introduction Interference Bug Pattern Problem Statement ReSP - The Virtual Platform Used Research Questions Approach Algorithms Used Programs Under Test (PUTs) Results Conclusion Future Work 23 / 23 Summary We propose an optimization approach to maximize interference probability between threads We framed and answered two research questions: How to maximize interference probability in threads? How search space dimension impacts search algorithms? Simulated Annealing is marginally the best approach to maximize interference bug Varying the search space affects the algorithm performances