posted by Razvan T. Coloja on Mon 3rd Jan 2011 23:30 UTC
IconTo understand what the BeOS and Haiku operating systems are, we first must remember that BeOS was developed with the multimedia user in mind. BeOS wanted to be what OS X has become today: an easy to use, attractive operating system. However, BeOS was a niche OS, destined for the media-hungry user. The percentage of audio and video applications available for Haiku is greater than the one in Linux, OS X or Windows, and the inner workings of the operating system were created in such a way, that the same multimedia passionate would find it easy to work with the user interface and files. Each application can interfere with other applications of its kind. A WAVE file selection can be dragged from a sound editor and onto the desktop, to create an audio file. Audio applications can interfere with each other via the Haiku Media Kit -- the corespondent of a Linux sound server. Applications like Cortex are a perfect example of how BeOS and Haiku deal with multimedia files: you can have more than one soundcard and use each one of those soundcards independently or separately. You can link one soundcard to the Audio Mixer, start a drum machine application and link that software to the Audio Mixer. If you want to output whatever you create with the audio application, all you have to do is drag the microphone and link it to the application's icon in Cortex.

Everything in Haiku is about simplicity. You can drag and drop a file unto an application's window and if the program can handle the file type, it will open it up instantly.

When BeOS failed to deliver as a commercial operating system, the Haiku team took over and created a BeOS from scratch, making the operating system open-source. Haiku is a POSIX-compliant OS that at first looks appears to be a clone between OS X and Linux. While the UI might appear not as polished as OS X's Aqua and the application base might be much smaller than that of Windows, Haiku is nevertheless the fastest of them all.

Imagine starting up a full-featured Fedora distribution with the speed of a simple GeeXbox Linux distribution. In VirtualBox, with 512 RAM base memory and a CPU of 1,83GHz, Haiku boots in exactly ten seconds from the bootloader menu to a ready to be used desktop. Shutting down the operating system takes a full three seconds on the same virtual machine. Haiku also works on older machines and the boot time varies a couple of seconds worth with a 500MHz processor and 256 SDRAM. With just 358MB of harddrive space occupied by the default installation, Haiku does not need a SWAP partition like Linux but instead it can use a SWAP file for virtual memory.

The native filesystem that Haiku uses is called BFS (Be File System) and is a fully 64-bit capable journaling file system. Just like EXT3 or XFS, it is case sensitive and can be used on media storage devices. Most importantly, BFS has support for extended file attributes (metadata) and has indexing and querying capabilities. In many ways, BFS acts like a relational database. BFS can handle up to two exabytes when it comes to file size limit. You can find BFS support in the Linux kernel under the name BeFS (for practical reasons, not to be confused with the UnixWare Boot File System that has the same abbreviation as Haiku's filesystem).

The operating system in itself has been developed in C++ and has an object-oriented API. The individual servers and APIs are known to BeOS users as “kits”. There's a Networking Kit that provides all the functionality needed for networking. There a MIDI Kit that deals with the MIDI protocol. The latter is also tied to the Media Kit that handles all things video and audio.

One of the differences between Haiku and other UNIX-like operating systems is the Translation Kit. This has nothing to do with language but instead is a collection of libraries that deal with specific image files. The Translation Kit is composed of modules, each designed to read, write, convert a certain graphic file format. To be able to view JPG files – for example – you need to download one of the JPEG Translator binaries and copy it in /boot/system/add-ons/Translators. Once you do that, there's no need to restart the Translation Kit server for the new settings to take effect. You'll be able to view JPEG files instantly, once the binary file is in it's place. Translation Kit libraries – also called “Translators” – are preinstalled for the most common image file types that vary from GIF to SGI to RAW. Translators can be downloaded separately from BeBits, the biggest repository of BeOS and Haiku software.

Haiku keeps things simple, with simple applications and simple configuration options. With a minimum of effort you can install or apply something and that something just works as it should – be it an application, system setting or search query.

The operating system focuses less on the command line since it's easier for the user to use the fast user interface. There is a BASH port in Haiku with a suite of common UNIX binaries like diff, tar, rm, route, grep, ssh or traceroute ready available. Like Linux distributions, BeOS also had a package system. PKG files could be installed with the help of SoftwareValet. There were no online repositories available at that time and the installer application itself could handle files only from the GUI perspective. Haiku has a project trying to bring back the days of the PKG files with a project that will be written in the Haiku API. Today, most of the software available for Haiku comes in ZIP packages, with many open-source projects being ported from Linux and BSD. Device drivers and applications alike. QEMU, ScummVM, HandBrake, the Realtek RTL8132 Family Driver are just a few of them.

Haiku's folder structure is somewhat different from the one we're used to see in Linux since the operating system was developed with the single user in mind.

Some may find it strange at first that a UNIX-like operating system has no multiuser access implemented. This is just another thing that separates Haiku from OS X, Solaris and Linux. Its folder structure may resemble Linux and OS X, it may have a BASH prompt, but at heart, Haiku is a single user operating system. The owner of the files will always be “baron” and the group you'll be in will always be “users”. This is because the developers wanted to use the UNIX-like structure but saw no need for multiuser access in the days of the BeOS.

Since it has no multiuser support, it has no /root folder, the current user being the one and only administrator of the system. The root of the filesystem holds the volume names. Everything is treated as a file, just like in Linux, only from a single user's perspective, volume names appearing as a disk in the root of the filesystem. The main disk volume is also called /boot and contains the /home folder, the /preferences and /system folders, the applications folder called /apps and other three system folders. The /develop folder, for example, holds the header files and system libraries needed for compiling binaries, the compiling tools and afferent documentation. By default, the /boot/home folder has the following simple structure:

/boot/home/config
/boot/home/mail
/boot/home/queries
.bash_history

Haiku keeps things organized in an effective manner, not piling up folders in the user's workspace folder. System files the non-technical user doesn't want to see are hidden away deep in other parts of the system.

/boot/home/config holds the user's configuration files and is similar to Linux's /usr/bin folder in many ways. This is the place where the user's screensavers reside, the Tracker add-ons, the Translator files, everything that belongs to the user. In Haiku, many of the files are symlinked to one another and many of the folders appear even two or three times in different parts of the system, in a well-thought but chaotic technical ecosystem.

There are two components that define the Haiku desktop: the Tracker and the Deskbar. From a Linux user's point of view, the Tracker is a crossbreed between Nautilus and GNOME itself. Nevertheless, it is more than a file manager and together with the Deskbar it forms the entire Haiku desktop component. The Tracker can manage file operations but can also decide how the volumes on the desktop are visible. It is a file manager but also an interface for some of Haiku's most-used system settings; like SVG (Simple Vector Graphics) icon size or access to the user Add-Ons (that could be better compared to Nautilus's script function). The Deskbar on the other hand integrates the Tracker and the Registrar, the latter handling the application processes.

Some applications also have the ability to detach themselves from their window and stick unto the desktop. They are called Replicants and you can identify them by the tiny arrow residing in the lower-right corner. You can drag this arrow and embed a copy of the application in the Desktop.

From the security point of view, being a single-user operating system built on an UNIX-like structure, Haiku does not yet pose a security risk. It's main use is for the desktop and there are next to no servers running on a Haiku operating system. Having a small userbase and being POSIX-compatible, there are no viruses for Haiku. The only thing that comes close to malware in Haiku would be a malicious BASH script or a logic bomb. There's no login screen to protect the user before reaching the desktop and this could be regarded as a risk. Risk that could be overcomed with the help of a library called Real Multi User or with third-party software like Lock Workstation.

The Tracker can manage extended attributes. In detailed file view mode, Tracker displays ID3 tags taken from MP3 files as editable attributes and it's a matter of a few clicks to add custom ones to multimedia files.

Another interesting thing about Haiku and the BFS filesystem is that – like I mentioned before – it acts like a database. Whenever you search for a file, a query file is formed that holds the search results for that specific query you made. You can later re-make that particular search by simply clicking on the file that's automatically saved in /boot/home/queries. The speed by which queries take place thanks to the BFS filesystem is simply amazing. You could compare it with how fast you get results from a pre-indexed Linux filesystem by the use of locate and updatedb. Queries can be manipulated and edited so that the entire search formula is displayed to the user in a true database manner. An old project called TrackerBase, developed by Scot Hacker, can take those query results and transpose them in HTML format by using only a native Haiku webserver called PoorMan's Webserver. You can better regard queries as a less powerful variation of an SQL server's results.

Generally, Haiku GUI applications have a very small memory footprint. This is a reminiscence from the BeOS R5 era (1998-2001) when most applications were simplistic and didn't require many resources to run. Things changed now in Haiku with the appearance of resource-hungry software like Firefox – and consequently – Haiku ports of those open-source applications. Haiku comes bundled with Firefox Bon Echo (version 2.0.0.21pre). BeZilla uses 52940KB of memory when opened. This really has an impact on the overall performance of the operating system that's used to lightweight software.

Haiku's goal was to maintain backwards compatibility with BeOS R5 binaries so that applications developed for the last version of BeOS could run without problems in Haiku. Sadly, since the development of BeOS ended in 2000, those third party applications running now in Haiku were developed for an age that ended ten years ago.

The operating system is currently sin Alpha stage, with a WebKit port and a WiFi stack prototype in the works. Unlike in Linux, where the developer base is ever-growing, the progress of the Haiku Project took time to reach this milestone, with a release candidate rumored to appear by the end of the year.

Being an open-source BeOS alternative, Haiku follows the same footsteps as the operating system Be Inc. developed. It stands apart from other projects like AtheOS, Syllable, QNX RTOS or MenuetOS because of it's long history. Sadly, given the lack of developers and with interest in BeOS fading over the years, the Haiku project has had a slow progress. That doesn't mean the progress wasn't steady.

Razvan T. Coloja is a 31 year old Romanian freelancer. He has published IT articles on Linux.com, Linuxforums.org, in Linux Magazine, Ubuntu User Magazine, MyLINUX, MyComputer and Connect Magazine. Currently he's working as a SEO expert for a webdesign company.

e p (13)    130 Comment(s)

Technology White Papers

See More