home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
std_unix
/
v21
/
128
< prev
next >
Wrap
Internet Message Format
|
1990-12-05
|
3KB
From std-unix-request@uunet.uu.net Tue Sep 25 10:37:08 1990
Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP
id AA00719; Tue, 25 Sep 90 10:37:08 -0400
Posted-Date: 24 Sep 90 21:30:35 GMT
Received: by cs.utexas.edu (5.64/1.76)
From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
Newsgroups: comp.std.unix
Subject: Re: Standards Update, IEEE 1003.4: Real-time Extensions
Message-Id: <540@usenix.ORG>
References: <523@usenix.ORG> <524@usenix.ORG> <528@usenix.ORG>
Sender: jsq@usenix.ORG
Organization: IR
X-Submissions: std-unix@uunet.uu.net
Date: 24 Sep 90 21:30:35 GMT
Reply-To: std-unix@uunet.uu.net
To: std-unix@uunet.uu.net
Submitted-by: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
In article <528@usenix.ORG> chip@tct.uucp (Chip Salzenberg) writes:
> According to brnstnd@kramden.acf.nyu.edu (Dan Bernstein):
> >The beauty and power of UNIX is the abstraction of files---
> >not filesystems.
> Both the filesystem and the file descriptor are powerful abstractions.
On the contrary: Given file descriptors, the filesystem is an almost
useless abstraction.
Programs fall into two main classes. Some (such as diff) take a small,
fixed number of filename arguments and treat each one specially. They
become both simpler and more flexible if they instead use file
descriptors. I'll propose multitee as an example of this.
Others (such as sed or compress) take many filenames and perform some
action on each file in turn. They also become both simpler and more
flexible if they instead take input and output from a couple of file
descriptors, perhaps with a simple protocol for indicating file
boundaries. I'll propose the new version of filterfile as a
demonstration of how this can simplify application development.
In both cases, the application need know absolutely nothing about the
filesystem. A few utilities deal with filenames---shell redirection and
cat. A few utilities do the same for network connections---authtcp and
attachport. A few utilities do the same for pipes---the shell's piping.
But beyond these two or three programs per I/O object, the filesystem
contributes *nothing* to the vast majority of applications.
There is one notable exception. Some programs depend on reliable,
static, local or virtually local storage, usually for what amounts to
interprocess communication. (login needs /etc/passwd. cron reads crontab.
And so on.) This is exactly what filesystems were designed for, and a
program that wants reliable, static, local storage is perfectly within
its rights to demand the sensible abstraction we call a filesystem.
Most applications that use input and output, though, don't care that
it's reliable or static or local. For them, the filesystem is pointless.
Many of us are convinced that open() and rename() and unlink() and so on
are an extremely poor match for unreliable or dynamic or remote I/O. We
also see the sheer uselessness of forcing all I/O into the filesystem.
You must convince us that open() makes sense for everything that might
be a file descriptor, and that it provides a real benefit for future
applications, before you destroy what we see as the beauty and power of
UNIX.
---Dan
Volume-Number: Volume 21, Number 128