6.033: Computer System 
Engineering

6.033: Computer System Engineering - Spring 2001

------------

Program Interaction under UNIX and PC Operating Systems

Nathan Ickes

Pipes and filters provide a simple, but powerful and flexible means of inter-program communication under UNIX. Despite its utility, however, the concept of pipes and filters (and, indeed, of any inter-process communication mechanism) was missing from early PC operating systems. There were two reasons for the omission: early PCs had far less processing power than mainframes running UNIX, and PC users had different reasons for using a computer than did UNIX users--and therefore different needs from the operating system.

Inter-program communication was enabled by the multitasking capability of UNIX. The ability to run multiple programs simultaneously was a central requirement in UNIX, because the computers at that time were expensive resources and had to be shared. Adding inter-program communication via pipes was relatively simple, because the pipe and filter model is a natural extension of the elegant UNIX file system.

In contrast, the limited computational power of early PCs made it difficult to justify the large overhead of a multitasking operating system, since there was seldom enough power to run multiple programs simultaneously. Because programs ran one at a time, inter-program communication was impossible.

The features of an operating system should be adapted to the requirements of the user, as well as the limitations of the hardware. UNIX was designed for use by researchers and programmers. Researchers use computers to manipulate data, and programmers use computers to manipulate programs. Therefore, the concept of filter programs--programs which read data from a file, manipulate it, and write the results to another file--was an intuitive abstraction for the anticipated types of programs that would be run on UNIX machines. The pipe and filter model allows complex operations to be broken up into simple pieces, resulting in hard modularity between filter programs and encouraging code reuse.

Personal computers were designed for an entirely different set of users. PC users expected PCs to simplify their lives immediately. They did not want to learn how to use an editor, a text formatter, and a printer driver, and then also learn how to make them work together; instead they would rather learn a single program--a word processor--that combined all of those tasks. As a result, PC operating systems were oriented around programs, rather than files. Each program performed a complete task, and file formats were frequently proprietary. Inter-program communication was unnecessary, because there was no need for programs to share data.

Today, modern PC operating systems are fast adopting features, such as inter-program communication, that were available in UNIX from the beginning. This is a testament not to the fact that early PC operating systems were poorly designed, but rather that PC hardware and the needs of PC users have changed. The performance gap between PCs and UNIX workstations is narrowing, and the PC average user now uses many different programs, and expects them to work together. What were once features appropriate only for complex, expensive mainframe operating systems are now essential components of the PC operating systems used by everyone.