Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chmod(1)

context(5)

find(1)

getcdf(3C)

getcontext(2)

getcontext(1)

ls(1)

pwd(1)

makecdf(1M)

showcdf(1)

tar(1)

CDF(4)  —  HP-UX

Series 300 Diskless Only

NAME

cdf − context dependent files

DESCRIPTION

A context dependent file (CDF) consists of several files grouped under the same path name.  The system ordinarily selects one of the files using the context of the process (see context(5)). This mechanism allows machine dependent executable, system data and device files to work correctly from all nodes in a cluster while using the same path name.

A CDF is implemented as a special kind of directory, marked by a bit in its mode (see chmod(2)). The name of the CDF is the name of the directory; the contents of the directory are files with names that are expected to match one part of a process context.  When such a directory is encountered during a path name search, the names of the files in the directory are compared with each string in the process’s context, in the order in which the strings appear in the context.  The first match is taken to be the desired file.  The name of the directory thus refers to one of the files within it, and the directory itself is normally invisible to the user.  Hence, the directory is called a hidden directory.

When a process with a context that does not match any file names in the hidden directory attempts to access a file by the path name of the hidden directory, the reference is unresolved; no file with that path name appears to exist.  When such a process attempts to create a file with the path name of the hidden directory, it creates within the hidden directory a file whose name is the cnode name from the process’s context. 

A hidden directory itself can be accessed explicitly, overriding the normal selection according to context, by appending the character ’+’ to the directory’s file name. 

EXAMPLES

Consider a cluster with three versions of /etc/inittab: one for cnode “william”, one for cnode “david” and a common file for the rest of the cnodes.  The contents of the hidden directory /etc/inittab, as shown by the command:

ls -l /etc/inittab+

would then be:

-rwxr-xr-x 1 root other 1416 Mar  7 10:08 david
-rwxr-xr-x 1 root other 1211 Apr 12 11:16 default
-rwxr-xr-x 1 root other 1037 Apr  3 12:04 william

The file names “william” and “david” will match the cnode name in the context of all processes on those cnodes.  The file named “default” matches all contexts if no other file in the hidden directory matches, and thus matches the contexts of all processes on other cnodes.  While a “default” file may appear in a hidden directory, it is not necessary to have one.  If it did not exist in this case, nodes other than “william” and “david” would not see any file named /etc/inittab. 

If a user on the cnode “william” wants to find the difference between the local cnode’s /etc/inittab and the default version, any of the commands:

diff /etc/inittab /etc/inittab+/default

diff /etc/inittab+/william /etc/inittab+/default

or

cd /etc/inittab+ ; diff william default

will refer to the appropriate files. 

A directory is changed to a hidden directory using chmod(1). In the above example, if /etc/inittab were an ordinary directory,

chmod +H /etc/inittab

would be used to make it a hidden directory.  Invoking:

chmod −H /etc/inittab+

would make /etc/inittab appear as a regular directory.  Note that the ’+’ must appear so that the mode will be changed for the hidden directory itself. 

A hidden directory may contain files of any type, including other CDFs.  Such use of nested CDFs is preferable to relying on the order of items in the context for selecting files from a single hidden directory.  For example, in a cluster of HP9000 Series 300 workstations some of the workstations might have HP98248A floating point accelerators, and one of those, with a cnode name of “color”, might have a different graphics display.  If /usr/local/bin/graphicsprog is a floating point intensive application that uses the local graphics display, it might be useful to have three versions built for the appropriate hardware configurations.  The arrangement of the three versions, as shown by the command:

ls -lRH /usr/local/bin/graphicsprog+

might then be:

total 202





dr-sr-xr-x 2 bin bin 1024 Feb 26 17:34 HP98248A+
-r-xr-xr-x 1 bin bin 101144 Feb 26 17:31 default







graphicsprog+/HP98248A+:





total 414





-r-xr-xr-x 1 bin bin 105112 Feb 26 17:34 color
-r-xr-xr-x 1 bin bin 103732 Feb 26 17:40 default

AUTHOR

Cdf was developed by HP. 

SEE ALSO

chmod(2), chmod(1), context(5), find(1), getcdf(3C), getcontext(2), getcontext(1), ls(1), pwd(1), makecdf(1M), showcdf(1), tar(1). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026