Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Thomas Ball Principal Researcher Microsoft Corporation  Sebastian Burckhardt Researcher Microsoft Corporation  Madan Musuvathi Researcher Microsoft.

Similar presentations


Presentation on theme: " Thomas Ball Principal Researcher Microsoft Corporation  Sebastian Burckhardt Researcher Microsoft Corporation  Madan Musuvathi Researcher Microsoft."— Presentation transcript:

1  Thomas Ball Principal Researcher Microsoft Corporation  Sebastian Burckhardt Researcher Microsoft Corporation  Madan Musuvathi Researcher Microsoft Corporation  Shaz Qadeer Senior Researcher Microsoft Corporation TL58

2

3

4  Madan Musuvathi Researcher Microsoft Corporation

5

6  Madan Musuvathi Researcher Microsoft Corporation

7 CAP Memory Model bugs Memory Model bugs Monitors Coverage Repro Testing Data races Data races Debugging Visualization Unmanaged Program Unmanaged Program Windows Managed Program Managed Program.NET CLR Record the interleaving executed Drive the program along an interleaving Record the interleaving executed Drive the program along an interleaving

8

9

10 Kernel: Threads, Scheduler, Synchronization Objects Kernel: Threads, Scheduler, Synchronization Objects While(not done) { TestScenario() } While(not done) { TestScenario() } TestScenario() { … } Program CHESS CHESS runs the scenario in a loop Every run takes a different interleaving Every run is repeatable Win32/.NET Uses the CAP scheduler To control and direct interleavings Detect Assertion violations Deadlocks Dataraces Livelocks CAP

11 x = 1; … x = k; x = 1; … x = k; x = 1; … x = k; x = 1; … x = k; … n threads k steps each Goal: Scale CHESS to large programs (large k)

12 x = 1; if (p != 0) { x = p->f; } x = 1; if (p != 0) { x = p->f; } x = 1; if (p != 0) { x = 1; if (p != 0) { x = p->f; } x = p->f; } p = 0; Thread 1Thread 2 preemption non-preemption

13 x = 1; … x = k; x = 1; … x = k; x = 1; … x = k; x = 1; … x = k; … n threads k steps each

14  Thomas Ball Principal Researcher Microsoft Corporation

15

16

17

18

19

20

21 EnterCS(cs) if (p != 0) { x = p->f; } LeaveCS(cs) EnterCS(cs) if (p != 0) { x = p->f; } LeaveCS(cs) p = 0; Thread 1Thread 2

22

23

24

25 flag1 = true; if( !flag2 ) DoWork(); flag1 = true; if( !flag2 ) DoWork(); flag2 = true; if( !flag1 ) DoWork(); flag2 = true; if( !flag1 ) DoWork(); Thread 1Thread 2 // initial state volatile bool flag1 = false; volatile bool flag2 = false; // initial state volatile bool flag1 = false; volatile bool flag2 = false;

26

27 Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

28

29 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30


Download ppt " Thomas Ball Principal Researcher Microsoft Corporation  Sebastian Burckhardt Researcher Microsoft Corporation  Madan Musuvathi Researcher Microsoft."

Similar presentations


Ads by Google