*BSD News Article 7746


Return to BSD News archive

Xref: sserve comp.unix.solaris:490 comp.unix.bsd:7796
Path: sserve!manuel.anu.edu.au!munnari.oz.au!network.ucsd.edu!ucselx!biosci!agate!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!auspex-gw!guy
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.solaris,comp.unix.bsd
Subject: Re: Solaris 1.1 vs. Solaris 2.0 (BSD vs AT&T)
Message-ID: <15433@auspex-gw.auspex.com>
Date: 11 Nov 92 20:07:15 GMT
References: <kzin.721442926@cc.gatech.edu>
Sender: news@auspex-gw.auspex.com
Followup-To: comp.unix.solaris
Organization: Auspex Systems, Santa Clara
Lines: 82
Nntp-Posting-Host: auspex.auspex.com

>     I'm getting ready to buy a workstation..and I'm basically looking
>at a used SS2, a new IPX, or a new SparcClassic.  The advantage of the
>first two, is that they run SunOS 4... unfortunately, the Classic only
>runs Solaris 2.  The reason I feel this is unfortunate, is that I very
>much prefer the BSD programming model.

Please define "the BSD programming model".

> I mean.. if I have a program that uses bsd kernel calls (ioctl and fcntl
> type things),

"ioctl()" and "fcntl()" are both AT&T inventions; presumably you're
referring to *particular* "ioctl()" and "fcntl()" calls?

> will it compile under Solaris 2.0? or will I have to re-write it around
> the AT&T type programming model?

It depends on the "ioctl()" and "fcntl()" calls you're making.

SVR4 picked up the SunOS "ttcompat" STREAMS module, which means that if
it's been pushed onto the stream for a tty (which it should be, in
SVR4), both the traditional V7/BSD terminal "ioctl"s, and the new-style
SV "ioctl"s, should work.  (Note, BTW, that 4.3-reno and later BSD
releases have tty "ioctl"s that look a lot more like SV's than like
those of older BSD's....)

Most "fcntl()" calls came from System III, originally, so the ones that
BSD picked up from there should work mostly the same.  The ones to turn
non-blocking I/O are different (Berkeley screwed up when they picked
those up; they made them work differently - although POSIX 1003.1 says,
as I remember, "don't do that", so later BSD's will have more
S3/SV-style versions of those), and the ones to do "asynchronous I/O"
(i.e., SIGIO) don't exist in SVR4.  They may have been added to Solaris
2.0, though.

>Does Solaris have BSD Sockets of both the Unix and Internet types?

At least according to my copy of "UNIX(R) System V Release 4
Programmer's Guide: Networking Interfaces", SVR4 has socket support for
UNIX-domain and Internet sockets.  It also claims to support the
"ioctl"s mentioned in the SunOS SOCKIO(4) manual page, although it
doesn't mention all the other socket "ioctl"s.

>I imagine since it's AT&T it will have shared memory.

SVR4 has both traditional SV-style shared memory *and* "mmap()" - but
then, so does SunOS 4.x.

>Does it have the "dump" utility?

SVR4 has "ufsdump" for the BSD file system; they renamed it from "dump".

>Are the utilities mostly AT&T, or does it preserve the BSD like
>utilities of SunOS?

Many of the SunOS utilities are actually the result of merging the SV
and BSD versions.  To which particular utilities are you referring?

>(ie. if
>I want a version of ps that has bsd options instead of at&t options,
>can I get one that will run on solaris 2.0?)

Yes.  Take a look at "/usr/ucb/ps":

  Sun Microsystems Inc.   SunOS 5.0       fcs     June 1992
  sloth% /usr/ucb/ps ax
     PID  PPID TT       S  TIME SIZE  RSS COMMAND
       0     0 ?        T  0:08 sched
       1     0 ?        S  7:14 /etc/init -
       2     0 ?        S  0:00 pageout
       3     0 ?        S 312:59 fsflush
     210     1 ?        S  0:43 /usr/lib/saf/sac -t 300

	...

A bit broken (the "SIZE" and "RSS" column headings don't belong there),
and the "TT" column is wider, but very similar to the BSD one.
			  
>(also, in that last question, can I get a copy of dump that runs on
>solaris 2.0?)

See above.