NetBSD explained

NetBSD is a freely available open source Unix-like computer operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley. It was the second open source BSD descendant to be formally released, after 386BSD,[1] and continues to be actively developed. The NetBSD project is primarily focused on high quality design, stability and performance of the system.[2] Due to its portability and Berkeley-style license, NetBSD is often used in embedded systems.[3] [4]

The current stable release of NetBSD is version 5.1.2 (February 11, 2012).

History

NetBSD was originally derived from the 4.3BSD release of the Berkeley Software Distribution from the Computer Systems Research Group of the University of California, Berkeley, via their Net/2 source code release and the 386BSD project. The NetBSD project began as a result of frustration within the 386BSD developer community with the pace and direction of the operating system's development.[5] The four founders of the NetBSD project, Chris Demetriou, Theo de Raadt, Adam Glass and Charles Hannum, felt that a more open development model would be beneficial to the project: one which was centered on portable, clean, correct code. Their aim was to produce a unified, multi-platform, production-quality, BSD-based operating system. The name "NetBSD" was suggested by de Raadt, based on the importance and growth of networks such as the Internet at that time, and the distributed, collaborative nature of its development.[2]

The NetBSD source code repository was established on March 21, 1993 and the first official release, NetBSD 0.8, was made in April, 1993.[6] This was derived from 386BSD 0.1 plus the version 0.2.2 unofficial patchkit, with several programs from the Net/2 release missing from 386BSD re-integrated, and various other improvements.[6] The first multi-platform release, NetBSD 1.0, was made in October 1994. Also in 1994, for disputed reasons, one of the founders, Theo de Raadt, left the project. He later founded a new project, OpenBSD, from a forked version of NetBSD 1.0 near the end of 1995.[7] In 1998, NetBSD 1.3 introduced the pkgsrc packages collection.[8]

Until 2004, NetBSD 1.x releases were made at roughly annual intervals, with minor "patch" releases in between. From release 2.0 onwards, each major NetBSD release corresponds to an incremented major version number, i.e. the major releases following 2.0 are 3.0, 4.0 and so on. The previous minor releases are now divided into two categories: x.y "stable" maintenance releases and x.y.z releases containing only security and critical fixes.[9]

Features

Portability

As the project's motto ("Of course it runs NetBSD" [2]) suggests, NetBSD has been ported to a large number of 32- and 64-bit architectures. These range from VAX minicomputers to Pocket PC PDAs. As of 2009, NetBSD supports 57 hardware platforms (across 15 different processor architectures). Although the Linux 2.6 kernel includes support for more processor architectures,[10] the NetBSD distribution supports more platforms than any single Linux distribution. The kernel and userland for these platforms are all built from a central unified source-code tree managed by CVS. Currently, unlike other kernels such as μClinux, the NetBSD kernel requires the presence of an MMU in any given target architecture.

NetBSD's portability is aided by the use of hardware abstraction layer interfaces for low-level hardware access such as bus input/output or DMA. Using this portability layer, device drivers can be split into "machine-independent" and "machine-dependent" components. This allows a single driver to be easily used on several platforms by hiding details of exactly how the driver accesses the hardware, and reduces the amount of work needed to port it to a new architecture.[11]

This enables, for instance, a driver for a specific PCI card to work whether that card is in a PCI slot on an IA-32, Alpha, PowerPC, SPARC, or other architecture with a PCI bus. Also, a single driver for a specific device can operate via several different buses, for example ISA, PCI, PC card, etcetera.

In comparison, Linux device driver code often needs to be reworked for every new architecture. As a consequence, in recent porting efforts by NetBSD and Linux developers, NetBSD has taken much less time to port to new hardware.

This platform independence aids the development of embedded systems, particularly since NetBSD 1.6, when the entire toolchain of compilers, assemblers, linkers, and other tools fully supported cross-compiling.

In 2005, as a demonstration of NetBSD's portability and suitability for embedded applications, Technologic Systems, a vendor of embedded systems hardware, designed and demonstrated a NetBSD-powered kitchen toaster.[12]

Commercial ports to embedded platforms, including the AMD Geode LX800, Freescale PowerQUICC processors, Marvell Orion, AMCC 405 family of PowerPC processors, Intel XScale IOP and IXP series, were available from and supported by Wasabi Systems.

Portable build framework

The NetBSD cross-compiling framework (also known as "build.sh" [13]) allows a complete NetBSD system for an architecture to be built from another system of different architecture (usually faster or with more hardware resources), even on a different operating system, since the framework supports most POSIX-compliant systems. Several embedded systems using NetBSD have required no additional software development other than toolchain and target rehost.[14]

The pkgsrc packages collection

NetBSD features pkgsrc (short for "package source"), a framework for building and managing third-party application software packages. The pkgsrc collection consists of more than 8100 packages as of .[15] Building and installing packages such as KDE, GNOME, the Apache HTTP server or Perl is performed through the use of a system of makefiles. This can automatically fetch the source code, unpack, patch, configure, build and install the package such that it can be removed again later. An alternative to compiling from source is to use a precompiled binary package. In either case, any prerequisites/dependencies will be installed automatically by the package system, without need for manual intervention.

pkgsrc supports not only the hardware platforms that run NetBSD, but also several other Unix-like operating systems, such as Linux, other BSD variants like FreeBSD, Solaris, Darwin/Mac OS X, IRIX, Interix and others. pkgsrc has also been adopted as the official package system for DragonFly BSD.[16]

Symmetric multiprocessing

NetBSD has had support for SMP since the NetBSD 2.0 release in 2004,[17] which was initially implemented using the giant lock approach. During the development cycle of the NetBSD 5 release, major work was done to improve SMP support; most of the kernel subsystems were modified to be MP safe and use the fine-grained locking approach. New synchronization primitives were implemented and scheduler activations was replaced with a 1:1 threading model in February 2007.[18] A scalable M2 thread scheduler was implemented, though the old 4.4BSD scheduler still remains the default but was modified to scale with SMP. Threaded software interrupts were implemented to improve synchronization. The virtual memory system, memory allocator and trap handling were made MP safe. The file system framework, including the VFS and major file systems were modified to be MP safe. Since April, 2008 the only subsystems running with a giant lock are the network protocols and most device drivers.

Security

NetBSD provides various features in the security area.[19] The Kernel Authorization framework[20] (or Kauth) is a subsystem managing all authorization requests inside the kernel, and used as system-wide security policy. It allows external modules to plug-in the authorization process. NetBSD also incorporates exploit mitigation features,[21] ASLR, MPROTECT and Segvguard from PaX project, and GCC Stack Smashing Protection (SSP, or also known as ProPolice, enabled by default since NetBSD 6.0) compiler extensions. Verified Executables (or Veriexec) is an in-kernel file integrity subsystem in NetBSD. It allows the user to set digital fingerprints (hashes) of files, and take a number of different actions if files do not match their fingerprints. For example, one can allow Perl to run only scripts that match their fingerprints.[22] The cryptographic device driver (CGD) allows using disks or partitions (including CDs and DVDs) for encrypted storage.[23]

Virtualization

The Xen virtual-machine monitor is supported in NetBSD since release 3.0. To use Xen, the system requires a special pre-kernel boot environment that loads a specialized Xen kernel as the "host OS" (known as Dom0). Any number of "guest OS" (known as DomU) virtualized computers, with or without (using "hypervisor" options) specific Xen/DomU support, can be run in parallel with the appropriate hardware resources.

With NetBSD 5, which greatly improves disk I/O and network I/O performance over NetBSD 4, some guest Operating Systems running under Xen are known to operate faster than when installed natively on the same hardware without NetBSD and Xen behind the scenes. The need for a boot manager, such as GRUB, was also eliminated with NetBSD 5's new built-in Xen-compatible configurable boot manager.[24]

User-space virtualization such as VirtualBox and QEMU are also supported on NetBSD.

Storage

NetBSD includes many enterprise features like iSCSI, a journaling filesystem, logical volume management and the ZFS filesystem.

The WAPBL journaling filesystem, an extension of the BSD FFS filesystem, was contributed by Wasabi Systems in 2008.[25]

The NetBSD Logical Volume Manager is based on a BSD reimplementation of a device-mapper driver and a port of the Linux Logical Volume Manager tools. It was mostly written during the Google Summer of Code 2008.[26]

The ZFS filesystem developed by Sun Microsystems was imported in to the NetBSD base system in 2009. Currently, the NetBSD ZFS port is based on ZFS version 13.

The CHFS Flash memory filesystem was imported into NetBSD in November 2011. CHFS is a file system developed at the Department of Software Engineering, University of Szeged, Hungary, and is the first open source Flash-specific file system written for NetBSD.

Compatibility with other operating systems

At the source code level, NetBSD is very nearly entirely compliant with POSIX.1 (IEEE 1003.1-1990) standard and mostly compliant with POSIX.2 (IEEE 1003.2-1992).

NetBSD also provides system call-level binary compatibility on the appropriate processor architectures with several UNIX-derived and UNIX-like operating systems, including Linux, other BSD variants like FreeBSD, Apple's Darwin, Solaris and SunOS 4. This allows NetBSD users to run many applications that are only distributed in binary form for other operating systems, usually with no significant loss of performance.[27]

A variety of "foreign" disk filesystem formats are also supported in NetBSD, including FAT, NTFS, Linux ext2fs, Mac OS X UFS, RISC OS FileCore/ADFS, AmigaOS Fast File System, IRIX EFS and many more through FUSE.

Licensing

All of the NetBSD kernel and most of the core userland source code is released under the terms of the BSD License (two, three, and four-clause variants). This essentially allows everyone to use, modify, redistribute or sell it as they wish, as long as they do not remove the copyright notice and license text (the four-clause variants also include terms relating to publicity material). Thus, the development of products based on NetBSD is possible without having to make modifications to the source code public. In contrast, the GPL stipulates that changes to source code of a product must be released to the product recipient when products derived from those changes are released.

On June 20, 2008, the NetBSD Foundation announced a transition to the two clause BSD license, citing concerns with UCB support of clause 3 and industry applicability of clause 4.[28]

NetBSD also includes the GNU development tools and other packages, which are covered by the GPL and other open source licenses. As is the case for the other BSD projects, NetBSD separates those in its base source tree, in order to make removal of code under more restrictive licenses easier. As for packages, the installed software licenses may be controlled by modifying the list of allowed licenses in the pkgsrc configuration file (mk.conf).

Releases

The following table lists major NetBSD releases and their notable features in reverse chronological order. Minor and patch releases are not included.

ColourMeaning
GreenRelease still supported
RedRelease no longer supported
Major releasesRelease dateNotable features and changes
5.1 [29] November 19, 2010
5.0 [30] April 29, 2009Rewritten threading subsystem based on a 1:1 model and rewritten scheduler implementation. Support for kernel preemption, POSIX real-time scheduling extensions, processor-sets, and dynamic CPU sets for thread affinity. Added jemalloc memory allocator. A metadata journaling for FFS, known as WAPBL (Write Ahead Physical Block Logging). Rewritten kernel modules framework, which will replace old LKMs. Use of X.Org rather than XFree86 by default for i386 and amd64 ports, and introduction of drm(4)/DRI for 3d hardware acceleration.
4.0December 19, 2007Added support for slab allocator, iSCSI target, CARP, tmpfs, Xen 3, the Kernel Authorization framework, Veriexec and other security extensions, and a Bluetooth protocol suite.[31]
3.0December 23, 2005Support for Xen 2.0 was added. Support for filesystems > 2 terabytes added. Pluggable Authentication Modules added. OpenBSD Packet Filter was integrated as an alternative to IPFilter. UFS directory hash support.[32]
2.0December 9, 2004Addition of native POSIX threads and SMP support on i386 and other platforms. AMD64 architecture added. Support for UFS2 and SMBFS, addition of kqueue.[33]
1.6September 14, 2002Unified Buffer Cache (UBC) was introduced, which unifies the filesystem and virtual memory caches of file data. Zero-copy support for TCP and UDP transmit path. Ten new platforms supported. New implementation of cross-building (build.sh) infrastructure. Added support for multibyte LC_CTYPE locales.[34]
1.5December 6, 2000IPv6 and IPsec were added to the network stack. OpenSSL and OpenSSH imported. New implementation of rc.d system start-up mechanism. Start of migration to ELF-format binaries. A ktruss utility for kernel tracing was added. Six new platforms supported, including SPARC64. Added FFS soft updates and support for NTFS.[35]
1.4May 12, 1999UVM, a rewritten virtual memory subsystem, was introduced. Added RAIDframe, a software RAID implementation, and imported IPFilter. Completion of the integration of all remaining 4.4BSD Lite-2 kernel improvements. Ports to Power Macintosh and NeXTcube/station systems added. Added full USB support.[36]
1.3March 9, 1998XFree86 source tree was made a supported part of the distribution. Support for ISA Plug and Play, PCMCIA, ATAPI and APM added. ext2fs and FAT32 filesystems added. The pkgsrc packages collection system was introduced.[37]
1.2October 4, 1996Support for NFSv3, SCSI scanner and medium changer devices added. NTP phase-locked loop added in kernel. Ports for ARM and Sharp X68k systems added.[38]
1.1November 26, 1995Ports for DEC Alpha, Atari TT/Falcon030 and MVME68k systems added. Binary emulation facility added. Generic audio subsystem introduced.[39]
1.0October 26, 1994The first multi-platform release, supporting the PC, HP 9000 Series 300, Amiga, 68k Macintosh, Sun-4c series and the PC532. Also in this release, the legally encumbered Net/2-derived source code was replaced with equivalent code from 4.4BSD-lite, in accordance with the USL v BSDi lawsuit settlement. Addition of shared libraries and Kerberos 5.[40]
0.9August 20, 1993Contained many enhancements and bug fixes. This was still a PC-platform-only release, although by this time work was underway to add support for other architectures. Support for loadable kernel modules (LKM).[41]
0.8April 20, 1993The first official release, derived from 386BSD 0.1 plus the version 0.2.2 unofficial patchkit, with several programs from the Net/2 release missing from 386BSD re-integrated, and various other improvements.[42]

Logo

The NetBSD "flag" logo, designed by Grant Bissett, was introduced in 2004 and is an abstraction of their older logo,[43] designed by Shawn Mueller in 1994. Mueller's version was based on the famous World War II photograph Raising the Flag on Iwo Jima, which some perceived as culturally sensitive and inappropriate for an international project.[44]

The NetBSD Foundation

The NetBSD Foundation is the legal entity that owns the intellectual property and trademarks associated with NetBSD,[45] and on January 22, 2004, became a 501(c)3 tax-exempt non-profit organization. The members of the foundation are developers who have CVS commit access.[46] The NetBSD Foundation has a Board of Directors, elected by the voting of members for two years.

Examples of use

NetBSD's clean design, high performance, scalability, and support for many architectures has led to its use in embedded devices and servers, especially in networking applications.

A commercial real-time operating system, QNX, uses a network stack which is based on NetBSD code,[47] [48] and provides various drivers ported from NetBSD.[49]

Force10 Networks uses NetBSD as the underlying operating system that powers FTOS (the Force10 Operating System), which is used in high scalability switch/routers.[50] Force10 also made a donation to the NetBSD Foundation in 2007 to help further research and the open development community.[51]

Wasabi Systems provides a commercial Wasabi Certified BSD product based on NetBSD with proprietary enterprise features and extensions, which are focused on embedded, server and storage applications.[52]

NetBSD was used in NASA's SAMS-II Project of measuring the microgravity environment on the International Space Station,[53] and for investigations of TCP for use in satellite networks.[54]

In 2004, SUNET used NetBSD to set the Internet2 Land Speed Record. NetBSD was chosen "due to the scalability of the TCP code".[55]

NetBSD is also used in Apple's Airport Extreme and Time Capsule products, instead of their own Mac OS X (which uses FreeBSD's userland) platform.[56] [57]

The operating system of the T-Mobile Sidekick LX 2009 smartphone is based on NetBSD.[58]

Hosting

Hosting for the project is provided primarily by the Internet Systems Consortium Inc, Columbia University, and Western Washington University. Mirrors for the project are spread around the world and provided by volunteers and supporters of the project.

See also

External links

Notes and References

  1. Web site: Open Sources: Voices from the Open Source Revolution. oreilly.com.
  2. Web site: About the NetBSD Project.
  3. Web site: Get to know NetBSD: An operating system that travels. ibm.org.
  4. Book: Embedded Hardware. 9780750685849. Ganssle, Jack G. Noergaard, Tammy. Eady, Fred. Edwards, Lewin. Katz, David J. 2007-09-14. pp. 291–292.
  5. Web site: The History of the NetBSD Project. www.netbsd.org. The NetBSD Foundation. 29 November 2009.
  6. So you say you want an interim release of 386bsd?. Chris G. Demetriou. 1993-04-19. 1qvpc9$1e8@agate.berkeley.edu. comp.os.386bsd.announce. 12 May 2010.
  7. Web site: Archive of the mail conversation leading to Theo de Raadt's departure. Theo. de Raadt. Theo de Raadt. March 29, 2009. January 15, 2010.
  8. Web site: Platforms supported by pkgsrc. www.netbsd.org. The NetBSD Foundation. 10 January 2010.
  9. Web site: NetBSD release glossary and graphs. January 13, 2010. The NetBSD Project. January 15, 2010.
  10. Web site: Myths, Lies, and Truths about the Linux kernel. Kroah-Hartman. Greg. July 23, 2006. June 11, 2007.
  11. Web site: Portability and supported hardware platforms. www.netbsd.org. The NetBSD Foundation. 29 November 2009.
  12. Technologic Systems Designs NetBSD Controlled Toaster. August 2005. June 11, 2007.
  13. Web site: Chapter 31. Crosscompiling NetBSD with build.sh. The NetBSD Guide. The NetBSD Foundation. January 10, 2010. January 15, 2010.
  14. Web site: BSD or Linux: Which Unix is better for embedded applications?. 2003. Wasabi Systems Inc.. PDF. June 11, 2007. December 30, 2006. http://web.archive.org/web/20061230075423/http://www.wasabisystems.com/pdfs/Linux_or_BSD.pdf.
  15. Web site: The pkgsrc-2008Q4 Release.
  16. PKGSRC will be officially supported as of the next release. Matthew. Dillon. DragonFly users List. August 31, 2005. January 15, 2010.
  17. Web site: NetBSD 2.0 release notes.
  18. Web site: Significant changes from NetBSD 4.0 to 5.0. December 23, 2009. January 15, 2010.
  19. Web site: NetBSD security(8) manual page.
  20. Web site: kauth(9). NetBSD Manual Pages. August 10, 2009. January 15, 2010.
  21. Web site: NetBSD paxctl(8) manual page.
  22. Web site: Chapter 19. NetBSD Veriexec subsystem.
  23. Web site: Chapter 14. The cryptographic device driver (CGD).
  24. Web site: boot(8). NetBSD Manual Pages. September 4, 2009. January 15, 2010.
  25. Patches for journalling support. Simon. Burge. March 2, 2008. tech-kern@NetBSD.org. January 15, 2010.
  26. HEADS UP NetBSD lvm support. Adam. Hamsik. August 29, 2008. tech-kern@NetBSD.org. January 15, 2010.
  27. Web site: NetBSD Binary Emulation. January 13, 2010. January 15, 2010.
  28. NetBSD Licensing and Redistribution. June 2008. June 20, 2008.
  29. Web site: Announcing NetBSD 5.1.
  30. Web site: Announcing NetBSD 5.0.
  31. Web site: Announcing NetBSD 4.0.
  32. Web site: Announcing NetBSD 3.0.
  33. Web site: Announcing NetBSD 2.0.
  34. Web site: Announcing NetBSD 1.6.
  35. Web site: Announcing NetBSD 1.5.
  36. Web site: NetBSD 1.4 Release Announcement.
  37. Web site: Information about NetBSD 1.3.
  38. Web site: Information about NetBSD 1.2.
  39. Web site: Information about NetBSD 1.1.
  40. Web site: NetBSD 1.0 release announcement.
  41. Web site: [ftp://ftp.netbsd.org/pub/NetBSD/misc/release/NetBSD/NetBSD-0.9 NetBSD 0.9 available for anon-ftp...].
  42. Web site: [ftp://ftp.netbsd.org/pub/NetBSD/misc/release/NetBSD/NetBSD-0.8 Installation notes for NetBSD 0.8].
  43. http://www.netbsd.org/images/NetBSD-old.jpg Old NetBSD logo
  44. Web site: NetBSD logo design competition.
  45. http://www.netbsd.org/foundation/ The NetBSD Foundation, Inc.
  46. Web site: NetBSD Developers. January 7, 2010. January 15, 2010.
  47. Web site: Third Party Open Source License Terms Guide. QNX Software Systems. December 27, 2011.
  48. Web site: Core Networking 6.4: Neutrino's Next Gen Networking Stack and Foundry27. PDF. QNX Software Systems. (registration required)
  49. Web site: Foundry27: Project Networking - Driver wiki page. QNX Software Systems. December 27, 2011.
  50. Force10 Networks uses NetBSD to build software scalability into operating system. February 13, 2007. Dell. December 27, 2011.
  51. Force10 Networks introduces unified operating system across product portfolio to lower total cost of owning and operating networks. January 28, 2008. Dell. December 27, 2011.
  52. Web site: Wasabi Certified BSD.
  53. Re: NetBSD/i386 and single board computers. Mary. Rivett. April 12, 1997. port-i386.
  54. Web site: HTTP Page Transfer Rates over Geo-Stationary Satellite Links. Hans. Kruse. Mark. Allman. Jim. Griner. Diepchi. Tran. yes. March 5, 1998. December 27, 2011.
  55. Web site: SUNET Internet2 Land Speed Record: 69.073 Pbmps. Börje. Josefsson. SUNET. April 14, 2004. December 27, 2011.
  56. Web site: How to jailbreak an Apple Time Capsule?. superuser.com. 27 December 2009.
  57. Web site: AirPort Extreme: Apple Breaks 90 Mbps. Fleishman. Glenn. February 16, 2007. wifinetnews.com. 28 December 2009.
  58. Web site: Sidekick LX 2009 / Blade Will Run NetBSD. January 30, 2009. www.hiptop3.com. February 5, 2009.