Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    libshbuf 0.0.3

    Download button

    No screenshots available
    Downloads: 334  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Lennart Poettering | More programs
    LGPL / FREE
    December 9th, 2005, 23:28 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    libshbuf description

    libshbuf introduces a new IPC concept: the "shared buffer", a more flexible and faster alternative for standard Unix FIFOs.

    libshbuf introduces a new IPC concept: the "shared buffer", a more flexible and faster alternative for standard Unix FIFOs.

    Take some shared memory, flavour it with semaphore-based locking and change notifications, and refine it with an easy-to-use API and you get libshbuf's "shared buffers".

    Here are some key features of "libshbuf":

    · Normally better latency and throughput
    · Full access to the buffer at any time
    · Connecting processes need not to be children of each other
    · Arbitrary buffer lengths
    · Memory mapped
    · Backlog

    The implementation is based on SysV shared memory, semaphores and message queues. It makes use of POSIX pthreads.

    Both an easy understandable C library and a basic Python module are provided.

    Version 0.0.3 is stable and feature complete.

    The concept of "shared buffers" is explicitly designed for high thoughput, low latency streaming of data (e.g. audio) between two processes, where a Unix FIFO is not enough. Thus it is optimized for exactly two connecting peers, a minimum of locking and minimum of copying of memory.

    For each shared buffer two shared memory blocks, a semaphore and a messages queue are created. The first shared memory block (aka "control memory block") contains some watermark information about the shared buffer. The second contains the buffer itself.

    The semaphore is used for locking access to the control block. The message queue is used for signalling the other side on changes of the buffer.

    A shared buffer provider is a process which creates it with with shbuf_create(). A new key for it will be registered (the key is an integer value, the key_t of the control shm). A shared buffer client is the other side of the buffer: it opens an existing buffer with shbuf_open(key).

    Only one client and one provider may be connected at once. When using the notifying feature of libshbuf a background thread is started, which listens on the message queue for certain messages. It forwards these messages to a classic FIFO. The main program may listen on this FIFO with a standard select() or poll().

    Product's homepage

      


    TAGS:

    shared buffer | buffer library | FIFOs alternative | libshbuf | shared | buffer

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM