4 ms·
NetBSD has some goodies, too, by the way! proplib (property list library for kernel-userspace communication), RUMP (Rump Kernel - anykernel framework allowing
by johnisgood 1y ago
NetBSD has some goodies, too, by the way!
proplib (property list library for kernel-userspace communication), RUMP (Rump Kernel - anykernel framework allowing kernel code to run in userspace), Veriexec (verified exec integrity subsystem using cryptographic fingerprints), LFS (Log-structured File System - NetBSD maintains the only production LFS implementation), WAPBL (Write Ahead Physical Block Logging - metadata journaling), ATF (Automated Testing Framework - originated from NetBSD, now used across BSDs), etc. Feel free to check them out! Each one of them is interesting, IMO.
Beyond these specific features, NetBSD's real strength is its extreme portability (runs on over 50 hardware platforms, from VAX to ARM to obscure embedded systems), exceptionally clean and readable codebase, and pkgsrc (a portable package system that works across BSDs, Linux, and other Unix-like systems). I believe it makes NetBSD valuable not just as an OS, but as a reference implementation and research platform. The code quality and documentation are outstanding for anyone studying OS internals as well. :)
I noticed someone asked what NetBSD is. I am happy to break down the different BSD flavors (NetBSD, OpenBSD, FreeBSD, DragonflyBSD) and their unique features if that would be helpful!
- colonelspace 1y agoPlease do break down the differences.
- johnisgood 1y agoI could not hold myself back, so I already elaborated on OpenBSD and DragonflyBSD here (albeit it is non-exhaustive): https://news.ycombinator.com/item?id=45714491 https://news.ycombinator.com/item?id=45714491 :D I left out FreeBSD from that comment, which has its own set of innovations: Capsicum (capability-based security framework), Jails (OS-level virtualization/containerization which predates Docker by over a decade), MAC Framework (Mandatory Access Control for fine-grained security policies), GEOM (modular disk I/O framework), Linuxulator (Linux binary compatibility layer), ZFS (FreeBSD has arguably the best ZFS implementation outside of Solaris), bhyve (type-2 hypervisor), and so forth. Userland tools include iocage/bastille (jail managers), poudriere (package building), jemalloc (default allocator which focuses on fragmentation avoidance and scalability) among many others. Each BSD really does have its own character. FreeBSD leans toward performance and production use, OpenBSD toward security and correctness, NetBSD toward portability and clean design, DragonflyBSD toward alternative SMP approaches! (illumos/OpenIndiana is quite interesting, too (see DTrace, Doors IPC, Zones, SMF, Contracts, Event Ports, RBAC)).
- cyberpunk 1y agoFreeBSD uses OpenZFS (which was previously called ZoL (ZFSOnLinux), afaik) -- so it's the same implementation as e.g ubuntu.
- johnisgood 1y agoOpenZFS was not previously called ZoL. It was one implementation that later merged into the OpenZFS project. And sure, technically both FreeBSD and Ubuntu use OpenZFS codebase now, but FreeBSD has in-tree, native kernel integration, whereas Linux has DKMS modules that are separate from mainline kernel, AND FreeBSD had ZFS since 2007 (18 years) and is considered more mature, whereas Linux's stable ZFS is much newer. Additionally, some features work better on FreeBSD, Boot-on-ZFS is more polished on FreeBSD, and there are performance differences, too. So my original claim is fine, though illumos is probably the actual best which is technically not Solaris anymore (even though it comes from OpenSolaris)... but as with always, you need history. Follow the timeline. :P
- cperciva 1y agoI believe NetBSD also holds the record for the fastest kernel boot time for a general purpose operating system -- I held this record with FreeBSD with the system booting in about 23 ms but Emile got NetBSD down to 15 ms IIRC and I've been too busy to work on FreeBSD/Firecracker lately.
- johnisgood 1y agoInteresting! Both 23ms and 15ms are lightning fast. Have you written about it anywhere in more detail?
- cperciva 1y agoI gave a talk about FreeBSD on Firecracker at bsdcan a few years ago. Sorry I'm on my phone just before an orchestra concert so I can't give you a link but if you Google "BSDCan Colin Percival Firecracker" you should find it on YouTube.
- johnisgood 1y agohttps://www.youtube.com/watch?v=MT3cdeuRTzs https://www.youtube.com/watch?v=MT3cdeuRTzs - Porting FreeBSD to Firecracker by:Colin Percival?
- cperciva 1y agoYup that's the one.
- dlcarrier 1y agoI watched that video when it was published, and really enjoyed it, as well as most of the BSDCan presentations. I subscribed to the YouTube channel, but there any other similar conventions that you would recommend? I've found that the Chaos Communication Congress presentations are hit and miss, but BSDCan presentations are quite regularly succinct and entertaining.
- 1y ago
- bitwize 1y agoNetBSD has the neat property that it's possible for a halfway decent C programmer to learn kernel programming from the man pages alone. The documentation is that good. FreeBSD and especially OpenBSD may also share this property, but NetBSD is my go-to OS to tinker with.
- johnisgood 1y agoFor sure! I agree. OpenBSD has great man pages as well. :)
- LargoLasskhyfv 1y agoLFS... production?
- johnisgood 1y ago> The Log-Structured File System (or LFS) is an implementation of a log-structured file system (a concept originally proposed and implemented by John Ousterhout), originally developed for BSD. It was removed from FreeBSD and OpenBSD; the NetBSD implementation was nonfunctional until work leading up to the 4.0 release made it viable again as a production file system. And this was in 2007.
- LargoLasskhyfv 1y agoISTR you have read the mailing list archives at the times. And anything about LFS was most some syncer/scrub/clear/fsck not working whyever. I thought of NILFS2 on Linux as more practical. (meanwhile, didn't test, used btrfs instead)
- LargoLasskhyfv 1y agos/I seem to recall I have read the mailing list archives at the times...