Git Product home page Git Product logo

arestyracedectector's Introduction

ArestyRaceDetector

This a project I completed during the Summer of 2014 as a Research Assistant at the Architecture and Programming Languages Lab at Rutgers University. My task was to create a precise race detector using Intel's PIN API that detects data races in simple C/C++ programs. To do this, I had to detect if there was a happens-before relationship between each read-write or write-write operation to a single memory locationn. To detect the happens-before relationship, I used a vector-clock algorithm similar to the one mentioned in FastTrack.

Abstract: Modern computers use multi-core processors and to get optimal performance, a programmer has to write multithreaded code. However, writing correct multi-threaded code is difficult because unintended interactions between two threads can cause errors. The occurrence of data races, in which two threads simultaneously read and write the same shared memory location, is one such error. In this project, we built a race detector for C++ programs using PinTool. This tool uses a simplified version of the FastTrack vector-clock algorithm in order to detect if a happens-before relationship occurs between two accesses to the same memory location. Vector clocks are mechanisms used to show the partial ordering of events in a distributed system. A happens-before relationship between event A on thread X and event B on thread Y occurs if every element in thread X’s vector clock is less than the corresponding elements in thread Y’s vector clock. If there is not a happens-before relationship, and at least one is a write, we declare this as a data race. In other words, a data race occurs when two events access the same location with at least one of them being a write operation and there are no locks in the program to control the ordering of the events. An advanced feature of this tool that separates it from many other data race detectors of this type is that it detects the races in an online fashion. This means that it captures the race as it is occurring, an attribute that will facilitate debugging by software developers. We tested this tool on a few, simple C/C++ programs that were categorized by either known to being race-free or known to have the potential for data races and we found out that we were able to discover data races in such programs as soon as they happen.

Notes: racedetector.cpp is the main race detector which takes a binary executable as input and determines if there is a data race or not. racetest.c is the program in which all the functions for an imaginary bank program are defined and those functions can be rearranged in the main method to simulate different race scenarios. MyArestPosterPDF.pdf is the PDF version of the poster I presented at the Rutgers Aresty Poster Symposium in August 2014 to various faculty, students, and parents.

Acknowledgement

I'd like to cknowledge Dr. Santosh Nagarakatte, Principal Investigator of the Architecture and Programming Languages at Rutgers University and Ibrahim Umar for their help with this project.

arestyracedectector's People

Contributors

shreyashirday avatar shreyas1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.