mirage/shared-block-ring

Name: shared-block-ring

Owner: MirageOS

Description: A simple on-disk fixed length queue

Created: 2013-12-02 13:43:40.0

Updated: 2016-11-04 22:09:14.0

Pushed: 2017-06-17 23:11:28.0

Homepage: null

Size: 288

Language: OCaml

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

shared-block-ring

Build Status Coverage Status

A simple on-disk fixed length queue in the style of the Xen shared-memory-ring. In particular the producer and consumer APIs allow clients to control exactly when data is exposed to the consumer and removed from the queue.

Example usage

First create a “block device”– any file will do:

f=/dev/zero of=test.raw bs=10240 count=1

Then initialise the ring in the file:

in.native create

Then start two shells, in one run:

in.native produce

and in the other

in.native consume

The producer takes input from stdin and puts it onto the ring, and the consumer takes entries from the ring and prints them to stdout.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.