DoktoraAçık Erişim

Asenkron programlama modellerini kullanan uygulamalar için yarış durumu yakalama teknikleri

2016
0 görüntülenme
0 i̇ndirme
Danışman: Doç. Dr. Serdar Taşıran

Özet (EN)

Asynchronous programming models has become ubiquitous in concurrent application development for the modern computation platforms, i.e. mobile, web and desktop applications. Similar to all concurrent programs, reasoning about asynchronous programs is challenging for the developers. Different than legacy concurrency constructs (i.e. threads), asynchronous constructs (i.e. callbacks) can invert the control and data flow as the execution order is not linear and may change depending on the dispatch of asynchronous events. This may result in subtle concurrency bugs that can have a big impact on the development cycle as it is notoriously hard to detect, reproduce, and fix them. Data races have been considered as the main source of unintended non-determinism in concurrent programs and seen as a symptom of a higher-level concurrency error. Although race detection in legacy concurrent programming models have attracted a great deal of attention from both the research communities and commercial counterparts, there is a critical need for race detection techniques for asynchronous programs. To address these needs, this thesis introduces techniques for detecting data races on applications using asynchronous programming constructs as a way of concurrency. We introduce race detection technique that is applicable to different asynchronous programming models. We focused mainly on JavaScript web applications and applications using hybrid programming models that integrates dataflow programming construct into shared memory programming models. Our techniques attempts to combine advantages of both static and dynamic analysis. We executed the application code only once, yet we explore multiple execution order with the help of our static analysis approach. The key idea behind our analysis technique is that it encodes the effects of concurrent updates on the shared state by merging the values as opposed to separately considering different orderings. One way to see our approach is that we explore neighboring schedules for a particular runtime execution by analyzing possible re-orderings of the concurrent entities with a single pass over the observed execution. As the first part of our study, we explored JavaScript web applications using asynchronous constructs for user interaction and server requests. First, we conducted empirical studies for identifying the real damages of data races in the web applications by devising randomized and systematic exploration of server requests (XMLHttpRequests) orderings. As opposed to other types of applications, web applications have a more forgiving nature for data races on transient state, since their effects are ephemeral. This is because these races only occur in invisible to the user portions of the program state, or, at worst, UI glitches that are either unnoticed by the user, or disappear if the user reloads the page. In the light of our empirical study, we suggested that a more useful way to think about data races on the web is by focusing on persistent state, such as client-local cookies, localStorage and sessionStorage mechanisms, as well as server-based side effects. We evaluated our technique on 26 web sites that heavily uses asynchronous constructs, we demonstrate that benign races (on transient state) are considerably more common than harmful ones (on persistent state). Finally, we conducted an exploratory study on the reported race related bugs on JavaScript libraries that uses new asynchronous constructs: Promises. In the second part of the thesis, we worked on hybrid programming models combining dataflow constructs with share memory programming model. These hybrid programming models provide programmers with dataflow abstractions for defining tasks as the main execution unit with corresponding data dependencies between each other. Contrary to the pure dataflow model which assumes side-effect free execution of the tasks, these models allow tasks to share the data using some form of thread synchronization, such as locks or transactional memory (TM). We devised a randomized exploration technique with probabilistic guarantees for exploring possible execution orders of the tasks composing the application. Later, we devised a modular race detection technique which can be used for detecting data races in hybrid programming models. We presented a modular representation of happens before relations (execution orders) imposed by different programming models, i.e. dataflow and shared memory, which can be used for extending the detection mechanism for different type of shared memory synchronization systems, i.e. lock-based, transactional memory. Finally, we implemented our detection mechanism as a generic tool prototype that can be easily extended for different type of hybrid programming models.

Yazar

Dr. Erdal Mutlu

Bu Yayına Nasıl Atıf Yapılır

Erdal Mutlu (Doctorate thesis). Asenkron programlama modellerini kullanan uygulamalar için yarış durumu yakalama teknikleri, 2016, Koç University.

Anahtar Kelimeler

Lisans

Tüm Hakları Saklıdır

Bu eser belirtilen lisans koşulları altında paylaşılmaktadır.

Koç University tezlerinden daha fazlası