Extending acid semantics to the file system via ptrace

  • Authors:
  • Erez Zadok;Charles Philip Wright

  • Affiliations:
  • State University of New York at Stony Brook;State University of New York at Stony Brook

  • Venue:
  • Extending acid semantics to the file system via ptrace
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

An organization's data is often its most valuable asset, but today's file systems provide few facilities to ensure its safety. Databases, on the other hand, have long provided safety mechanisms in the form of transactions. Transactions are useful because they provide atomicity, consistency, isolation, and durability (ACID). Although many applications could make use of these semantics, databases have a wide variety of non-standard interfaces. As a result, applications currently perform elaborate error handling by themselves to ensure atomicity and consistency, because it is easier than using a DBMS. A transaction-oriented programming model eliminates such complex error-handling code, because failed operations can simply be aborted without side effects. We have designed a file system that exports ACID transactions to user-level applications, while preserving the ubiquitous and convenient POSIX file-system interface, In our prototype ACID file system, called Amino, updated applications can group arbitrary sequences of system calls within a transaction. Unmodified applications operate without any changes, but each system call is protected by a transaction. Amino stores all of its meta-data and data in Berkeley DB, a user-level open-source embedded database. Berkeley DB provides an easy-to-use record-management API, an efficient B-tree access manager, caching, and ACID transactions. We developed Amino entirely in user space by intercepting system calls using the standard ptrace API, because developing Amino in the kernel would have required complex kernel changes. For example, the kernel's file system interfaces are intertwined with caches, thus preventing a DBMS from providing proper locking to ensure isolation. Additionally, user-level development proceeds more quickly than kernel development because more debugging- and development tools are available. We show that our ptrace monitor can be used to develop a variety of user-level file systems with less complexity than other user-level file system approaches. Our performance evaluation shows that for general purpose benchmarks Amino has acceptable overheads (22.6--84.7%), and in some cases even exceeds the performance of Ext3.