372 research outputs found
Predictive Monitoring against Pattern Regular Languages
In this paper, we focus on the problem of dynamically analysing concurrent
software against high-level temporal specifications. Existing techniques for
runtime monitoring against such specifications are primarily designed for
sequential software and remain inadequate in the presence of concurrency --
violations may be observed only in intricate thread interleavings, requiring
many re-runs of the underlying software. Towards this, we study the problem of
predictive runtime monitoring, inspired by the analogous problem of predictive
data race detection studied extensively recently. The predictive runtime
monitoring question asks, given an execution , if it can be soundly
reordered to expose violations of a specification.
In this paper, we focus on specifications that are given in regular
languages. Our notion of reorderings is trace equivalence, where an execution
is considered a reordering of another if it can be obtained from the latter by
successively commuting adjacent independent actions. We first show that the
problem of predictive admits a super-linear lower bound of , where
is the number of events in the execution, and is a parameter
describing the degree of commutativity. As a result, predictive runtime
monitoring even in this setting is unlikely to be efficiently solvable.
Towards this, we identify a sub-class of regular languages, called pattern
languages (and their extension generalized pattern languages). Pattern
languages can naturally express specific ordering of some number of (labelled)
events, and have been inspired by popular empirical hypotheses, the `small bug
depth' hypothesis. More importantly, we show that for pattern (and generalized
pattern) languages, the predictive monitoring problem can be solved using a
constant-space streaming linear-time algorithm
Recommended from our members
Predicate detection for parallel computations
One of the fundamental problems in runtime verification of parallel program is to check if a predicate could become true in any global state of the system. The problem is challenging because of the nondeterministic process or thread scheduling of the system. Predicate detection alleviates this problem by analyzing the computation of the program and predicting whether the predicate could become true by exercising an alternative process schedule. The technique was first introduced by Cooper et al. and Garg et al. for distributed debugging. Later, jPredictor applies this technique for concurrent debugging. We improve the technique of predicate detection in three ways. The first part of this dissertation presents the first online-and-parallel predicate detector for general-purpose predicate detection, named ParaMount. ParaMount partitions the set of consistent global states and each subset can be enumerated in parallel using existing sequential enumeration algorithms. Our experimental results show that ParaMount speeds up the existing sequential algorithms by a factor of 6 with 8 threads. Moreover, Paramount can run along with the execution of users’ program and hence it is applicable even to non-terminating programs. The second part develops a fast enumeration algorithm, named QuickLex, for consistent global states. In comparison with the original lexical algorithm (Lex), QuickLex uses an additional O(n2) space to reduce the time complexity from O(n2) to O(n·∆(P)), where n is the number of processes or threads in the computation and ∆(P) is the maximal number of incoming edges of any event. The third part introduces Loset — a new model for parallel computations with locking constraints. We show that the reachability problem in a loset is NP-complete. To tackle the NP-completeness, we present several useful properties. Specifically, if the final global state is reachable, then all lock-free feasible global states are reachable. In addition, we show that the reachability of a global state G can be determined using a sub-computation instead of the entire computation. Moreover, we introduce the strong feasibility of a global state, which is an upper approximation of reachability that can be calculated efficiently. Our experiments show that the property accurately models the reachability for all 11 benchmarks.Electrical and Computer Engineerin
Randomized Two-Process Wait-Free Test-and-Set
We present the first explicit, and currently simplest, randomized algorithm
for 2-process wait-free test-and-set. It is implemented with two 4-valued
single writer single reader atomic variables. A test-and-set takes at most 11
expected elementary steps, while a reset takes exactly 1 elementary step. Based
on a finite-state analysis, the proofs of correctness and expected length are
compressed into one table.Comment: 9 pages, 4 figures, LaTeX source; Submitte
Space Efficient Breadth-First and Level Traversals of Consistent Global States of Parallel Programs
Enumerating consistent global states of a computation is a fundamental
problem in parallel computing with applications to debug- ging, testing and
runtime verification of parallel programs. Breadth-first search (BFS)
enumeration is especially useful for these applications as it finds an
erroneous consistent global state with the least number of events possible. The
total number of executed events in a global state is called its rank. BFS also
allows enumeration of all global states of a given rank or within a range of
ranks. If a computation on n processes has m events per process on average,
then the traditional BFS (Cooper-Marzullo and its variants) requires
space in the worst case, whereas ou r
algorithm performs the BFS requires space. Thus, we
reduce the space complexity for BFS enumeration of consistent global states
exponentially. and give the first polynomial space algorithm for this task. In
our experimental evaluation of seven benchmarks, traditional BFS fails in many
cases by exhausting the 2 GB heap space allowed to the JVM. In contrast, our
implementation uses less than 60 MB memory and is also faster in many cases
Dynamic Race Prediction in Linear Time
Writing reliable concurrent software remains a huge challenge for today's
programmers. Programmers rarely reason about their code by explicitly
considering different possible inter-leavings of its execution. We consider the
problem of detecting data races from individual executions in a sound manner.
The classical approach to solving this problem has been to use Lamport's
happens-before (HB) relation. Until now HB remains the only approach that runs
in linear time. Previous efforts in improving over HB such as causally-precedes
(CP) and maximal causal models fall short due to the fact that they are not
implementable efficiently and hence have to compromise on their race detecting
ability by limiting their techniques to bounded sized fragments of the
execution. We present a new relation weak-causally-precedes (WCP) that is
provably better than CP in terms of being able to detect more races, while
still remaining sound. Moreover it admits a linear time algorithm which works
on the entire execution without having to fragment it.Comment: 22 pages, 8 figures, 1 algorithm, 1 tabl
Performance Optimizations for Software Transactional Memory
The transition from single-core processors to multi-core processors demands a change from sequential programming to concurrent programming for mainstream programmers. However, concurrent programming has long been widely recognized as being notoriously difficult. A major reason for its difficulty is that existing concurrent programming constructs provide low-level programming abstractions. Using these constructs forces programmers to consider many low level details. Locks, the dominant programming construct for mutual exclusion, suffer several well known problems, such as deadlock, priority inversion, and convoying, and are directly related to the difficulty of concurrent programming. The alternative to locks, i.e. non-blocking programming, not only is extremely error-prone, but also does not produce consistently good performance. Better programming constructs are critical to reduce the complexity of concurrent programming, increase productivity, and expose the computing power in multi-core processors. Transactional memory has emerged recently as one promising programming construct for supporting atomic operations on shared data. By eliminating the need to consider a huge number of possible interactions among concurrent transactions, Transactional memory greatly reduces the complexity of concurrent programming and vastly improves programming productivity. Software transactional memory systems implement a transactional memory abstraction in software. Unfortunately, existing designs of Software Transactional Memory systems incur significant performance overhead that could potentially prevent it from being widely used. Reducing STM's overhead will be critical for mainstream programmers to improve productivity while not suffering performance degradation. My thesis is that the performance of STM can be significantly improved by intelligently designing validation and commit protocols, by designing the time base, and by incorporating application-specific knowledge. I present four novel techniques for improving performance of STM systems to support my thesis. First, I propose a time-based STM system based on a runtime tuning strategy that is able to deliver performance equal to or better than existing strategies. Second, I present several novel commit phase designs and evaluate their performance. Then I propose a new STM programming interface extension that enables transaction optimizations using fast shared memory reads while maintaining transaction composability. Next, I present a distributed time base design that outperforms existing time base designs for certain types of STM applications. Finally, I propose a novel programming construct to support multi-place isolation. Experimental results show the techniques presented here can significantly improve the STM performance. We expect these techniques to help STM be accepted by more programmers
Transaction Processing over Geo-Partitioned Data
Databases are a fundamental component of any web service, storing and managing all the
service data. In large-scale web services, it is essential that the data storage systems used
consider techniques such as partial replication, geo-replication, and weaker consistency
models so that the expectations of these systems regarding availability and latency can
be met as best as possible.
In this dissertation, we address the problem of executing transactions on data that is
partially replicated. In this sense, we adopt the transactional causal consistency semantics,
the consistency model where a transaction accesses a causally consistent snapshot of the
database. However, implementing this consistency model in a partially replicated setting
raises several challenges regarding handling transactions that access data items replicated
in different nodes.
Our work aims to design and implement a novel algorithm for executing transactions
over geo-partitioned data with transactional causal consistency semantics. We discuss
the problems and design choices for executing transactions over partially replicated data
and present a design to implement the proposed algorithm by extending a weakly consistent
geo-replicated key-value store with partial replication, adding support for executing
transactions involving geo-partitioned data items. In this context, we also addressed the
problem of deciding the best strategy for searching data in replicas that hold only a part
of the total data of a service and where the state of each replica might diverge.
We evaluate our solution using microbenchmarks based on the TPC-H database. Our
results show that the overhead of the system is low for the expected scenario of a low
ratio of remote transactions.As bases de dados representam um componente fundamental de qualquer serviço web,
armazenando e gerindo todos os dados do serviço. Em serviços web de grande escala, é
essencial que os sistemas de armazenamento de dados utilizados considerem técnicas
como a replicação parcial, geo-replicação e modelos de consistência mais fracos, de forma
a que as expectativas dos utilizadores desses sistemas em relação à disponibilidade e
latência possam ser atendidas da melhor forma possível.
Nesta dissertação, abordamos o problema de executar transações sobre dados que
estão parcialmente replicados. Nesse sentido, adotamos uma semântica de consistência
transacional causal, o modelo de consistência em que uma transação acede a um snapshot
causalmente consistente da base de dados. No entanto, implementar este modelo de consistência
numa configuração parcialmente replicada levanta vários desafios relativamente
à execução de transações que acedem a dados replicados em nós diferentes.
O objetivo do nosso trabalho é projetar e implementar um novo algoritmo para a
execução de transações sobre dados geo-particionados com semântica de consistência
causal transacional. Discutimos os problemas e as opções de design para a execução de
transações em dados parcialmente replicados e apresentamos um design para implementar
o algoritmo proposto, estendendo um sistema de armazenamento chave-valor
geo-replicado de consistência fraca com replicação parcial, adicionando suporte para
executar transações envolvendo dados geo-particionados. Nesse contexto, também abordamos
o problema de decidir a melhor estratégia para procurar dados em réplicas que
guardam apenas uma parte total dos dados de um serviço e onde o estado de cada réplica
pode divergir.
Avaliamos a nossa solução utilizando microbenchmarks baseados na base de dados
TPC-H. Os nossos resultados mostram que a carga adicional do sistema é baixa para o
cenário esperado de uma baixa percentagem de transações remotas
- …