sysv_vs_bsd

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: BSD & SysV
From: "Michael R. Jinks" <mjinks@uchicago.edu>
Date: Mon, 2 Oct 2000 14:06:59 -0500

On Sat, Sep 30, 2000 at 01:39:15PM +0600, Selim Jahangir
wrote:

> what is the fundamental diff between BSD and SysV unix ?

I'm not really qualified to answer this but it looked as
though nobody else has mailed the list about it so I'll have
a go.

The _fundamental_ difference is historical.  For a long time
during the 70's and 80's AT&T allowed third parties to write
their own versions of Unix, and one version that caught on
was written at the University of California at Berkeley,
hence "BSD" for Berkeley Software Distribution.  System V
was the last in-house AT&T version (which actually
incorporated a lot of features of BSD Unix and previous
AT&T-derived versions).

Both BSD and AT&T/System V Unix spawned a lot of offshoots,
and inspired a lot of imitation in Unix-like OS's which
weren't direct offshoots.  Sun's "SunOS" was a BSD offshoot
up through the 4.0 series, but at 5.0 they rewrote it
extensively, incorporated a lot of "SysV'isms", and started
calling it "Solaris".  They still make a lot of the
BSD-style commands available under their /usr/ucb directory
(ucb == "University of California, Berkeley").

AIX is a completely independent, from-scratch rewrite of a
Unix-like OS, but it usually gets classed in the System V
family because it has more in common with SysV than with
BSD.

IRIX has some AT&T code in it, but also exhibits some
BSD-style behaviors (though I'd be hard pressed to come up
with examples off the top of my head).

Linux tries to be a sensible hybrid of both systems, to the
delight of some and the frustration of others, but the real
lesson I get from it is that the BSD/SysV distinction is
really only useful in a historical context; as Linux
demonstrates, you can mix and match where appropriate.

The most obvious differences in style have to do with the
way each system handles initialization and service control
during runtime.  Under BSD, there are a few files under /etc
which list the services to run at boot time, and that's
about it; there is no such notion as a "runlevel", although
I think that BSD does have a "single user" mode for system
maintenance.

Under System V, things get a little more complex (and, in my
opinion, more elegant).  Most of the system services have
their own script (traditionally stored in /etc/init.d/ or in
RedHat under /etc/rc.d/init.d/) which controls how that
service is started and stopped.  SysV also has the notion of
runlevels, different system states which are defined by the
list of services that the system runs in each given state.
The precise behavior of each runlevel varies a lot among
systems, and can be extensively customized by the system
administrator.  (man init for the details on how it all
works.)

There are a lot of differences deeper down as well, but the
distinction starts to get a little blurry.  Most SysV-style
systems use Berkeley-style network sockets, for example.
Printing could be SysV or BSD or both.  And many common
commands will have different behaviors; an obvious example
is the "ps" command.  Historically "ps" took different
arguments and displayed completely different behavior under
BSD vs. SysV, and each camp thought their ps was the
superior implementation.  Modern Red Hat systems come with a
ps that merges the two: run "ps -[options]" and you get SysV
behavior; run "ps [options]" (no dash) and you get BSD
behavior.  Again, the manpage explains the details.

Well I had to leave this for a couple of hours, and by now
somebody has probably handled this better so I'll stop.
Hope this helps somehow.

===





the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu