Operating Systems and UNIX - The Design
(Page 4 of 4 )
Of course UNIX, once you get down to details, is much more complicated that it seems at first sight. Yet we can represent the main idea of how it works quite easily. I made up a little picture to illustrate it better.

At the heart of the system is the kernel. This is the core of the OS and performs the most basic jobs. Items such as how to treat processes, how to allocate the memory and so on are all here. On the kernel is built the system functions. Whenever a command enters here, it will be told not only what to do, but where to do it from and how.
These functions are general ones and achieve tasks like how to print a line to the screen. Therefore, here you will find the implementation of functions known from C like printf (), scanf (), and so forth. On top of this comes the shell, which is a command interpreter. This assures communication with the kernel. When you enter a command, this is the place where it's decided what kernel and system functions should be called to execute it.
You can work with the shell already if you start up a terminal/Console. This is all done via text stream. This is what you get if you choose to not install a graphical interface. The GUI will be built on this in two levels. First comes the X-Window system, and on the top of it is one of the two user interfaces: GNOME or KDE. You can find KDE in Novell's OpenSuse Linux distribution or GNOME in Ubuntu.
Also built on the shell are the user commands. These also have two sub-types. It can be a system command, like the ls (for listing the files in the current directory), or applications (like OpenOffice, for instance).
This design allows you to easily separate tasks inside UNIX. In addition, the usage of tools is made easier. Tools brought a completely new philosophy into programming. Doug McIlroy said after creating pipes that "the philosophy that everyone started to put forth was 'Write programs that do one thing and do it well. Write programs to work together. Write programs that handle text streams, because that is a universal interface.'"
Now you know enough about UNIX to comprehend how everything clicks together to work with no flaws and as well as it can. Next week, I will start a series in which I will eventually introduce you to the basics of shell programming, so that you can automate most of the tasks inside a UNIX-based operating system.
Throughout this series, you will learn to consider the terminal as not a common enemy of users, but rather as a common friend of users and programmers together. Thank you for reading through my article and I ask you to make another effort and rate my article. If you have any kind of question, observation or anything you want to share with me, feel free to do so here in the blog comments of the article. I eagerly expect you reaction and remember to Live With Passion!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |