# Chapter 3. The OS-9 File System

## Introduction to the Unified Input/Output System

OS-9 has a unified input/output system in which data transfers to ALL I/O devices are performed in almost exactly the same manner, regardless of the particular hardware devices involved. It may seem that the different operational characteristics of the I/O devices might make this difficult. After all, line printers and disk drives behave much differently. However, these differences can mostly be overcome by defining a set of standardized logical functions for all devices and by making all I/O devices conform to these conventions, using software routines to eliminate hardware dependencies wherever possible. This produces a much simpler and more versatile input/output system.

OS-9's unified I/O system is based upon logical entities called “I/O paths”. Paths are analogous to “software I/O channels” which can be routed from a program to a mass-storage file, any other I/O device, or even another program. Another way to say the same thing is that paths are files, and all I/O devices behave as files.

Data transferred through paths may be processed by OS-9 to conform to the hardware requirements of the specific I/O device involved. Data transfers can be either bidirectional (read/write) or unidirectional (read only or write only), depending on the device and/or how the path was established.

Data transferred through a path is considered to be a stream of 8-bit binary bytes that have no specific type or value: what the data actually represents depends on how it is used by each program. This is important because it means that OS-9 does not require data to have any special format or meaning.

Some of the advantages of the unified I/O system are:

- Programs will operate correctly regardless of the particular I/O devices selected and used when the program is actually executed.

- Programs are highly portable from one computer to another, even when the computers have different kinds of I/O devices.

- I/O can be redirected to alternate files or devices when the program is run, without having to alter the program.

- New or special device driver routines can easily be created and installed by the user.