What is the overarching philosophy of BSD that defines the OS family? Is there a common goal or standard that unites them all? reddit / BSD ---------------------------------------------------------------------- jdrch · 2019-07-09 00:44 **UPDATE:** [Answer here](https://www.reddit.com/r/BSD/comments/catk2d /what_is_the_overarching_philosophy_of_bsd_that/etb1n9i/). For the longest time, I'd thought BSD was POSIX-compliant and so that development of all the BSDs was intended to keep things that way, but [per Wikipedia it's only "mostly" so](https://en.wikipedia.org/wiki/POSIX#Mostly_POSIX-compliant). They [don't do Single UNIX Specification](https://en.wikipedia.org/wiki/Sin gle_UNIX_Specification#Non-registered_Unix-like_systems), either. I suspect a reason for the lack of certification might be the cost/requirements of the certification process and POSIX licensing itself. Is this the case? **Is compliance with POSIX or some other technical standard a central goal of the BSDs?** If not, then what is the common thread of *direction* or *philosophy* (not just Unix heritage) uniting them? I run BSD myself, BTW. Genuinely curious. ---------------------------------------------------------------------- [deleted] · 2019-07-09 00:47 [removed] ---------------------------------------------------------------------- Tireseas · 2019-07-09 00:59 It's pretty much just the shared ancestor. Each of the major BSDs is a completely different project pursuing it's own goals. That's literally the reason why the different projects exist in the first place. ---------------------------------------------------------------------- jdrch · 2019-07-09 01:12 Fair enough; I just figured there must be some common thread that binds them together in the same way Linux distros are bound together by the Linux kernel (though they each use different versions thereof and sometimes even modify it themselves.) It may sound overly pedantic, but basically I was wondering what someone with no previous BSD exposure should understand and expect from an OS calling itself a BSD, in the same way an OS calling itself a Linux distro can be expected to run the Linux kernel, and an OS calling itself Windows can be expected to run the NT kernel. Fortunately I found this [old article](http://www.linfo.org/unix- like.html) that answers my question (emphasis mine): > **The BSD operating systems are widely regarded as free (both in a monetary sense and with regard to use) implementations of UNIX**, and thus as UNIX. However, in contrast to Apple, they make a point of not referring to themselves as being UNIX on their websites or other materials in order to avoid potentially costly legal problems. For example, FreeBSD, the most popular of the BSD systems (at least until the recent rise of Darwin), describes itself as being " . . . a very economical alternative to commercial UNIX® workstations." NetBSD describes itself on its homepage as " . . . a free, secure, and highly portable Unix-like Open Source operating system available for many platforms, . . . " OpenBSD describes itself as " . . . a FREE, multi- platform 4.4BSD-based UNIX-like operating system." So basically BSD is ~~to~~ FLOSS UNIX ~~what ReactOS is to Windows - albeit far more up-to-date -~~ and each BSD chooses to go about that goal differently. ---------------------------------------------------------------------- LukeShu · 2019-07-09 01:21 For the record, concerning POSIX vs SUS: - Modern SUS is a superset of POSIX; SUSv4 is a document set consisting of 2 documents: POSIX and X/Open curses. - The linked Wikipedia article is a little confused; the UNIX 03 certification was for SUSv3, but UNIX V7 (the next version) isn't just for SUSv4; it's testing for SUSv4, *and* the UNIX RBAC (Role-Based Access Control; user and group permissions). ---------------------------------------------------------------------- jdrch · 2019-07-09 01:23 Much appreciate the information :) ---------------------------------------------------------------------- Tireseas · 2019-07-09 01:46 Not quite, ReactOS is an open source reimplementation and reverse engineering of Windows that has nothing to do with NT itself. At least the ReactOS guys had better hope it has nothing to do with Windows code because Microsoft will make their life hell. Each BSD OS, OTOH, is a direct descendant of 4.4 BSD that was, at some point down the line forked into it's own independent project developed as a complete OS from top to bottom. They have their own kernels and userlands that are developed as part of a single tree by the same team of maintainers. And Linux is is not a standard operating system per se. More like a general description of an entire class of operating systems assembled from various open source projects that all maintain their own development trees that get further customized to some degree by the distro maintainers. ---------------------------------------------------------------------- jdrch · 2019-07-09 01:57 > reimplementation and reverse engineering That's not what I meant, but I can see your point. I used a bad example. But I do think the definition of BSD in *general* as being a FLOSS implementation of UNIX, with each BSD going about that in a different way and with different end use case/applications in mind stands. > BSD OS, OTOH, is a direct descendant of 4.4 BSD that was, at some point down the line forked into it's own independent project developed as a complete OS from top to bottom. Right, but there's binary compatibility or at least "easy" (note the quotes, I just mean you don't have to do a complete code rewrite to port an OpenBSD package to FreeBSD, for example) portability among them, right? That requires an overarching goal that prevents them from diverging too far from each other. > Linux is is not a standard operating system per se Right, Linux is a *kernel*. That's why I deliberately used the term "Linux distro" and not "Linux OS." The term "distro" implies "assembled from various open source projects that all maintain their own development trees that get further customized" as you said. ---------------------------------------------------------------------- Garfield_M_Obama · 2019-07-09 02:26 Like /u/Tireseas says, the main thing that binds BSD is a shared (increasingly ancient) history and a common code base. BSD also has historically cleaved more closely to the principles of unix whereas Linux, as the most obvious comparison, was much more about getting things to work and ideas of performance and hardware support, with a greater willingness to compromise. Though the latter point is somewhat subjective and less relevant in the 2010s than it was in the 1990s. Since you're a BSD user, you'll also be familiar with the ports system and a number of other ideas that maintain a degree of commonality. But when I think about your question of common direction of philosophy, I'd argue that, at least in terms of the big three (Free, Net, Open) they're actually differentiated by philosophy rather than united by it. Their common element is code and various technical features, but they differ in terms of where they're willing to make compromises in favour of more overarching objectives. FreeBSD has historically focused on features and optimization for a few architectures as well as functionality that would make it more appealing in institutional settings, and for hackers and daily users. NetBSD has always had a heavy emphasis on code portability and abstraction of architecture specific functionality. OpenBSD has generally compromised in terms of features and performance in favour of (what they view as) code correctness and security. But that said, I don't come across a lot of BSD people who only know/use a single distribution for everything and they've historically been united to some degree by the fact that the learning curve tends to be pretty shallow for people who switch or require multiple distros in their environment. Combined with the fact that none of them distribute GPL code in the base OS, this means that they often recycle each others good ideas where practical, providing some impetus for each platform to maintain a degree of common technology even though they have all diverged a long time ago and don't really actively attempt to be compatible in the way that some other platforms do. In this sense, I guess it's not that different from how the many Linux distros that can trace their code back to Debian still maintain a lot of commonality and can often run software with little or no modification, in spite of the fact that there are vastly divergent degrees of interest in staying closely aligned with the Debian project principles. There are also aesthetic and cultural themes that tend to be common to BSD and can be contrasted with other unix and unix-like platforms. In particular BSD has never completely shed its academic and research origins and has had culture around documentation and code style that is more overarching because the entire base operating system is developed by the same project, whereas any Linux distribution places a heavy emphasis on integrating software from a number of critical upstream projects (kernel, init/systemd, GNU, various shells, file systems, etc.); in BSD-land 3rd party code in the base distro is fairly limited by comparison. This isn't to suggest that BSD is better than Linux, integration is noble work and Linux distros benefit greatly from dedicated teams that focus on a particular subsystems. But to me this is one of the most fundamental differences between BSD and any other unix platform that's widely used today. ---------------------------------------------------------------------- jdrch · 2019-07-09 02:35 Appreciate the extensive reply! > differentiated by philosophy rather than united by it Maybe I should have used the term "architecture" instead of philosophy. Many actual UNIX OSes are very different, but they're all UNIX at the end of the day. BSD seems to be FLOSS implementation of UNIX, with each BSD choosing to do so differently. ---------------------------------------------------------------------- chromaXen · 2019-07-09 02:50 I would say that it [the unifying BSD philosophy] is that of an entire, integrated system. Compare: Linux style UNIX: Kernel Solaris style UNIX: Kernel and libc BSD style UNIX: Kernel, libc, userland ---------------------------------------------------------------------- robbak · 2019-07-09 03:41 One thing that defines the BSD philosophy is the license. The BSD community generally distrusts the rather extreme stance taken by Richard Stallman and embodied in the very restrictive nature of the GPL. By contrast, the BSD license has 2 clauses - 'You didn't write this,', and 'You can't sue us.' It used to have a third clause, that stated that a person using BSD code had to acknowledge the authors, and while this acknowledgement requirement was imortant to the BSD community, it was decided to remove it so BSD code could be mixed with GPL code. The philosophy is more in line with the 'copy-centre' idea - I.E., "take this down to the copy centre and do what you want." ---------------------------------------------------------------------- grumpy_ta · 2019-07-09 06:16 > It may sound overly pedantic, but basically I was wondering what someone with no previous BSD exposure should understand and expect from an OS calling itself a BSD, in the same way an OS calling itself a Linux distro can be expected to run the Linux kernel, and an OS calling itself Windows can be expected to run the NT kernel. If we're being pedantic, the NT kernel is not the only one used by operating systems with the Windows name. On the consumer side I think (without looking it up) that the first NT kernel OS was Windows ME. > Right, but there's binary compatibility or at least "easy" (note the quotes, I just mean you don't have to do a complete code rewrite to port an OpenBSD package to FreeBSD, for example) portability among them, right? That requires an overarching goal that prevents them from diverging too far from each other. I don't have a lot of experience with BSDs unless you count OSX as a BSD (which I wouldn't unless we're being loose with the categorization, because although it uses a lot of BSD parts, they also use a lot of Apple-specific parts), but I doubt they've stayed close enough for true binary compatibility. That would mean that I could compile the program under one BSD and that binary would run without issue on any of the other BSDs. Maybe a BSD user can pop in here and correct me, but that's something that's not even true between Linux distros that are regularly syncing their kernels back up with the Linus' mainline, even if we ignore differences in library versions, etc. (Pro-tip: Pay no attention to the version number on RedHat kernels; they might have started with the listed version, but they then backport stuff from one to two major versions later creating some kind of strange frankenkernel e.g.: starting with a 2.x kernel and backporting fixes and features from the 3.x kernels. Yeah, other distros backport stuff, but RH is the worst offender in my experience.) > > Linux is is not a standard operating system per se > Right, Linux is a kernel. That's why I deliberately used the term "Linux distro" and not "Linux OS." The term "distro" implies "assembled from various open source projects that all maintain their own development trees that get further customized" as you said. > That's why I deliberately used the term "Linux distro" > distro Distro -- short for distribution. BSD -- Abbreviation for Berkeley Software **Distribution** Distro doesn't exactly imply what you think it implies. 1. No requirement that a "distro" be entirely open source. 2. No requirement that the individual components have separate LoDs (though if I apply at a company and find out they keep all of their code under a single repo and/or control "release" locking repos or some stupid BS because they can't be bothered to grab the last "acceptable" commit I'll probably walk). 3. Customization -- This is probably the main thing that distinguishes very similar distros (e.g.: Debian, Ubuntu, Mint) even though the latter two were climbing onto Debian's shoulders to reach higher. Arch and Manjaro. The ten billion Puppy Linux distros and their related puplets. The various SuSE and RedHat distros. Short version: What binds the BSDs together is that they all started with the code from Berkeley's Unix implementation which was itself started with the original Bell Lab's Unix code. Well, the license, too I guess. BSDs don't have any worries about including something like ZFS, where Linux distros have to talk with lawyers and decide how likely it is that Oracle decides to litigate them into non-existant (regardless of merit). ---------------------------------------------------------------------- freakinunoriginal · 2019-07-09 08:45 >On the consumer side I think (without looking it up) that the first NT kernel OS was Windows ME. The first consumer-targeting Windows to ship with the NT kernel was XP. ME was the last of the "9x family." ---------------------------------------------------------------------- joed_ · 2019-07-09 12:17 > BSDs don't have any worries about including something like ZFS Not quite true, I doubt OpenBSD devs are fans of the CDDL. In general, new contributions to OpenBSD have to fall under an ISC (or similar) license. ---------------------------------------------------------------------- nick_storm · 2019-07-09 12:54 Interesting point but I bet hardly anyone uses the Linux kernel without the GNU userland. So it's actually... Linux style UNIX: kernel, glibc, GNU userland ---------------------------------------------------------------------- axalon900 · 2019-07-09 13:13 Depending on what you mean by hardly anyone, embedded systems often use Linux + uClibc + busybox or some other such minimalist setup ---------------------------------------------------------------------- nick_storm · 2019-07-09 13:14 I stand corrected. I completely forgot about embedded. ---------------------------------------------------------------------- jdrch · 2019-07-09 15:31 > Linux style UNIX: Kernel Solaris style UNIX: Kernel and libc BSD style UNIX: Kernel, libc, userland This is a very good explanation. Thanks! ---------------------------------------------------------------------- jdrch · 2019-07-09 16:00 > NT kernel is not the only one used by operating systems with the Windows name All [current generation](https://en.wikipedia.org/wiki/Windows_NT#Releases) Windows releases use it. > Windows ME Wow, no. [ME was based on DOS](https://en.wikipedia.org/wiki/Windows_Me). If you're used to the same kernel type being used throughout an OS family's history, I can understand your expectation that the same is true for Windows. It isn't. Windows has used at least 3 kernel paradigms in its history, and currently the NT kernel is used across the board, even on the Xbox One. > I don't have a lot of experience with BSDs 🤔 > count OSX macOS? > as a BSD It's a fully licensed and certified mixed source UNIX implementation. > I could compile the program under one BSD and that binary would run without issue on any of the other BSDs You're right, this is [generally not possible](https://www.reddit.com/ r/BSD/comments/76uwon/are_bsd_binaries_portable_across_the_different/) . > that's not even true between Linux distros Don't confuse *binaries* with packages. Many binaries, such as dnscrypt-proxy, etc. will run on any Linux you throw them on, as long as dependencies are met (the user takes care of this) *and* the binary was compiled for the ISA (CPU instruction set) the target Linux installation is running on. As proof, look at dnscrypt-proxy's [release files](https://github.com/jedisct1/dnscrypt- proxy/releases/tag/2.0.25). Note how the only variation among Linux release archvies is the CPU platform (e.g. arm64, amd64, etc.), not distro family (e.g. Debian, RH, etc.) Such binaries, though they run on Linux, have to manually integrated with the rest of the OS by the user. As a matter of fact, [FreeBSD supports running unmodified Linux binaries](https://www.freebsd.org/doc/handbook/linuxemu.html). Packages OTOH, are automatically integrated with the OS via the package manager. > Distro I used the term in the context of Linux. Clearly "distribution" means a different thing in "Linux distribution" from what it does in "Berkeley Software Distribution." > Distro doesn't exactly imply what you think it implies Except I quoted you directly, to indicate that something matching your description would *fall under the definition* of a "Linux distro," not that it describes *all* Linux distros by definition. ---------------------------------------------------------------------- knz · 2019-07-09 18:16 I was teaching OS courses at the university and there's a technical thing that pretty reliably unites all the BSDs and pits them against Linux and other unices: the handling of syscalls when a signal is received during the syscall (eg an app is waiting on a read from NFS and you press Ctrl+C). BSD stops the syscall and returns EINTR. Sysv kernels wait until the syscall terminates and then only deliver the signal. It's a major design decision that has ramifications in the way user- level software is architectures. In fact, because of just this BSD programs can be generally more responsive in I/O heavy workloads because they are architectured differently. Also because of this a simple program developed on a Linux system may not work well on BSD, even if it does not use Linux specific syscalls. This is a sort of religious schism that occurred very early on and impacts software architecture around the two families to this day. ---------------------------------------------------------------------- jdrch · 2019-07-09 18:22 Wow, I had no idea about that at all. Very informative! ---------------------------------------------------------------------- jdrch · 2019-07-09 18:26 The bigger concern about OpenBSD is that they've rejected ZFS without bothering to offer an equivalent alternative (although you could argue that ZFS' dedup performance overhead might be too much for OpenBSD.) Even Dragonfly has HAMMER2. ---------------------------------------------------------------------- grumpy_ta · 2019-07-10 01:54 > All current generation Windows releases use it. That wasn't what you said. You said "an OS calling itself Windows can be expected to run the NT kernel." Which I pointed out was not true. > Wow, no. ME was based on DOS. Correct, I was off by one release. XP was the first consumer Windows with a NT kernel. Mea culpa. > If you're used to the same kernel type being used throughout an OS family's history, I can understand your expectation that the same is true for Windows. It isn't. Hold on. What part "the NT kernel is not the only one used by operating systems with the Windows name" made you think that I thought Windows always had NT kernels? >> I don't have a lot of experience with BSDs > > 🤔 Yeah, yeah, I'm subscribed to the BSD subreddit even though I don't run a BSD on anything besides my file server. > macOS? I'll get used to the name change one of these days. > > that's not even true between Linux distros > > Don't confuse binaries with packages. Many binaries, such as dnscrypt-proxy, etc. will run on any Linux you throw them on, as long as dependencies are met (the user takes care of this) and the binary was compiled for the ISA (CPU instruction set) the target Linux installation is running on. My apologies, I was typing slower than I was thinking and dropped a word. I intended to type "that's not even always true between Linux distros". I don't believe we actually disagree on this point. > I used the term in the context of Linux. Clearly "distribution" means a different thing in "Linux distribution" from what it does in "Berkeley Software Distribution." It's not clear to me, but okay. > Except I quoted you directly, to indicate that something matching your description would fall under the definition of a "Linux distro," not that it describes all Linux distros by definition. That would be a feat since I hadn't posted anything for you to quote when you gave your definition of "Linux distro". ---------------------------------------------------------------------- illumosguy · 2019-07-10 07:07 > Correct, I was off by one release. XP was the first consumer Windows with a NT kernel. Mea culpa what do you mean by 'consumer Windows' though? Windows NT 3.5, NT 4 and 2000, were all welcomed with a broad (and deserved) success within the *workstation* marke5; then, no sooner would tye price of x86 CPUs and RAM drop, the boundary between workstation and end-user desktop became much more subtle and NT was reimplemented as a multi- purpose OS (XP) ---------------------------------------------------------------------- illumosguy · 2019-07-10 07:24 > Solaris style UNIX: Kernel and libc don't know where you're getting this info from, but Solaris is a [whole OS](https://github.com/joyent/illumos- joyent/tree/master/usr/src) on its own. Unlike BSDs, it even has its own C/C++/Fortran compiler (SunStudio), which is still maintained on proprietary Solaris (illumos switched to GCC). Like many, you might believe Solaris factual contributions in world-wide software development are limited to Java, NFS, ZFS, BSM and DTrace, but, that's just untrue, OpenBSD's OSS sound subsystem is modelled after Solaris (SunAudio) ---------------------------------------------------------------------- illumosguy · 2019-07-10 07:27 more on this topic [here](https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers- handbook/x86-system-calls.html) ---------------------------------------------------------------------- [deleted] · 2019-07-10 23:31 [deleted] ---------------------------------------------------------------------- brynet · 2019-07-10 23:33 > Right, but there's binary compatibility No. All the BSD's have been independently developed for over 20 years. While there's certainly a level of source and API compatibility, being Unix systems, but ABI compatibility is not a goal between projects. OpenBSD for example, has broken ABI compatibility with previous releases many times over the years, for example 64-bit time_t change for 5.5. ---------------------------------------------------------------------- jdrch · 2019-07-10 23:34 Yeah sorry, I was dead wrong there, which acknowledged - albeit not directly - further on in the thread. My bad. ---------------------------------------------------------------------- brynet · 2019-07-10 23:35 POSIX/SUSv4 etc certification indeed costs a fee, and running a POSIX "testsuite". Far too much for any open source project to spend money on. But that does not mean that BSD systems blatantly ignore standards. Whether that be ISO/POSIX, "de facto" or defining their own. All of the respective projects strive towards standards compatibility to some extent, and in cases where they deviate, document such behaviour in their man pages. ---------------------------------------------------------------------- jdrch · 2019-07-10 23:58 > Whether that be ISO/POSIX, "de facto" or defining their own. All of the respective projects strive towards standards compatibility to some extent I get what you're trying to say, but if *everything* is a standard then there are no standards ;) u/chromaXen has the [most succinct technical explanation](https://www. reddit.com/r/BSD/comments/catk2d/what_is_the_overarching_philosophy_of _bsd_that/etb9rol/), IMO, at least as far as Linux and BSD are concerned (Solaris seems to be in doubt.) ---------------------------------------------------------------------- brynet · 2019-07-11 00:29 What I mean by that is the *BSDs, both due to their heritage and work done in subsequent post-Unix-standardization years, defined many of the shared interfaces. For example, BSD defined most of the socket interface. Many things that were created in BSD, or *BSD have risen to become official standards-- or simply de facto standards. With the exception of Windows and glibc-- OpenBSD's `strlcpy/strlcat` API's show up in various C libraries. OpenBSD's `arc4random(3)` was adopted by all of the *BSDs, Solaris/illumos. OpenBSD's `getentropy(2)` syscall inspired Linux (albeit broken) getrandom(2). ---------------------------------------------------------------------- jdrch · 2019-07-11 00:34 Good explanation. > Windows Windows' TCP/IP stack is from BSD too. In fact Project Trident (which I use, based on TrueOS) and Windows 10 (which I also use) have similar in-place feature update bugs. > OpenBSD .. gave us OpenSSL too. ---------------------------------------------------------------------- brynet · 2019-07-11 00:36 > OpenBSD gave us OpenSSL too. Incorrect. OpenSSL is not an OpenBSD project, we maintain LibreSSL instead. Perhaps you were thinking about OpenSSH, which is an OpenBSD project. ---------------------------------------------------------------------- jdrch · 2019-07-11 00:36 > Perhaps you were thinking about OpenSSH, which is an OpenBSD project. Yeah I was, my bad. ---------------------------------------------------------------------- Kernigh · 2019-07-11 01:09 OSS and Sun audio seem to be different. OSS looks like [illumos dsp(7I)](https://illumos.org/man/7I/dsp) or [FreeBSD sound(4)](https://www.freebsd.org/cgi/man.cgi?query=sound), and has ioctl()s named SNDCTL\_\* in or . Sun audio looks like [illumos audio(7I)](https://illumos.org/man/7I/audio), [NetBSD audio(4)](https://netbsd.gw.com/cgi-bin/man-cgi?audio), or [OpenBSD audio(4)](https://man.openbsd.org/audio), and has ioctls() named AUDIO\_\* in . OpenBSD lost compatibility with Sun by removing AUDIO\_SETINFO and the µLaw encoding. Solaris might be the origin of [ctf(4)](https://illumos.org/man/4/ctf), the "Compact C Type Format". This has reached OpenBSD as [ctfconv(1)](https://man.openbsd.org/ctfconv), but I don't know how to use it. SunOS, the predecessor of Solaris, was early to get shared libraries. [OpenBSD ld.so(1)](https://man.openbsd.org/ld.so) says, "The shared library model employed first appeared in SunOS 4.0." ---------------------------------------------------------------------- zinsuddu · 2019-07-12 20:11 The general answer that the BSDs are linked by a shared history is fair enough, but specifically they are linked by **a shared source code and an intention to continue to build on that code**. The intention to continue developing the code that has already been written, developed, debugged, documented and used in production is shared between the BSD systems but was not shared by Linux at the beginning (or ever?). At the time that Linus started his hobby operating system [(wikipedia)](https://en.wikipedia.org/wiki/History_o f_Linux#The_creation_of_Linux) there already existed a complete system that more than met his design goal. BSD already had it all including numerous books documenting every aspect of the operating system design. In the spirit of experimentation Linus eschewed using either BSD or Minix code in his (then) hobby system but managed to get a running system fairly quickly. It was all shiny new and people found it easy to hack on it. The BSDs continued to develop the complete operating system that had been developed in the first place, not by students, but by some of the top computer scientists at Bell Labs, Berkeley Univ, etc, people who had honed their thinking and their skills working on the Multics operating system and honed the Unix/BSD system for more than 20 years before Linux was designed in a dorm room. *Now* top computer professionals *do* work on Linux and its design *is* documented in some great books and it runs on very large productions systems. But, as I see it, Linux continues to show it origin, its DNA, as an ecosystem in which it is common for "kids in dorm rooms" to throw out working, proven code and start over because New and Shiny: * gnome 4 (coming soon) in place of the already built gnome 3, in place of the built and tested and heavily used gnome 2, in place of gnome (1)... * KDE 5 in place of the already built KDE 4 which had finally become a good DE for professional workers, in place of KDE 3 which had been loved, in place... * A multitude of file systems in place of one or two great ones * btrfs in place of the already built and fire-tested zfs * systemd in place of that which already ran the world's big iron servers and all of its supercomputers Each of the BSD systems is built on **one code base**, BSD 4.4 Lite, and generally do not throw out working code for the sheer thrill of starting over. Here again, as I see it, BSD continues to show its origin, its DNA, as an ecosystem in which working, proven code is kept and perfected, and "New and Shiny" is considered a warning. As a result of the shared intention to keep Stuff That Was Designed Carefully and Works Well the users of the BSDs have an uneasy relationship with the software churn that comes out of the Linux ecosystem. ---------------------------------------------------------------------- jdrch · 2019-07-12 20:52 > a shared source code and an intention to continue to build on that code The impression I get from the lack of binary compatibility among the BSDs, as well as other major differences among them, is that they've diverged sufficiently for this statement in isolation to be insufficient for describing the *current state and direction* of the family. It is, however, an excellent one-liner on the history of BSD. > by some of the top computer scientists Great. I appreciate that about BSD. The problem is that they wound up creating an OS that was designed for use by people of their same ilk. The democratization of IT and computing in general would most likely not have occurred if the BSD paradigm were the only one in existence, because it focuses too much on technical compliance and not enough on meeting end users' wants. A core feature of BSD (and Linux, to some extent, though that's improving greatly) in general seems to be the arrogance that code is written to serve its writer's purposes only, and moreover that all user needs submit to that fact. There's nothing necessarily *wrong* with that - as an engineer I appreciate technical "correctness" too - but I'm very glad it's not the only computing paradigm we have. > btrfs in place of the already built and fire-tested zfs As much as I love ZFS, bear in mind that 1) OpenBSD doesn't default to it and 2) DragonFly BSD uses HAMMER(2). It seems, therefore, that "rejection" of ZFS is not solely a Linux phenomenon. Also, ZFS' license prevents it from being integrated with the Linux kernel. > gnome 4 [...] KDE The irony of this is KDE was originally a UNIX-based project. > proven code is kept and perfected, and "New and Shiny" is considered a warning Or maybe the "proven code" doesn't meet everyone's needs, and people don't build their lives, research, or business practices around abstract, rigid, immutable computer science paradigms, however well tested and proven they may be. Especially when there are other viable options. Instead of dismissing other developments as just "new and shiny," *all* developer communities - not just BSD - are better served by asking themselves how they can better support desired end use cases. People tend not to use solutions that don't do what they want, regardless of how well developed, tested, or proven such solutions are. If you want chocolate ice cream, it doesn't matter how good the vanilla ice cream is. ---------------------------------------------------------------------- zinsuddu · 2019-07-12 23:21 >The impression I get from the lack of binary compatibility among the BSDs, as well as other major differences among them, is that they've diverged sufficiently for this statement in isolation to be insufficient for describing the current state and direction of the family. You've touched something that is almost universally misunderstood in these comparisons of BSDs and Linux distros, and you're right that the BSDs lack binary compatibility --- **Only three operating systems are being compared** and they each differ from one another by having different syscalls, different file systems, different programming interfaces, and they are not *binary* compatible. They share with one another via source code. * Linux -- this is really one operating system. The kernel is huge with almost 20 million lines of source code.The distros arose because of the emphasis on providing "choice" (the democratization principle that you refer to) so the distros allow users primarily to chose different packaging managers (apt, yum, pacman), or to chose binary vs source as the basis (LFS, gentoo, calculate), or to choose different default file systems (xfs, ext4, btrfs) or to choose different mixes of available software and especially DEs (gnome, plasma, cinnamon, mate, lxqt, xfce). These distros all have the same source code throughout from kernel to application, but making different choices from the pool of all available open-source software. There are *other* operating systems that are called Linux but they are very special or experimental and can be usually ignored. Examples are distros that use *other code than everyone else* \-- e.g. musl as the libc, zfs as the filesystem, non-systemd as the init. * FreeBSD -- this is one of the (two) BSD operating systems. It evolved from BSD 4.4 adding zfs and dtrace from Solaris and evolving its own take on multi-cpu support. It has about 500 syscalls. It has grown to encompass about 9 million lines of code in its kernel. The package manager, pkg, is both source AND binary based. All 32,000 available packages are described in a "ports tree" that simply uses **make** for source builds or **pkg** for binary installs. * OpenBSD -- this is *the other* BSD operating system. It evolved from BSD 4.4 adding its own, mostly security-related, [innovations](https://www.openbsd.org/innovations.html). It has about 350 syscalls and one (great) filesystem, ufs with softdeps and has grown to only 3 million lines of kernel code. The package manager is both source AND binary based. All 11,000 available packages are described in a "ports tree" that uses simply uses **make** for source builds or **pkg\_add** for binary installs. My file server runs openbsd with ufs, suffers frequent power drops here in the American wilderness, and has always kept my files perfectly. There are other bsd systems. NetBSD has very few users and is seldom updated and DragonFly is a research operating system not intended for you to use! (seriously, the emphasis in OpenBSD and DragonFly BSD is on getting the work done, e.g. adding pledges in OpenBSD so that all software runs as much as possible with minimal priviledges and even if compromised can do no harm or adding hammer2 as a cluster file system to DragonFly). Neither OpenBSD nor DragonFly is encouraging you to use them. ​ You are right that the overarching philosophy in the BSDs is on perfecting the source code -- perfecting the source code that we have inherited and adding only few and very well thought-out new features. It is this way because that is how the BSDs got started, by appreciating the BSD source code that had been developed by real computer scientists and committing to bring that code forward. ---------------------------------------------------------------------- jdrch · 2019-07-13 04:44 > this is really one operating system I've come to the realization that this is somewhat effectively true thanks to the shared kernel. However, the above statement also contradicts the common selling point of BSD being consistent (I suspect the caveat is this consistency is within distributions and not across them) compared to Linux, but that's a largely academic point. > has always kept my files perfectly It's impossible to verify this is the case without a checksumming filesystem of some sort. AFAIK, UFS doesn't do that (in the same sense that ZFS does.) But yes, from a practical *consumer* POV as long as your files open without problems then all is well. > DragonFly BSD is on getting the work done But in the previous sentence you said it isn't intended for actual use. You seem to be tying yourself into knots trying to espouse BSD's advantages when all you really have to do is explain how it's *different* (which you've done very well so far), and people like myself who use other OSes will appreciate the differences and run it *for* - not despite - them. The more I read about DragonFly, the more it sounds like a fantastic server OS, for example. > developed by real computer scientists This sounds a lot like gatekeeping, but I get your point. ---------------------------------------------------------------------- Kernigh · 2019-07-14 18:00 >BSD stops the syscall and returns EINTR. Sysv kernels wait until the syscall terminates and then only deliver the signal. If I believe the manuals, System V can stop a syscall with EINTR at least sometimes. [signal.h(3HEAD) in illumos](https://illumos.org/man/3HEAD/signal.h) says, >If execution of the signal handler interrupts a blocked function call, the handler is executed and the interrupted function call returns **-1** to the calling process with **errno** set to **EINTR**. Signals were already stopping some system calls in Unix v7, the ancestor of both BSD and System V. [signal(2) in Unix v7](https://www. freebsd.org/cgi/man.cgi?query=signal&apropos=0&sektion=0&manpath=Unix+ Seventh+Edition&arch=default&format=html) says, >When a caught signal occurs during certain system calls, the call terminates prematurely. In particular this can occur during a *read* or *write*(2) on a slow device (like a typewriter; but not a file); and during *pause* or *wait*(2). This says "not a file"; [sigaction(3) in BSD](https://www.freebsd.org/cgi/man.cgi?query=sigaction) says "not a regular file". If I believe the manual, a signal in BSD can't stop a read(2) or write(2) on a regular file, even if the file is on NFS. So if I press \^C while the app is reading a file, the app might get stuck, with the kernel refusing to deliver the SIGINT while the app waits for NFS. I don't believe the manual, because I see that [nfs\_bioread() in OpenBSD](https://cvsweb.openbsd.org/cgi- bin/cvsweb/src/sys/nfs/nfs_bio.c?rev=1.82&content-type=text/x-cvsweb- markup) may return EINTR. You might be correct, that BSD kernels can stop read(2) from NFS with EINTR. *(After the kernel delivers SIGINT, it might restart the read(2), so the app doesn't get EINTR; see SA\_RESTART in sigaction(2). I am discussing something different: whether the kernel will deliver SIGINT now, or wait to deliver SIGINT after NFS reads the file.)* BSD and System V can put regular files in other weird places. The file might be on a local filesystem (like FFS or ZFS), but the filesystem's disk might be an iSCSI disk (in a remote server, using SCSI over internet), or it might be a disk image, where the image might be on NFS. These are different ways to put a local file behind a network connection. I don't know whether BSD or System V can stop read(2) of such files. ---------------------------------------------------------------------- knz · 2019-07-16 10:33 Thanks for explaining. Another thing I had meant to mention the first time around is also that BSD kernels have SA_RESTART on by default, whereas SysV systems do not. It's an area where the compatibility goes the other way, where a BSD program may not work well in surprising ways when ported to a SysV box.