dupont@inria.UUCP (Francis Dupont) (08/05/87)
LOCUS provides a good solution for multiple-machine executables : conditional symbolic links. For example : /bin/cat is a conditional link to a binary for Vaxen and to an other binary for 680x0. If you are in the vax universe, you follow the Vax branch, and in the 68k universe, the 68k branch. This feature is named hidden directory in LOCUS, and is used in dual port Unix (Pyramid, Sequent, ...) implementations. You need a new field (universe) in the proc structure, some system calls (csymlink (makes a conditional symbolic link), setuniverse (sets the universe of the current process), ...). You can use conditional symbolic links for multiple-machine executables, libraries, binary data files, ... or for environments (for example, Pyramids have two universes : att (SVR2V2) and ucb (BSD 4.2/4.3)). Conditional symbolic links are very simple to implement, and are a better solution for multiple-machine executable than a new object format. But they can't save disk space ... Good references on conditional symbolic links are : The LOCUS Distributed System Architecture, by Gerald J. Popek & Bruce J. Walker. MIT Press 1985 (Chapter 6.4 : Hidden directories) OSx 3.x Release Overview, Pyramid Technology Corporation Balance Technical Summary, Dynix System V User's Guide, Sequent Computer Systems Inc. [Francis Dupont] dupont@inria.inria.fr or ..!seismo!mcvax!inria!dupont
rml@hpfcdc.HP.COM (Bob Lenk) (08/08/87)
> LOCUS provides a good solution for multiple-machine executables : > conditional symbolic links. For example : /bin/cat is a conditional link to > a binary for Vaxen and to an other binary for 680x0. > If you are in the vax universe, you follow the Vax branch, > and in the 68k universe, the 68k branch. This feature is named > hidden directory in LOCUS, and is used in dual port Unix > (Pyramid, Sequent, ...) implementations. I agree that this is a more flexible solution than huge a.outs. It's my understanding that hidden directories are a different mechanism from conditional symbolic links, though used for similar purposes. The implementation of conditional symbolic links is based on symbolic links, while hidden directories are based on directories. I have heard that LOCUS implements both, but uses them for different purposes (one to differentiate by host and the other by architecture). I don't personally know that to be true. A brief description of the hidden directory implementation is that the different copies of the file are kept in a single specially marked directory (the hidden directory). During pathname resolution (namei) the name of the hidden directory is normally resolved to the proper file based on a match between the filename and the "context" of the requesting process. In an implementation I am familiar with this mechanism has some added flexibility; the same process might be able to match any of several different executables (eg. 68010, 68020 with software floating point, 68020 with 68881, 68020 with floating point accelerator), depending on which is present. The same mechanism is used to differentiate by other characteristics than architecture, such as hostname and diskless/diskfull machines. This implementation is described in a paper "Achieving One-System View for Distributed UNIX Operating Systems" in the Jan. '87 UniForum Proceedings. Bob Lenk {ihnp4, hplabs}!hpfcla!rml