12,151 research outputs found

    A Scalable, Portable, and Memory-Efficient Lock-Free FIFO Queue

    Get PDF
    We present a new lock-free multiple-producer and multiple-consumer (MPMC) FIFO queue design which is scalable and, unlike existing high-performant queues, very memory efficient. Moreover, the design is ABA safe and does not require any external memory allocators or safe memory reclamation techniques, typically needed by other scalable designs. In fact, this queue itself can be leveraged for object allocation and reclamation, as in data pools. We use FAA (fetch-and-add), a specialized and more scalable than CAS (compare-and-set) instruction, on the most contended hot spots of the algorithm. However, unlike prior attempts with FAA, our queue is both lock-free and linearizable. We propose a general approach, SCQ, for bounded queues. This approach can easily be extended to support unbounded FIFO queues which can store an arbitrary number of elements. SCQ is portable across virtually all existing architectures and flexible enough for a wide variety of uses. We measure the performance of our algorithm on the x86-64 and PowerPC architectures. Our evaluation validates that our queue has exceptional memory efficiency compared to other algorithms and its performance is often comparable to, or exceeding that of state-of-the-art scalable algorithms

    Annotated imports

    Full text link
    Presented simple extensions to scala language related to import statements: exported imports, which provide ability to reuse sequence of import clauses in composable form and default rewriters, which provide mechanism for pluggable macro-based AST transformation of overall compilation unit, activated by import of library object. Using these facilities not only allows more compact code, it prevents application programmer from producing certain type of errors too and allows to implement local language extension as libraries on top of standard compiler. Part of discussed extensions is submitted to scala language committee as pre-sip \cite{ai-presip} and can be used as first step for refining imports semantics in the future version of scala language
    • …
    corecore