The UNIX file system has, implicit in it, a class hierarchy. Consider the
following "types" of files:
- dks... (man 7 dks and man 7 intro under IRIX) or dsk...
(man 7 intro under HP-UX) -- the entry in /dev for a raw disk file
- mem and kmem (man 7 mem under must about any UNIX system) -- the entry
in /dev for access to main memory (mem is your virtual address space, kmem
is the system's address space).
- any conventional open disk file
- a unix directory
- tty (man 7 tty under just about any UNIX system) -- the keyboard and
display of the current process.
a) Study these resources and construct an approximate class hierarchy for these
UNIX resources. The root of this hierarchy is, of course, the abstract type
file.
b) Study these resources and construct an approximate implementation hierarchy
for these UNIX resources. That is, which of these classes are implemented
in terms of instances of others in the above list of classes.