Operating Systems for Students

There are a large number of different operating systems out there, including everything from expensive, industrial strength systems to small hobbyist projects. If you’re a computer user, you’re bound to find something out there that you can put to use. But what if you aren’t just a user or even a hobbyist? What if you are a serious computer science student interested in knowing what makes an operating system tick? While there a large number of excellent books on the subject, the best way to learn (as with most things related to computers) is to do it yourself. But writing a whole operating system, or even the kernel by yourself isn’t an easy thing to do, especially if you’re starting from scratch. Most programmers will agree that a very good way to learn programming, any sort of programming, is to read other people’s code, understand what makes it ticks, and then use some of those principles in your own projects. This isn’t hard for small pieces of software, but an operating system, even the kernel, isn’t a small piece of software. Most of the kernels out there, even the smaller ones are rather complicated pieces of code. They’ve probably been in development for years, with large groups of people contributing lots of different code. If you’re new to kernel development, looking at the Linux or BSD kernels probably isn’t a good way to start learning. So what do you do?

Enter Minix. Minix is a UNIX clone, but it has been made with students in mind. Minix 1 and 2 were made by Andrew Tanenbaum exclusively for students to  go along with his book: Operating Systems: Design and Implementation. Minix 3, is still geared towards students, but is also being made usable as a day-to-day system for low resource computers. What makes Minix3 good for students is that it is compact. The whole of the kernel (it uses a microkernel design) fits into just 4000 lines of executable code. The rest of the system runs in user mode, and in case you want to take a look at those parts too, you can do so just as easily. Minix has a fully modularized design, which means that you can tinker with one small part without having to worry too much about breaking everything else.

Even though Minix is for students, doesn’t mean that is unusable as a proper operating system. Over 400 UNIX programs have been ported including a graphical X window system and networking capabilities using TCP/IP. As for programmers, there is a native C compiler and the shell, ash supports scripting. There are also interpreters for BASIC, Perl and Python (though the Python interpreter is very out of date). That should be enough to let you tinker around and learn something useful. While you’re at it, you might want to get the book as well, especially if you don’t know anything about operating systems.

However if you want something that is still in the early stages of development, but has a clear game plan, you might want to take a look at Fiwix, a project geared towards producing a kernel compatible with Linux while keeping students in mind. Like I said, it’s in its early stages so you could learn a lot if you hang around. The Google Directory on operating systems has a few listings for educational operating systems, and some of the might be worth taking a look at. But please do not jump into the world of operating systems without an adequate knowledge of C/C++ and a good grounding in operating system theory or you might find out that you bit of more than you can chew.

Living at the Command Line

The modern computer desktop, irrespective of what software or hardware you are running, is a mostly graphical environment. However there was a time, not so long ago, when the good old text-based command line was every computer user’s best friend (and occasionally worst enemy). While the command line may no longer be in vogue, it is still possible to do most tasks with nothing more than a humble text interface (and a good keyboard of course). Most of this article will be dealing with tools that are easily available for UNIX derivatives (Linux and BSD). If you’re a Mac user, then you’ll be able to find a terminal tucked into your Utilities folder. Most UNIX commands should work without a hitch. You will probably want to use Fink to install the software that I will mention here. For Windows users, Cygwin would be the best bet: it gives you a fully UNIX-like environment including support for most open-source UNIX tools. However you might have to dig through documentation a bit to install everything properly. On the other hand, if you don’t want to turn your Windows box into a UNIX clone, try Windows Power Shell, and if you do, please write back to me about it. Now, on with the show:

File Management: Strictly speaking, your command-line shell provides all that you need for file management. The shell provides you a host of various commands to let you view, search and manipulate files. These commands aren’t actually part of the shell; they are different programs that the shell calls up just like it would call up any other program. In case you do need something more than what the command line can give you, the best option I can give you is Midnight Commander. It has been around for a long time and is often considered a classic. It has two panes, and has a pseudo-graphical look about it thanks to ncurses. It also supports renaming whole groups of files at a time and can work with popular archive formats (such as tar) as if they were normal directories. You can also use it as FTP and SFTP client. It’s available for both Windows and Linux.

Text-editing: The command line is where text-editing is started and it should come as no surprise that you have a multitude of options to choose from. The good old powerhouses of Emacs and Vi are close at hand and though both have a bit of a learning curve (okay, a lot of a learning curve), it’s well worth it if you are determined to become a command line wizard.

Music: Just because you’re hell-bent on living at a command-line doesn’t mean that you have to give up all the pleasures in life. Music is one of the pleasures you get to keep. Most people today have enormous MP3 collections and it would be an awful waste if you couldn’t get to them without a GUI. For a long time, mp3blaster was the program of choice for command-line geeks who wanted to listen to music while their figures were busy tapping away. But now there is something even better: the music player daemon. This relatively new piece of great software sits in the background and will play music irrespective of whether you’re at a GUI or CLI, and is good news if you often switch between the two. If you’re using any well-maintained Linux or BSD distribution, this should be in your software repository. Once you have it installed, you’ll need a frontend to help you actually select and play music. The best one for us would be ncmpc, the feature rich, yet very simple to use ncurses front end. It also supports various formats like MP3, OGG and FLAC, so you aren’t tied to MP3s only.

Internet: The net today is a very graphical environment, but that doesn’t mean that it’s completely inaccessible to command line lovers. There are a number of text-based browsers out there such as w3m, Lynx and Links, you’ll probably want to try them out yourself before making a choice. For email, you can’t go wrong with Mutt, a mail client which depends on other UNIX mail software to give you a very flexible and very efficient mail setup. Once again, there is a learning curve, but if you are a heavy duty emailer (hundreds of emails a day) the effort will be well worth it. As for IM, I recommend CenterICQ. Don’t let the name fool you, it supports multiple protocols like AIM, ICQ, Yahoo, IRC and Jabber (and hence Gtalk) and there is plugin available which allows to use MSN as well.

Living at the command-line isn’t an easy thing to do in today’s world, and quite frankly, I wouldn’t recommend it for a long period of time. But if you just need a break for a while from all the clicking and dragging, give the above programs a whirl. The best part is that even when you have to come back to the world of GUI, you can bring your lessons back with you and use the various terminal emulators around to get some command-line magic to work alongside your daily GUI.