82 research outputs found
Causal Consistency Verification in Restful Systems
Replicated systems cannot maintain both availability and (strong) consistency when exposed
to network partitions. Strong consistency requires every read to return the last
written value, which can lead clients to experience high latency or even timeout errors.
Replicated applications usually rely on weak consistency, since clients can perform operations
contacting a single replica, leading to decreased latency and increased availability.
Causal consistency is a weak consistency model, however, it is the strongest one for
highly available systems. Many applications are switching to this particular consistency
model, since it ensures users never observe data items before they observe the ones that
influenced their creation.
Verifying if applications satisfy the consistency they claim to provide is no easy task.
In this dissertation, we propose an algorithm to verify causal consistency in RESTful
applications. Our approach adopts a black box testing, where multiple concurrent clients
execute operations in a service and records the log of interactions. This log of interactions
is then processed to verify if the results respect causal consistency. The key challenge
is to infer causal dependencies among operations executed in different clients without
adding any additional metadata to the data maintained by the service. When considering
a particular operation, the algorithm builds a new dependency graph that considers one
of the possible justifications the operation might have, but if this justification results in
failure further ahead in the processing, it is necessary to build another graph considering
another justification of that same operation. The algorithm relies on recursion in order to
achieve this backtracking behaviour. If the algorithm is able to build a graph containing
every operation present in the log, where the chosen justifications remain valid until the
end of the processing, it outputs that the execution corresponding to that log satisfies
causal consistency. The evaluation confirms that the algorithm is able to detect violations
when feeding either small or large logs representing executions of RESTful applications
that do not satisfy causal consistency.Os sistemas replicados não podem manter a disponibilidade e a consistência (forte) quando
expostos a partições de rede. A consistência forte exige que cada leitura retorne o último
valor escrito, o que pode levar os clientes a experienciar alta latência ou até mesmo erros
de tempo limite. As aplicações replicados geralmente usam consistência fraca, pois os
clientes podem realizar operações contactando uma única réplica, levando a latências
baixas e maior disponibilidade.
A consistência causal é um modelo de consistência fraco, mas é o mais forte para
sistemas altamente disponíveis. Muitas aplicações usam este modelo, pois garante que os
clientes nunca observem dados antes de observar os que influenciaram a sua criação.
Verificar se as aplicações satisfazem a consistência que alegam fornecer não é fácil.
Nesta dissertação, propomos um algoritmo para verificar a consistência causal em aplicações
RESTful. A nossa abordagem adota um teste de caixa negra, onde vários clientes
concurrentes executam operações num serviço, onde as interações são documentadas num
ficheiro. Este ficheiro é processado para verificar se os resultados respeitam a consistência
causal. O principal desafio é inferir as dependências causais entre as operações executadas
em diferentes clientes sem adicionar metadados adicionais aos dados mantidos pelo
serviço. Ao considerar uma determinada operação, o algoritmo constrói um novo grafo
de dependências que considera uma das possíveis justificações que a operação possa
ter, mas se esta justificação resultar em erro mais tarde no processamento, é necessário
construir outro grafo considerando outra justificação dessa mesma operação. O algoritmo
é recursivo de modo a alcançar esse comportamento de retrocesso. Se o algoritmo conseguir
construir um grafo que contém todas as operações presentes no ficheiro, onde as
justificações escolhidas permanecem válidas até o final do processamento, indica que a
execução correspondente a este ficheiro satisfaz a consistência causal. Aavaliação confirma
que o algoritmo é capaz de detectar violações ao fornecer ficheiros pequenos ou grandes
representando execuções de aplicações RESTful que não satisfazem a consistência causal
Extremely fast (a,b)-trees at all contention levels
Many concurrent dictionary implementations are designed and evaluated with only low-contention workloads in mind. This thesis presents several concurrent linearizable (a,b)-tree implementations with the overarching goal of performing well on both low- and high-contention workloads, and especially update-heavy workloads. The OCC-ABtree uses optimistic concurrency control to achieve state-of-the-art low-contention performance. However, under high-contention, cache coherence traffic begins to affect its performance.
This is addressed by replacing its test-and-compare-and-swap locks with MCS queue locks. The resulting MCS-ABtree scales well under both low- and high-contention workloads. This thesis also introduces two coalescing-based trees, the CoMCS-ABtree and the CoPub-ABtree, that achieve substantially better performance under high-contention by reordering and coalescing concurrent inserts and deletes. Comparing these algorithms against the state of the art in concurrent search trees, we find that the fastest algorithm, the CoPub-ABtree, outperforms the next fastest competitor by up to 2x.
This thesis then describes persistent versions of the four trees, whose implementations use fewer sfence instructions than a leading competitor (the FPTree). The persistent trees are proved to be strictly linearizable. Experimentally, the persistent trees are only slightly slower than their volatile counterparts, suggesting that they have great use as in-memory databases that need to be able to recover after a crash
Verifikation Nicht-blockierender Datenstrukturen mit Manueller Speicherverwaltung
Verification of concurrent data structures is one of the most challenging tasks in software verification. The topic has received considerable attention over the course of the last decade. Nevertheless, human-driven techniques remain cumbersome and notoriously difficult while automated approaches suffer from limited applicability. This is particularly true in the absence of garbage collection. The intricacy of non-blocking manual memory management (manual memory reclamation) paired with the complexity of concurrent data structures has so far made automated verification prohibitive. We tackle the challenge of automated verification of non-blocking data structures which manually manage their memory. To that end, we contribute several insights that greatly simplify the verification task. The guiding theme of those simplifications are semantic reductions. We show that the verification of a data structure's complicated target semantics can be conducted in a simpler and smaller semantics which is more amenable to automatic techniques. Some of our reductions rely on good conduct properties of the data structure. The properties we use are derived from practice, for instance, by exploiting common programming patterns. Furthermore, we also show how to automatically check for those properties under the smaller semantics. The main contributions are: (i) A compositional verification approach that verifies the memory management and the data structure separately. (ii) A notion of weak ownership that applies when memory is reclaimed and reused, bridging the gap between garbage collection and manual memory management (iii) A notion of pointer races and harmful ABAs the absence of which ensures that the memory management does not influence the data structure, i.e., it behaves as if executed under garbage collection. Notably, we show that a check for pointer races and harmful ABAs only needs to consider executions where at most a single address is reused. (iv) A notion of strong pointer races the absence of which entails the absence of ordinary pointer races and harmful ABAs. We devise a highly-efficient type check for strong pointer races. After a successful type check, the actual verification can be performed under garbage collection using an off-the-shelf verifier. (v) Experimental evaluations of the aforementioned contributions. We are the first to fully automatically verify practical non-blocking data structures with manual memory management.Verifikation nebenläufiger Datenstrukturen ist eine der herausforderndsten Aufgaben der Programmverifikation. Trotz vieler Beiträge zu diesem Thema, bleiben die existierenden manuellen Techniken mühsam und kompliziert in der Anwendung. Auch automatisierte Verifikationsverfahren sind nur eingeschränkt anwendbar. Diese Schwächen sind besonders ausgeprägt, wenn sich Programme nicht auf einen Garbage-Collector verlassen. Die Komplexität manueller Speicherverwaltung gepaart mit komplexen nicht-blockierenden Datenstrukturen macht die automatisierte Programmverifikation derzeit unmöglich. Diese Arbeit betrachtet die automatisierte Verifikation nicht-blockierender Datenstrukturen, welche ihren Speicher manuell verwalten. Dazu werden Konzepte vorgestellt, die die Verifikation stark vereinfachen. Das Leitmotiv dabei ist die semantische Reduktion, welche die Verifikation in einer leichteren Semantik erlaubt, ohne die eigentliche komplexere Semantik zu betrachten. Einige dieser Reduktion beruhen auf einem Wohlverhalten des zu verifizierenden Programms. Dabei wird das Wohlverhalten mit Bezug auf praxisnahe Eigenschaften definiert, wie sie z.B. von gängigen Programmiermustern vorgegeben werden. Ferner wird gezeigt, dass die Wohlverhaltenseigenschaften ebenfalls unter der einfacheren Semantik nachgewiesen werden können. Die Hauptresultate der vorliegenden Arbeit sind die Folgenden: (i) Ein kompositioneller Verifikationsansatz, welcher Speicherverwaltung und Datenstruktur getrennt verifiziert. (ii) Ein Begriff des Weak-Ownership, welcher selbst dann Anwendung findet, wenn Speicher wiederverwendet wird. (iii) Ein Begriff des Pointer-Race und des Harmful-ABA, deren Abwesenheit garantiert, dass die Speicherverwaltung keinen Einfluss auf die Datenstruktur ausübt und somit unter der Annahme von Garbage-Collection verifiziert werden kann. Bemerkenswerterweise genügt es diese Abwesenheit unter Reallokation nur einer fixex Speicherzelle zu prüfen. (iv) Ein Begriff des Strong-Pointer-Race, dessen Abwesenheit sowohl Pointer-Races als auch Harmful-ABA ausschließt. Um ein Programm auf Strong-Pointer-Races zu prüfen, präsentieren wir ein Typsystem. Ein erfolgreicher Typcheck erlaubt die tatsächlich zu überprüfende Eigenschaft unter der Annahme eines Garbage-Collectors nachzuweisen. (v) Experimentelle Evaluationen. Die vorgestellten Techniken sind die Ersten, die nicht-blockierende Datenstrukturen mit gängigen Speicherverwaltungen vollständig automatisch verifizieren können
Recommended from our members
Replicating multithreaded services
textFor the last 40 years, the systems community has invested a lot of effort in designing techniques for building fault tolerant distributed systems and services. This effort has produced a massive list of results: the literature describes how to design replication protocols that tolerate a wide range of failures (from simple crashes to malicious "Byzantine" failures) in a wide range of settings (e.g. synchronous or asynchronous communication, with or without stable storage), optimizing various metrics (e.g. number of messages, latency, throughput). These techniques have their roots in ideas, such as the abstraction of State Machine Replication and the Paxos protocol, that were conceived when computing was very different than it is today: computers had a single core; all processing was done using a single thread of control, handling requests sequentially; and a collection of 20 nodes was considered a large distributed system. In the last decade, however, computing has gone through some major paradigm shifts, with the advent of multicore architectures and large cloud infrastructures. This dissertation explains how these profound changes impact the practical usefulness of traditional fault tolerant techniques and proposes new ways to architect these solutions to fit the new paradigms.Computer Science
EA-PHT-HPR: Designing Scalable Data Structures for Persistent Memory
Volatile memory has dominated the realm of main memory on servers and computers for a long time. In 2019, Intel released to the public the Optane data center persistent memory modules (DCPMM). These devices offer the capacity and persistence of block devices while providing the byte addressability and low latency of DRAM devices. The introduction of this technology now allows programmers to develop data structures that can remain in main memory across crashes and power failures. Implementing recoverable code is not an easy task, and adds a new degree of complexity to how we develop and prove the correctness of code.
This thesis explores the different approaches that have been taken for the development of persistent data structures, specifically for hash tables. The work presents an iterative process for the development of a persistent hash table. The proposed designs are based on a previously implemented DRAM design. We intend for the design of the hash table to remain similar to its original DRAM design while achieving high performance and scalability in persistent memory.
Through each step of the iterative process, the proposed design's weak points are identified, and the implementations are compared to current state-of-the-art persistent hash tables. The final proposed design consists of a hybrid hash table implementation that achieves up to 47% higher performance in write-heavy workloads, and up to 19% higher performance in read-only workloads in comparison to the dynamic and scalable hashing (DASH) implementation, which currently is one of the fastest hash tables for persistent memory. As well, to reduce the latency of a full table resize operation, the proposed design incorporates a new full table resize mechanism that takes advantage of parallelization
- …