These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX01/From UNIX To GNU

Classnotes | UNIX01 | RecentChanges | Preferences

Showing revision 1

Pipes and Files

A pipe in computer terms is an interface layer by which the output of a given program is fed back as the input to another program. By the time UNIX was beginning to be deployed in 1971, pipes were not a new technology by any means. However, few OSes at the time were utilizing them (and even fewer were using them effectively).

Under UNIX, pipes took on a whole new functionality: They became the basis of core interaction in the system. The OS, its user interface, and its communication, were broken down into "bite-sized chunks"- many small programs which would be assembled in such a way as to make larger, more complex, functionality. Imagine "Lego-blocks" with computer OSes, and you start to get the idea.

The team adopted a set of design principles with respect to UNIX,

  1. "Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features."
  2. "Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input."
  3. "Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them."
  4. "Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them."

In addition to pipes, the UNIX developers adopted another excellent concept: The File Abstraction. File Abstraction means that all things (well, most things) in the OS are handled as though they were files. They could be read from, written to, altered, changed. Reading from a pipe was no different than reading from a file. Writing to a pipe was no different than writing to a file (okay, this isn't exactly correct, but we will assume it is for the purposes of this course). Using this abstraction otherwise complex functionality such as device interaction could be abstracted away behind a simple file-like interface.

Universities and Expansion

Out of the anti-trust lawsuit against AT&T, they were not able to legally charge much money for the UNIX operating system. As a result, AT&T practically gave UNIX away (University's could purchase unlimitted licenses to UNIX and its source code for as little as $150).

This actually helped many Universities at the time. Computer Science was still relatively new, and many Computer Science departments were struggling financially against their technology costs. Often the software for a given mainframe was as expensive as the mainframe itself. Because UNIX was written in C, and because Universities could obtain licenses allowing them access to the source of UNIX (and even allowing them to change the code), it wasn't long before many Univeristies were running custom-made UNIXes behind the scenes on their otherwise expensive hardware.

As you can imagine, having access to the source code to their OS (and being able to modify it) was often seen as a heaven-sent in the classroom. An entire generation of programmers were trained working against the UNIX source code.



Classnotes | UNIX01 | RecentChanges | Preferences
This page is read-only | View other revisions | View current revision
Edited July 12, 2003 12:14 am (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.