I'm searching for some detailed resources about the differences of System V and BSD concepts.
For example:
- Interprocess Communication
- Sockets vs TLI
- …
Some sort of pro/cons discussion with historical background would be really nice.
Any ideas?
bsdhistorysystem-v
I'm searching for some detailed resources about the differences of System V and BSD concepts.
For example:
Some sort of pro/cons discussion with historical background would be really nice.
Any ideas?
It is very tempting to want to define the differences between BSD and Linux. Just like Gilles said in the comments, it is not an easy task since they're so numerous and disparate. Very often, the differences won't even be noticeable at the user's level; everything has been worked out so that the OS behaves as you would expect a Unix to.
Moreover multiple distributions are available for each. No matter what you say about Linux/BSD generally, you'll often find a distribution that contradicts it.
The following is a list of comparisons I found scattered over the web.
Big differences are (in my opinion of course):
- Userland (Linux uses GNU while BSD uses BSD)
- Integration (Linux is a collection of different efforts, BSD is much more unified at the core)
- Packaging (Linux typically manages installed software in binary packages - BSD typically manages a "ports" tree that you use to build software from sources)
Notice the word typically in his last point. Some Linux distributions will manage source code and conversely some BSDs will manage binary packages.
BSD is what you get when a bunch of Unix hackers sit down to try to port a Unix system to the PC. Linux is what you get when a bunch of PC hackers sit down and try to write a Unix system for the PC.
--
BSD is designed. Linux is grown. Perhaps that's the only succinct way to describe it, and possibly the most correct.
Key differences:
- FreeBSD full os. Linux is kernel. Linux distribution is os (100+ majro disrtos).
- FreeBSD everything comes from a single source. Linux is like mix of lot of stuff.
- BSD License vs GPL
- FreeBSD Installer
- BSD commands (ls file -l will not work) vs GPL command (ls file -l will work)
- FreeBSD better and updated man pages.
- BSD rc.d style booting vs Linux SysV style init.d booting
Here are some articles describing the history of each:
Written by Dave Tyson, this article describes the history of many Unix variants (including of course BSD and Linux).
Scott Barman describes how both operating systems came to be and how it forged his opinion:
I will give one "solid" opinion: If I had to choose one system that would act as my router, DNS, ftp server, e-mail gateway, firewall, web server, proxy server, etc., that system would run a BSD-based operating system. If I had to choose one system that would act as my desktop workstation, run X, all the application I like, etc., that system would run Linux. HOWEVER, I would have no problem running Linux as my work horse server or running the BSD-based system on my desktop.
Further reading
I don't think I will provide you and everyone with the perfect answer, however, using a BSD system everyday for work, I am sure I can give you a useful insight in the BSD world. I didn't ever use NetBSD, I won't talk a lot about it.
Do they use the same kernel?
No, although there are similarities due to the historic forks. Each project evolved separately.
Do they use the same userland tools? (what are the differences, if any?)
They all follow POSIX. You can expect a set of tools to have the same functionality between *BSD. It's also common to see some obvious differences in process/network management tools within the BSDs.
Do they use the same package/source management system?
They provide a packaging system, different for each OS.
Do they use the same default shell?
No, for example FreeBSD uses csh, OpenBSD uses ksh.
Are binaries portable between them?
No:
(XXXX@freebsd-6 101)file `which ls`
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.5, dynamically linked (uses shared libs), stripped
They don't really support stable and fast binary emulation. Don't rely on it.
Are sources portable between them?
Some yes, as long as you don't use kernel code or libc code (which is tied up tightly to the OS) for example.
Do they use different directory trees?
No, they are very similar to Linux here. However FreeBSD advocates the use of /usr/local/etc for third party software's configuration files. OpenBSD puts all in /etc... They put all third party in /usr/local, whereas Linux distribution will do as they see fit. In general you can say that *BSD are very conservative about that, things belongs where they belongs, and that's not something to make up.
How big are their respective communities? Are they the same order of magnitude?
FreeBSD's is the largest and most active, you can reach it through a lot of different forums, mailing lists, IRC channels and such... OpenBSD has a good community but mostly visible through IRC and mailing lists.
Actually if you think you need a good community, FreeBSD is the way to go. NetBSD and OpenBSD communities are centered around development, talk about new improvements etc. They don't really like to do basic user-support or advertising. They expect everyone to be advanced unix users and able to read the documentation before asking anything.
How much of the current development is common?
Due to really free licenses code can flow among the projects, OpenBSD often patches their code following NetBSD (as their sources have a lot in common), FreeBSD takes and integrates OpenBSD's Packet Filter, etc. It's obviously harder when it comes to drivers and others kernel things.
What are the main incompatibilities between them?
They are not compatible in a binary form, but they are mostly compatible in syntax and code. You can rely on that to achieve portability in your code. It will build or/and execute easily on all flavors of BSD, except if your going too close to the kernel (ifconfig, pfctl...).
Here's how you can enjoy learning from the BSD world:
Try to replace your home router with an openbsd box, play with pf and the network. You will see how easy it is to make what you want. It's clean, reliable and secure. Use a FreeBSD as a desktop, they support a lot of GPUs, you can use flash to some extent, there's some compatibility with Linux binaries. You can safely build your custom kernel (actually this is recommended). It's overall a good learning experience. Try NetBSD on very old hardware or even toasters.
Although they are different, each of them tries to be a good OS, and it will match users more than situations. As a learning experience, try them all (Net/Open/Free), but later you might find yourself using only 1 for most situations (since you're more knowledgeable in a specific system or fit in more with the community).
The other BSDs are hybrids or just slightly modified versions, I find it better to stay close to the source of the software development (use packet filter on OpenBSD, configure yourself your desktop on FreeBSD, ...).
As a personal note, I'm happy to see an enthusiast like you, and I hope you will find a lot of good things in the BSD world. BSD is not about hating windows or other OSs, it's about liking Unix.
Best Answer
This is mostly a historic matter, for a number of reasons:
Over the years, the System V based Unices have gotten a lot of BSD in them, and the BSDs have — to a lesser extent — adopted some System V features.
A lot of the differences simply don't matter any more, like XTI/TLI, having been beaten out in the market of ideas by BSD sockets.
The Unix market is consolidating. There are fewer weird nonstandard differences to deal with these days, and better tools for dealing with the ones that remain. One big area of difference is in how dynamic linkage works, for instance, but we have GNU libtool to deal with it now.
The best single resource I know of for learning about these sorts of differences is Advanced Programming in the Unix Environment by Stevens and Rago. If you have a special interest in networking and IPC, add in Stevens' Unix Network Programming, volume 1 and volume 2.
If you already have an earlier edition of APUE, it's still useful. The main thing the second edition added was explicit coverage of Linux and OS X, but since these are based on Unix, you could still puzzle out how to apply the information. The third edition updates this classic again for recent OS versions and adds some new material.