Introduction to the FreeBSD Open Source Operating System LiveLessons
Article Index
Introduction to the FreeBSD Open Source Operating System LiveLessons
Lessons 4-9; Conclusion

Author: Marshall Kirk McKusick
Publisher: Addison-Wesley Professional
Available from  Informit at $239.99
ISBN: 978-0134305868
Related to print: 0321968972
Format: Downloadable Video
Audience: Engineers, kernel developers, academics, students
Rating: 5
Reviewer: Nikos Vaggalis

If you want to know about FreeBSD is this the way to do it?

Marshall Kirk McKusick is no stranger to the world of FreeBSD. Well equipped with a Master's as well Doctoral degree in Computer Science and past president of the Usenix Association, he has overseen the development and release of BSD 4.3B and 4.4 as well as co-authored Design and Implementation of the FreeBSD Operating System, which is now in its 2nd Edition:

 

 


This live lesson video lecture not only adds to the material presented in the book but goes far beyond, looking into FreeBSD's, and consequently UNIX's architecture, from the inside out.

The presentation is totally lecturer centric and bare bones with little more to show than a few static power-point slides. There is no animation, no code demonstration, no bells and whistles - it is just the presenter.

In other words, it's a traditional lecture transposed into video, something that defies the purpose and facilities provided by the electronic format and interactive multimedia.

 

2

 

Further, despite not being  'live' in front of an audience, the recording seems to have been shot in a single long take with no cuts and repeats as on some occasions you can clearly witness faltering when the speaker loses his stride. The post production  adds only the very basics - the default Live Lesson theme and short introductions to the beginning of each chapter.

But, and this is a big BUT, due to the tutor's deep knowledge and huge hands-on experience on the topic, there is a high level of cohesion and consistency. Everything is examined in detail carrying the essence effectively across, therefore making the lecture easy to follow despite the material being highly technical and difficult to master.

Lesson 1 starts off by going through the runaway BSD versions OpenBSD, NetBSD and FreeBSD, and after a brief historical resumé we gather that the BSD project proves resilient to time being one of the few  projects going strong for over 20 years (another one is Perl, I would add!). The instructor shares the recipe of that success, mainly the ability to remain immune to both leadership change and abandonment

We also get to know where it differs from Linux, mainly Linux is desktop focused while FreeBSD is server focused and used by many big name companies who route their data through servers running on it, therefore rightly winning the title 'backbone of the internet'.

Most of the time you can use the terms Linux and  FreeBSD interchangeably as the latter has an emulation mode that runs any binary built for the former. That aside, it really comes down to copyright and licenses, GNU Copyleft vs BSD. The Linux Kernel is GPL2 and much of the code surrounding the distro like the gcc compiler are GPL 3, thus you run the risk of potentially handing over your code. For this reason companies wanting to keep their proprietary code to themselves chose the liberal BSD license, which comes with a drawback for the community in it is not required to contribute the code changes and enhancements back to the core project. However, people soon enough discover that it's more beneficial to them to actually contribute the code back to the main project, therefore making FreeBSD one of the most well backed open source projects

In this chapter we also learn that we can look at BSD not just as an OS but also as a huge collection of programs and utilities that can run on a multitude of CPU architectures, equivalent to Linux and its GNU userland,

The project's structure and organization, as well as its release policy and  release types, are expanded on while the democratic roots of running the project are highlighted, noting that any commiter can run for the seven-member final decision committee which is elected every two years.

Lesson 2 is where real lecture on FreeBSD's architecture begins.
It is said that the kernel can be seen as being two distinct pieces;
a system for distributing processes and a giant IO switch. This lesson focuses on the former aspect of the kernel and the parts it's comprised of. It covers CPU time aka Scheduling, the asynchronous events and how they abstract the user application from that something happening in the hardware such as a network packet arriving or a file getting read, which allow the application to subscribe to notifications and set callbacks upon them. Next, Memory and the I/O abstractions supplied by the I/O descriptors are covered. Thanks to them you get to write and read without dealing with the actual hardware.

This lesson takes a bird's eye view at all those general principles pertaining to any modern Operating System and not just to FreeBSD, which are examined in greater detail in subsequent lessons. So while the lecture is focused on FreeBSD it does expand beyond it and can be considered as first class material on  Operating System Architecture.

In fact many Colleges around the world,like the Syracuse Computer Science Department have integrated McKusick's 'The Design and Implementation of the FreeBSD Operating System' into their curriculum, so why not do the same with this video lecture that goes far beyond a book's illustrations, explaining matters fluently with plenty of time and space at its disposal?

Even at this very early stage, the tutor's experience and professionalism become apparent as he navigates like it's second nature through the concept of processes, the way memory works and the facilities offered by the I/O descriptors.

A flashback into history brings the many benefits of the Unix revolution to surface. For example that for the first time in history any number of processes were allowed to be run simultaneously, as till that moment the system administrator had to decide on the number of processes allowed at boot time, like a rule carved in stone.There even was a job description language called JCL for coordinating the processes, until another breakthrough enabled the OS to do the bookkeeping automatically so the user could focus on his real job, which was writing and running  programs in the process space. 


History like that makes you appreciate the things we now take for granted....
 

The next thing topic is how user space applications interface with the kernel through system calls. System calls and library calls are just subroutine calls, but a system call has to trap into the Kernel and is thus ten times more expensive.

Further, the kernel has to do process synchronization and transaction processing when there is a system call. For example, a process that reads from a file must be coordinated with a process writing to the file,  the kernel playing the role of the middle man enforcing locking as the means of guaranteeing consistency.

Next, Lesson,3, is again on processes, but goes into more detail now looking separately into their components, such as an executable's memory text and data segments, the heap and the stack, pipes, sockets, streams, and much more  

To follow along, a good CS background is needed as one has to be familiar with the general concept and terminology presented.  

 

3procres



Last Updated ( Sunday, 31 January 2016 )