Solaris: Environment or Operating System?

By Amos Gouaux, Jove System Administrator (amos@unt.edu)

Back in January we upgraded Jove from a Solbourne 700 running a variation of SunOS 4.1.2 to a Sun SPARCserver 1000 running Solaris 2.4. The new operating system, Solaris 2.4, represents a radical departure to what we have been using in the past. So why the change? What's different? What's in store for the future?

OS or Environment?

First, a little clarification on names. SunSoft, a branch of Sun Microsystems Computer Corp. (SMCC), names their UNIX operating system SunOS. The Solaris operating environment includes SunOS, the OpenWindows windowing environment, the DeskSet tools, and the AnswerBook online documentation. Solaris 1.x contained SunOS 4.1.x, while Solaris 2.x contains SunOS 5.x. Typically, when folks say Solaris, they mean the Solaris 2.x/SunOS 5.x environment; and when they say SunOS, they mean the Solaris 1.x/SunOS 4.1.x environment.

Background

A brief digression might be helpful before discussing why Sun changed their operating system. Instead of wandering through the long, though interesting, history of how UNIX became what it is today, I'll summarize by saying that two major schools developed. One camp was on the east coast at AT&T Bell Labs, the other was on the west coast at the University of California at Berkeley (UCB). Beginning in the early 1970s at AT&T, and then shortly thereafter at UCB, both sides developed their own version of UNIX, borrowing pieces from one another. The version of UNIX from AT&T eventually became known as System V. UCB developed a UNIX kernel that was packaged as the Berkeley Software Distribution (BSD). AT&T worked to make UNIX a commercial success, stressing the need to create open systems through the use of standards bodies, while UCB produced much of the innovation.

Early on, Sun based their UNIX on BSD. While developing SunOS 4.1.0, Sun and AT&T worked together to develop System V Release 4.0 (SVR4). Out of this venture, Sun gained such features as STREAMS and shared memory while AT&T gained NFS and XView. SunOS 4.1.0 also included some of the SVR4 commands and libraries, locating them in /usr/5bin, /usr /5include, and /usr/5lib.

Sun recognized the need to improve portability across various UNIX platforms. Several other vendors, most notably IBM, HP, and SGI, had already adopted the System V specification. With this momentum, when these vendors got together to work on developing a common UNIX standard, it seemed natural to use System V as the basis for this standard. The document that was produced by this effort was informally known as Spec 1170.

Today, X/Open Co. Ltd. owns the UNIX trademark, acquiring it from Novell, who acquired it from AT&T's UNIX System Laboratories (USL). X/Open incorporated Spec 1170 into their definition of UNIX. Now, a vendor must be certified as being compliant with these standards before X/Open will grant their use of the UNIX trademark. Solaris 2.4 compiles with X/Open as well as POSIX 1003.1, POSIX 1003.2, and X11R5.

So, by adopting the System V standard, Sun brought their operating system into greater compliance with the UNIX market. However, Sun did not merely port SVR4 to the SPARC architecture. They enhanced SVR4 by adding a full symmetric multiprocessing and multithreaded kernel, along with a scheduler that supports three run-time classes, including a real-time class. With threads, it is now possible to achieve a form of parallelism on machines with more than one processor.

Differences

Okay, so what all is different from SunOS 4.1.x and SunOS 5.x (remember, SunOS 5.x is contained in Solaris 2.x)? Well, basically SunOS 4.1.x was BSD with a little bit of SVR4 thrown in. Now, with SunOS 5.x it's just the opposite: SVR4 with a little bit of BSD thrown in. Remnants of the old BSD system can now be found in /usr/ucb, /usr/ucbinclude, and /usr/ucblib.

The Table on page 16, shows some of the differences in the most commonly used commands. The commands under the New column are located in /usr/bin and represent the SVR4 commands. The commands shown under the Compatibility column represent the pieces of the BSD compatibility package. And the commands under the Old column are the ones used in SunOS 4.1.x.

There is also a utility on Jove called whatnow. This is a package written at Sun that can be used to help track down differences in the new system. An example of its usage would be: % whatnow ps

The whatnow(8) man page goes into all the details of this command.

Those wanting to use the BSD style commands may be tempted to put /usr/ucb first in their command path. However, this is not recommended. Putting /usr/ucb first in your path will cause problems when trying to compile programs. Furthermore, not all the commands in /usr/ucb are exactly as they were under SunOS 4.1.x. A better solution would be to make aliases for specific commands in /usr/ucb that you would prefer to use. Below are two examples.
alias ls /usr/ucb/ls
alias du /usr/ucb/du
To preserve these aliases between logins, place the above commands in your .tcshrc or .cshrc, depending on the shell you are using.

Sun also provides a Binary Compatibility Package which provides the ability to run executables on a SunOS 5.x machine that were compiled on a SunOS 4.1.x machine, provided they are well behaved. According to Sun, an application is well behaved if it adheres to the following criteria. ( Solaris Porting Guide, p.13)

Those attempting to compile BSD C code on Jove and other ACS systems can try using the command ucbcc. This is simply a wrapper that makes certain to use the BSD header files and libraries. While this can save time in getting an application up and running, ultimately the better approach would be to port the code to use the SVR4/ POSIX routines. Doing so will ensure the greatest portability in the future.

Future Plans

Speaking of the future, what is in store for future releases of Solaris? As it turns out, Solaris 2.5 is expected to be released at the beginning of 1996. The most noticeable feature to appear will be the Common DeskTop Environment (CDE). CDE is based on the Motif mwm window manager with features borrowed from HP/VUE and DeskSet tools from a variety of vendors. CDE provides a virtual desktop using the concept of rooms, each containing its own display layout or desktop. It's hoped that CDE will provide a consistent windowing interface across platforms. Solaris 2.5 will also support Access Control Lists (ACLs). ACLs provide greater flexibility with file permissions. It will be possible to grant access to specific users, instead of just groups or everyone on the system. There will also be support for the new UltraSPARC 64 bit processor. And, due to popular demand, additional BSD commands and system calls will be restored. We will write more on Solaris 2.5 as it becomes available.

Bibliography

Solaris Porting Guide, Michele Ann Goodman, Manoj Goyal, Robert A. Massouai 1993, SunSoft Press

UNIX Review "Single UNIX Specification", p. 41, Mark Funkenhauser (June 1995, Vol. 13, No. 7).


The Table
(numbers in parenthesis are footnotes-not part of syntax)
New                           Compatibility                     Old

ps -ef                        /usr/ucb/ps -aux                   ps -aux
du -k                         /usr/ucb/du                        du
ls -ls(1)                     /usr/ucb/ls -lsg                           ls -lsg
lp -d prt(2)                  lpr -Pprt                         lpr -Pprt
lpstate -o prt                lpc -Pprt                         lpc -P prt
mailx(3)                      /usr/ucb/mail, Mail          /usr/ucb/mail, Mail  
cpio -H bar(4)                 -                            bar

(1)Sizes shown in the first column are in 1/2 KByte blocks, not Bytes as previously.
(2)On the ACS UNIX servers, it is not necessary to specify the printer on the command line if a default printer has been defined using the 'printer' command at any time since getting an account.
(3)Not to be confused with the mail alias, which calls Pine, 
that is defined globally on the ACS UNIX servers, which still run Pine.
(4)cpio -H bar can only be used to read bar format media 



If you have problems or questions about this server, please contact us as soon as possible. You can send mail to the following address:

WWW@unt.edu