A Redesign of Application-Level Stream I/O

Orran Krieger, Michael Stumm, Ron Unrau · 1994

March 1994 he success of the Unix operating system is partly attributable to the design of its input/output facility. The primary Unix I/O abstraction is a sequential byte stream provided by an interface of system calls: open, read, write, seek, close, and ioctl. The I/O facility is simple and versatile and can be uniformly applied to a variety of I/O services, including disk files, terminals, pipes, networking interfaces, and other low-level devices. ’ Nevertheless, application programs running under Unix typically do not use the Unix I/O system calls directly. Instead, they use higher level facilities implemented either by the programming language or its application-level libraries for example, the stdio library for C or the iostream library for C++. I/O facilities at the application level offer several advantages. The interfaces can be made to match the programming-language syntax and semantics, and they can provide functionality not available at the system level. They increase application portability because the I/O facility can be ported to run under other operating systems. Application-level I/O facilities can also significantly improve application performance, primarily by buffering the input and output to translate multiple fine-grained application-level I/O operations into individual coarser grained system-level operations. For example, if an application inputs one character at a time, each can be serviced from an application-level buffer without a system call; a system-level read must be issued only when the buffer is empty. The interface and implementation of most application-level I/O facilities have changed little since the late 197Os.* However, the computing substrate the computer architecture, hardware technology, and operating system has changed substantially in the past 10 to 20 years, and we contend that application performance can be significantly improved by adapting both the implementation and interfaces of application-level I/O facilities to this change. This article introduces an application-level I/O facility. the Allot Stream Facility, that addresses three primary goals. First, ASF addresses recent computing substrate changes to improve performance, allowing applications to benefit from specific features such as mapped files. Second, it is designed for parallel systems, maximizing concurrency and reporting errors properly. Finally, its modular and object-oriented structure allows it to support a variety of popular I/O interfaces (including stdio and C++ stream I/O) and to be tuned to system behavior, exploiting a system’s strengths while avoiding its weaknesses. On a number of standard Unix systems, I/O-intensive applications perform substantially better when linked to our facility in the best case, up to twice as good.

Read the paper · More papers on PaperTik