Client/Server Buffer Management
Original Publication Date: 1996-Jan-01
Included in the Prior Art Database: 2005-Mar-31
Rawson III, FL: AUTHOR [+1]
Disclosed is a method to be used by an operating system for managing data buffers for data sources and sinks without imposing rigid constraints on the eventual programming interfaces exported to clients of the device drivers and other programs. This method offers an ability to deal with dynamically wired buffers using the original memory areas passed from the user program for both mapped and unmapped transfers.
Client/Server Buffer Management
a method to be used by an operating system for
managing data buffers for data sources and sinks without imposing
rigid constraints on the eventual programming interfaces exported to
clients of the device drivers and other programs. This method offers
an ability to deal with dynamically wired buffers using the original
memory areas passed from the user program for both mapped and
method, a buffer management abstraction is used by
device driver frameworks, ADDs, and other components to manage buffer
areas on which Input/Output (I/O) and similar operations are done.
These operations are initiated by a device services client program
calling an interface, passing either memory or a pointer to memory.
The system components use the buffer management abstraction to manage
and manipulate the memory that is passed by the call. The buffer
management abstraction is usable from both user space and at kernel
The Figure is
a flow diagram illustrating the lifecycle of a
buffer object, as defined by the buffer management abstraction,
allowing static or dynamic memory to be associated with a buffer
object. In a static association, the initial buffer prepare
associates memory with the buffer and writes it down. A special form
of buffer complete marks a buffer as being completely transferred
without disassociating the memory. Instead of issuing the standard
buffer prepare before subsequent transfers, the client code calls a
different interface to mark the buffer as ready for transfer without
associating memory with it. However, the memory associated with a
static buffer can still be released with an ordinary buffer complete.
At that point, the buffer prepare makes a new memory association.
For dynamic buffering, the standard buffer complete operations mark
the buffer as having been processed and available for another prepare
operation with a different memory association. The standard buffer
complete undoes the buffer prepare, unwiring the memory and releasing
any addressability established by the prepare operation.
output, or write, operations, the contents of the user
buffer are important, on input, or read, operations, they are not.
However, even for read operations, there is generally pre-existing
underlying memory. Since the virtual memory size implementation may
be optimized if it is known that the memory is going to be overlaid
by inbound data, the buffer management abstraction allows the caller
to specify the direction of the transfer. To support the use of
static buffers, the caller can specify that a buffer will be used for
transfers in either direction.
io_get_buffer_control_port call returns a send right to the
kernel buffer control port. This call, which should be made by a
device driver before allocating buffers, is required only if the code
wishing to allocate buffers is not...