Browse Prior Art Database

Portable, Thread-safe, High Performance I/O Handler with Reliable Posting Mechanism

IP.com Disclosure Number: IPCOM000188471D
Original Publication Date: 2009-Oct-09
Included in the Prior Art Database: 2009-Oct-09
Document File: 2 page(s) / 40K

Publishing Venue

IBM

Abstract

The disclosure describes a blocking multiplexed I/O handler with a reliable posting mechanism that is portable on Windows and UNIX platforms.

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 54% of the total text.

Page 1 of 2

Portable, Thread-safe, High Performance I/O Handler with Reliable Posting Mechanism

Disclosed is an I/O handling mechanism that provides blocking, multiplexed I/O notification services plus reliable posting services. This handler is portable between Windows and UNIX operating systems. The three essential features of this mechanism are:

If there is no I/O activity detected and if there are no posts pending, the process/thread

1.

remains in a blocked state and consumes no CPU cycles.

If a post is sent to the blocked process/thread, it is unblocked immediately. If the

2.

process/thread is not blocked when the post arrives, the process/thread will be unblocked

immediately when it enters a blocked state. This behaviour guarantees that posts cannot be missed.

The interface is common between Windows and UNIX operating systems. The behaviour of

the handler is consistent across these platforms.

The novelty of this disclosure is that no such I/O handler exists with all three features listed above. These three features are critical for a cross platform, high performance software program that requires a I/O handler that can be reliably posted.

To implement this handler on Windows, the completion port is used. The completion port

provides the mechanism to block a thread until I/O activity is detected. The completion port also

provides the posting mechanism to facilitate the reliable post feature.

To implement this handler on UNIX platforms, the

provides the basic I/O multiplexing facilities plus the ability to block a process indefinitely if no

I/O activity is detected. To implement the reliable post feature, a three part signal queuing mechanism is added to the

call:

a socket pair to queue up post events

a signal handler to enqueue a post event to the socket pair

a consumer routine to read out all post events from the socket pair

The first part of the signal queuing mechanism is the socket pair (Figure 1).

socket pair is used for inter process communicat...