Skip to main content

Mac, Linux or BSD

The eternal question:
Which is better - EMACS or Vi?
OK, this post is actually about the other eternal question!
As I use Linux, Mac, Open and Free BSD (Yes, and that other ball of wax too...), I think I can answer objectively:
Both OpenBSD and FreeBSD are reasonably easy to download, install and run on pretty much anything. At least, I have not found a server/desktop/laptop computer that it would not run on.  I even ran OpenBSD on a Sparc Station - remember those?

OpenBSD

Theo De Raadt has a 'cut the nonsense' mentality so OpenBSD is simpler, with a smaller repository of programs, about 30,000 packages. However, with a little effort, you can install FreeBSD software on OpenBSD to get the rest. After a few days of use, you will know how.

The best OpenBSD book is Absolute OpenBSD: UNIX for the Practical Paranoid.

In general, OpenBSD feels a lot like Slackware Linux: Simple and very fast.

FreeBSD

FreeBSD can also with some effort, run Linux programs and you can use a virtualizer to run other systems, so you are never locked into one thing.

FreeBSD has a gigantic repository of about 50,000 programs and it has very good documentation in the online FreeBSD Handbook.

MacOS

Compared to OpenBSD, Dragonfly and Slackware, some distributions look fancy and are very slow - there are many reasons why - see below.  MacOS obviously falls into the fancy and slow category. So if you want a Mac replacement then you first need to decide whether you want a fancy or a fast system.
My preference is to install a reasonably fast system on the host, then use a virtualizer for experiments and work and I frequently run multiple systems at the same time.  All the BSDs are good for that, be it Open, Free or Mac.
My home use system is a Macbook Pro running the latest MacOS with the Macports and Homebrew software repositories.  I even have the XFCE desktop installed, so when I get annoyed with the overbearing Mac GUI, I run XFCE, to get a weirdly satisfying Linux-Mac hybrid.


Linux

Linux is the step child of UNIX, which took over the world.  Of the Top 500 Super Computers, all now run Linux.  My work engineering system is an ancient Dell T420 running the latest Fedora Linux on the host.  All my machines have Virtualbox and a zoo of virtual machines for the rest.

Note that the Mandatory Access Control security systems on Red Hat and Debian distributions slow them down a lot (in the order of 50%).  If you have to have a fast and responsive system and can afford to trade it for security, then turn SELinux or AppArmor off.

Latency

For the control and remote sensing systems of robots, aircraft and rockets, the worst case OS latency matters very much.  For low latency, nothing beats Linux, since the whole kernel and all spinlocks are pre-emptible.

On average, all OS's have the same interrupt service latency - a few tens of nanoseconds.  However, every once in a while, the latency will be much worse.  In the case of Linux, the worst case will be below 1 ms, but for Win10, it can can be 20 ms and for Win7, 800 ms.  The trouble in robotics and remote sensing, is that you need to design for the worst case.

I have observed a dotNet video player on Windows 7, after a couple days of uptime, stop dead for two seconds, every 8 seconds - obviously not good for a remote sensing application.  Windows 10 latency is much improved, though still a little worse than Mac OS, which has 2 orders of magnitude worse latency than Linux - see below for why this is.

See this very good real-time performance analysis: https://ennerf.github.io/2016/09/20/A-Practical-Look-at-Latency-in-Robotics-The-Importance-of-Metrics-and-Operating-Systems.html

(Intentional performance degradation was worst in Windows Vista and has been dialled back a bit since).

What is the Performance Problem with Windows and Mac OS?

It is not that MS and Apple don't know how to make a real-time OS.  They are not allowed to do it.

The reason why, is in the US export regulations.  Windows and Mac OS have a Mass Market Exemption (EAR 5D992.c).  This is necessary because MS, Apple and the US State Department simply cannot process billions of export licenses.

Some useful links:





The Mass Market exemption is described in the EAR (2-21.a., 1-5.A.4.a, 1-5.A.1.f, Cat 2, Cat 4, cat 6, cat 7) and MTCR (Group 6, 6-1.A., 6-19.A.1., 6-19.A.2.) regulations, and is defined in what a Mass Market OS is NOT allowed to do:
  • It is not allowed to do real-time processing of audio (Sonar).
  • It is not allowed to provide advanced networking and deep packet inspection (Network inspection).
  • It is not allowed to do precision tracking (of a missile or UAV).
  • It is not allowed to provide C4I video and meta data processing (Information from a missile, MALE or HALE UAV).
Items not specifically controlled, can also be controlled under section 744.3 of the EAR ("catch-all", or EPCI, controls). Items require an export license if they will be used in the design, development, production, or use of:
  • Rocket systems (including ballistic missile systems, space launch vehicles, and sounding rockets) or unmanned aerial vehicles (including cruise missile systems, target drones, and reconnaissance drones) capable of a range of at least 300 km for use in or by a country listed in Country Group D:4 (see  Supplement No. 1 to Part 738 of the EAR).
  • Any rocket system or unmanned aerial vehicles in a D:4 country where system characteristics or use are unknown.
  • Any rocket systems or unmanned aerial vehicles for the delivery of chemical, biological, or nuclear weapons to anywhere in the world, except by governmental programs for nuclear weapons delivery of the Nuclear Non-Proliferation Treaty Nuclear Weapons States that are also members of NATO.
So, in the extreme, if you use US chewing gum to glue together parts of a big missile, then the gum may need an export license.

Windows and Mac OS therefore contain special code to degrade the performance slightly when you try to process multiple video and audio streams - see the above paragraphs on latency.  With a single stream it works, so it is good for home use, or for a musical band, but it is not great for high performance systems.

If you would use Windows or Mac OS for one of the above disallowed functions, then MS and Apple are not allowed to support you and in the extreme, they may even be forced to completely boycott your country (North Korea, Iran...).

Free Open Source Software (BSD, Linux...) is covered under ITAR (120.10(b)) and EAR (734.3(b)(3)(iii)) and is allowed to do the above without requiring export licenses.  (The horse bolted, so there is no point in trying to close the gate now).


So, which OS is best? 
It depends on what exactly you need to do with your system...
:)
Herman

Comments

Popular posts from this blog

Parasitic Quadrifilar Helical Antenna

This article was reprinted in OSCAR News, March 2018:  http://www.amsat-uk.org If you want to receive Satellite Weather Pictures , then you need a decent antenna, otherwise you will receive more noise than picture. For polar orbit satellites, one needs an antenna with a mushroom shaped radiation pattern .  It needs to have strong gain towards the horizon where the satellites are distant, less gain upwards where they are close and as little as possible downwards, which would be wasted and a source of noise.  Most satellites are spin stabilized and therefore the antenna also needs circular polarization, otherwise the received signal will flutter as the antennas rotate through nulls. The helical antenna, first proposed by Kraus in 1948, is the natural solution to circular polarized satellite communications.  It is a simple twisted wire - there seems to be nothing to it.  Various papers have been published on helix antennas, so the operation is pretty well understood. Therefore,

Patch Antenna Design with NEC2

The older free Numerical Electromagnetic Code version 2 (NEC2) from Lawrence Livermore Lab assumes an air dielectric.  This makes it hard (but not impossible) for a radio amateur to experiment with Printed Circuit Board Patch antennas and micro strip lines. Air Spaced Patch Antenna Radiation Pattern You could use the free ASAP simulation program , which handles thin dielectrics, you could shell out a few hundred Dollars for a copy of NEC4 , You could buy GEMACS if you live in the USA, or you could add distributed capacitors to a NEC2 model with LD cards (hook up one capacitor in the middle of each element.), but that is far too much money/trouble for most. More information on driving an array antenna can be found here: https://www.aeronetworks.ca/2019/03/driving-quad-patch-array-antenna.htm l Air Dielectric Patch   The obvious lazy solution is to accept the limitation and make an air dielectric patch antenna. An advantage of using air dielectric, is that the antenn

Weather Satellite Turnstile Antennas for the 2 meter Band

NEC2, 2 m band, 146 MHz, Yagi Turnstile Simulation and Build This article describes a Turnstile Antenna for the 2 meter band, 146 MHz amateur satcom, 137 MHz NOAA and Russian Meteor weather satellites.  Weather satellite reception is described here .  A quadrifilar helical antenna is described here .   Engineering, is the art of making what you need,  from what you can get. Radiation Pattern of the Three Element Yagi-Uda Antenna Once one combine and cross two Yagis, the pattern becomes distinctly twisted. The right hand polarization actually becomes visible in the radiation pattern plot, which I found really cool. Radiation Pattern of Six Element Turnstile Antenna Only a true RF Geek can appreciate the twisted invisible inner beauty of a herring bone antenna... Six Element Turnstile Antenna Essentially, it is three crosses on a stick.  The driven elements are broken in the middle at the drive points.  The other elements can go straight throug