This website uses cookies to ensure you have the best experience. Learn more

Java Dynamic Race Detector Essay

3535 words - 15 pages

Table of Contents

Revision History

Table of Figures

1. Introduction

2. Overview of Related Work and Literature Survey

2.1. Work Based on Lamport’s happens-before relation

2.2. Work Done by Stefan Savage et al.

3. Work Done in This Project

3.1. Features of JDRD

3.1.1 Configuring JDRD

3.1.2 Running JDRD as Java agent

3.1.3 Modifying a jar file to test with JDRD

3.2. Implementation details of JDRD

3.3. Testing & Interpretation of Results

4. Conclusions and Future Work


Appendix A: Requirements Specification Document

1. Introduction

2. Requirements

2.1. Requirement 1. Usage

2.2. Requirement 2. Algorithm

2.3. Requirement 3. ...view middle of the document...


Multithreaded programming is a very common way of programming to be used in order to solve problems which requires a long time to be solved, handle multiple requests from clients on the server side at the same time in order to provide responsive services, handle operations and user events in order to provide responsive GUIs etc. However, design and implementation of multithreaded software is rather difficult and open to errors. There are several types of errors such as deadlocks, livelocks, starvation where mostly the main reason for all of these problems is the data race problem, of which JDRD will address for software developed in Java programming language.

Race conditions are very common in multithreaded programming where a shared data is accessed by at least two concurrent threads where at least one of the threads performs a write operation and there is no explicit locking mechanism for that variable. Race conditions can cause inconsistencies on shared data, and the result may not be as intended. Figure 1 shows a race condition where output of the running code is not as expected. As a result of the execution of Thread 1 and Thread 2 the Integer value is expected to be 2 but the result is 1.

Figure 1: A simple race condition [1]

Data races can be solved by changing the algorithm, changing the way data is shared or synchronizing the accesses on shared data using locks which is not the topic of this project but, in order to solve problems caused by race conditions firstly developers must detect them. For an example like in Figure 1 this is not difficult but considering more complex software, detection of data races by human eye might be nearly impossible. There are several static and dynamic approaches to detect data races. Static detection methods are based on processing the source code before compile time where dynamic detection techniques depend on the execution of the program.

Since dynamic race detection work on runtime there should be some helper methods to be called in order to notify the detection tool where locks are acquired and released or where shared variables are accessed. Inserting these helper methods in the code for testing and then removing them is not effective. Developers can skip a method call or can call a wrong methods, inserting these helper methods by hand can introduce some other bugs or maybe developers don’t have access to the source code at the moment. Therefore, adding calls to these helper methods programmatically is more effective. For this purpose instrumentation with ASM [3] will be used in JDRD.

Race detection algorithm to be implemented in JDRD is the Lockset Algorithm introduced in Eraser: A Dynamic Data Race Detector for Multithreaded Programs by Stefan Savage et al.[2]

2. Overview of Related Work and Literature Survey

2.1. Work Based on Lamport’s happens-before relation

Most of the work before the...

Find Another Essay On Java Dynamic Race Detector

The Meshed and Non-meshed Training Programs

6881 words - 28 pages outsourcing solutions, to name a few. Thus, it expends greatly on searching and placing the right people on the job to provide the best customer service to its worldwide clientele. The company boasts of dynamic, smart, efficient customer service representatives. This is to strengthen its commitment to its clients to provide quality and excellent service within a cost-effective radius.The company expends on hiring the best people thus after the hiring

When the Bubble Burst Essay

1539 words - 6 pages By the time I arrived state side from my second tour in the Middle East the housing bubble had already burst. I noticed a drastic change in the way that many of my friends and family were living. Several of my friends that worked in real estate had sold their boats and seconds houses. My own stock portfolio had lost a third of its value. My sister and her husband had defaulted on their home mortgage leaving them scrambling for a place to live. I

phase diagram

4456 words - 18 pages Introduction: Chemical equilibrium is a crucial topic in Chemistry. To represent and model equilibrium, the thermodynamic concept of Free energy is usually used. For a multi-component system the Gibbs free energy is a function of Pressure, Temperature and quantity (mass, moles) of each component. If one of these parameters is changed, a state change to a more energetically favorable state will occur. This state has the lowest free energy

Revolutionary Work of Art

1890 words - 8 pages Walter Benjamin emphasizes in his essay, “The Work of Art in the Age of its Technological Reproducibility” that technology used to make an artwork has changed the way it was received, and its “aura”. Aura represents the originality and authenticity of a work of art that has not been reproduced. The Sistine Chapel in the Vatican is an example of a work that has been and truly a beacon of art. It has brought a benefit and enlightenment to the art

Enlightenment Thought in New Zealand Schools

1594 words - 6 pages In this essay I will be looking at how the political and intellectual ideas of the enlightenment have shaped New Zealand Education. I will also be discussing the perennial tension of local control versus central control of education, and how this has been affected by the political and intellectual ideas of the enlightenment. The enlightenment was an intellectual movement, which beginnings of were marked by the Glorious Revolution in Britain

Psychological Egoism Theory

2240 words - 9 pages The theory of psychological egoism is indeed plausible. The meaning of plausible in the context of this paper refers to the validity or the conceivability of the theory in question, to explain the nature and motivation of human behavior (Hinman, 2007). Human actions are motivated by the satisfaction obtained after completing a task that they are involved in. For example, Mother Teresa was satisfied by her benevolent actions and

How Celtic Folkore has Influenced My Family

1587 words - 6 pages Every family has a unique background that influences the way they live and interact with other people. My parents, who emigrated from Ireland to the States with my three brothers in 1989, brought over their own Celtic folklore and traditions that have helped shaped the way our family operates and lives. One aspect of folklore that has helped shape my family dynamic is the Celtic cross—both its background and what role it has played in our lives

Julia Margaret Cameron

1406 words - 6 pages At a time when women were looked upon as being homemakers, wives, mothers and such the late 1850's presented a change in pace for one woman in specific. Photography was discovered in 1826 and soon after the phenomenon of photography was being experimented with and in turn brought new and different ways of photo taking not only as documenting real time, but also conceptualizing a scene in which an image would be taken. Julia Margaret Cameron will

Evaluation of School Improvement

1403 words - 6 pages The evaluation process should be progressive to incorporate overall planning, implement changes, which contribute to success. In order to focus on school climate and norms, the evaluation design must include the students, instructions, and outcomes to improve communication and building-level concerns to be address in this response. School Climate and Social Norms The school principal, other staff leaders, and personnel set the tone and the

Case Study: The Benefits of Animal Testing

1757 words - 7 pages Nine year old Amy has already had a rough start in life. She was born with an abnormal heart that hinders her everyday activities. Amy is unable to keep up with kids her own age because she often tires out easily. As a consequence, she has very little friends and is often alone. Amy is forced to take different medications everyday just to survive. Amy’s life consists of medicine, doctors, and constant hospital visits. However, Amy is due for a

Myth and Magic: Realism in "One Hundred Years of Solitude"

1531 words - 6 pages “He enjoyed his grandmother's unique way of telling stories. No matter how fantastic or improbable her statements, she always delivered them as if they were the irrefutable truth” (Wikipedia, 2011). Experiences are particular instances of one personally encountering or undergoing something and in these moments of time life changes for the best or the worst and memories are formed. These recollections such as riding your first bicycle, going to

Similar Essays

Becoming An It And Web Development

1770 words - 8 pages programmable device came into existence. Modern computers have the ability to compute whatever is instructed to it by programming languages. Programming languages carry out instructions for how to computer should function. The first High-level programming language was Plankkalkul, then a series of other languages including c, c++, c#, java which are used today to pass instructions to the computer. Even modern websites are made using these programming

Botnets: The Real Threat Essay

4126 words - 17 pages . Therefore, P2P botnets show a rise in the ever more difficult race between attackers and defenders. The studies discussing behaviour of more than one type of botnets such as IRC, P2P and HTTP has been included in miscellaneous category. A. Internet Relay Chat Botnets Botnets are regularly used for launching DDoS [2] attacks since their combined bandwidth overwhelms the available bandwidth of most target systems. One possible way to stop DDoS

Supply Chain Management Essay

5464 words - 22 pages pipeline with laminar flow. Traditionally, most supply chains simply evolved rather than being designed. This fact makes supply chains susceptible to turbulence. "Companies are discovering that the vast majority of supply chains are logistically inefficient and therefore prone to poor supply chain dynamic behavior." Because of the huge success of a couple of retaliators, the concepts of supply chain design have come to the forefront

Book Report

7367 words - 29 pages International Journal of Research Studies in Psychology 2012 June, Volume 1 Number 2, 3-16 © The Authors / Attribution-NonCommercial-NoDerivs CC BY-NC-ND The basis of children's trust towards their parents in Java, ngemong: Indigenous psychological analysis Hakim, Mochammad Abdul Center for Indigenous & Cultural Psychology, Faculty of Psychology, Universitas Gadjah Mada, Yogyakarta, Indonesia ( Thontowi, Haidar