Jim Mohr's SCO Companion

Index

Copyright 1996-1998 by James Mohr. All rights reserved. Used by permission of the author.

Be sure to visit Jim's great Linux Tutorial web site at http://www.linux-tutorial.info/

Introduction to Operating Systems


Operating System Layers

Previous: Files and Directories

Conceptually, the SCO UNIX operating system is similar to an onion. It consists of many layers, one on top of the other. At the very core is the interface with the hardware. The operating system must know how to communicate with the hardware or nothing can get done. This is the most privileged aspect of the operating system.

Because it needs to access the hardware directly, this part of the operating system is the most powerful as well as the most dangerous. What accesses the hardware is a set of functions within the operating system itself (the kernel) called device drivers. If it does not behave correctly, a device driver has the potential for wiping out data on your hard disk or "crashing” your system. Since a device driver needs to be sure that it has properly completed its task (such as accurately writing or reading from the hard disk), it cannot quit until it has finished. For this reason, once a driver has started, very little can get it to stop. We'll talk about what can stop it in the section on the kernel.

Above the device driver level is what is commonly thought of when talking about the operating system. Here are the management functions. This is where the decision is made about what gets run and when, what resources are given to what process and so on.

In our previous discussion on processes, we talked about having several different processes all in memory at the same time. Each gets a turn to run and may or may not get to use up its time-slice. It is at this level that the operating system determines who gets to run next when your time-slice runs out, what should be done when an interrupt comes in and where it keeps track of the events that a sleeping process may be waiting on. It's even the alarm clock to wake you up when you're sleeping.

The actual processes that the operating system is managing are at levels above the operating system itself. Generally, the first of these levels is for programs that interact directly with the operating system, such as the various shells. These interpret the commands and pass them along to the operating system for execution. It is from the shell that you usually start application programs such as word processors, databases, or compilers. Since these often rely on other programs that interact directly with the operating system, these are often considered a separate level.

Under SCO UNIX, there are many sets of programs that serve common functions. This includes things like mail or printing. These groups of related programs are referred to as "System Services." Whereas individual programs such as vi, custom or fdisk are referred to as utilities. Programs that perform a single function such as ls or date are referred to as commands.


Figure 0-6 Operating System Layers

Moving On

Okay. So, you now have an understand of the basics of how SCO UNIX works. We talked about the different functions that the operating system is responsible for, what it manages and a little about how everything fits together. As we move on through the book, we'll build on these ideas and concepts to give you a understand of a complete SCO UNIX system.

I do need to make one general comment about UNIX before I let you move on. Always remember that UNIX is not DOS. Nor is it any other operating system for that matter. UNIX is UNIX and SCO UNIX is SCO UNIX. As you go through this book, keep that it mind.

I came from the DOS world before I started on UNIX. I had many preconceptions about the way an operating system "should" behave and react. The way DOS did thing was the "right" way. As I learned SCO UNIX I began to see a completely different world. The hardest part was not that I had to learn a whole new set of commands, but rather I was fighting myself since I was so used to DOS.

For example, I believed that the way command were given arguments or options was better in DOS. Every time I used a UNIX command, I would grumbled about how wrong it was to do things like that. As I learned more about UNIX, I came to realize that many of the decision on how things work or appear is completely arbitrary. There is no right way of doing many things. There is a DOS way and a UNIX way. Neither is right. You might be used to the DOS way or whatever system you use. However, that does not make it right.

If you are fairly new to UNIX, while you are reading this book you should keep in mind that there are many differences. The way UNIX does them is not the same DOS does them. If you are new to SCO, also keep in mind that there are going to be differences. If you keep this in mind, you will have a much more enjoyable time learning about the SCO way.


Next: Basics of SCO UNIX

Index

Copyright 1996-1998 by James Mohr. All rights reserved. Used by permission of the author.

Be sure to visit Jim's great Linux Tutorial web site at http://www.linux-tutorial.info/