Browse Prior Art Database

Efficient Algorithm to Share Common Buffer Resource in I/O Device Driver

IP.com Disclosure Number: IPCOM000149778D
Original Publication Date: 2007-Apr-05
Included in the Prior Art Database: 2007-Apr-05
Document File: 2 page(s) / 31K

Publishing Venue

IBM

Abstract

This algorithm provides an efficient way to share common pool of buffers among multiple devices and use a single buffer assigned to each device to avoid issues in buffer starvation situation which affect device driver's performance.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 56% of the total text.

Page 1 of 2

Efficient Algorithm to Share Common Buffer Resource in I /O Device Driver

Disclosed is an algorithm used in a device driver which needs to manage the resource shared by multiple devices.

Following diagram shows the design of the invention:

The algorithm works as:


When device driver receives requests from upper layer, it determines which device the request is made for:

a. When device driver receives requests from upper layer, if there are free buffers, device driver will copy the request to the pre-allocated buffers, and invoke the start I/O routine to send the I/O buffers to the device or the layer underneath.

Also if there are any previously saved requests in the device's linked list to be processed, then device driver will combine both the new request and the saved request together and send them to the device or the layer below.

b. If the pre-allocated buffers are used out:
b1. Device driver will use the single buffer assigned to this device, and copy the

request to this buffer and invoke the start I/O routine to send I/O buffer to the device or the layer below.
b2. If both global pool of free buffers and the single buffer assigned to this device are used out, the device driver then saves the original request in the linked list associated with this device, and wait for either iodone is invoked or a new request for the same device arrives.

c. Wh...