Computer Users Manual, Ministry of Foreign Affairs and Cooperation, Democratic Republic of East Timor
Chapter I: Hardware and Software
Chapter II: Networks and Communications
Chapter III: Operating SystemsBasic Concepts
Linux and MS-Windows
GNU Network Object Model Environment (GNOME)
Windows NT, Windows 2000 and Windows XP
MS-DOS and NTVDM
Bourne Again Shell (BASH)
Chapter IV: Applications
Chapter V: Basic Coding and Programming
Chapter VI: Basic System Administration
Appendicies: Ministry Policy
The concept of an Operating System has already been explained in the first Part of this manual, along with a brief description of some the key features of major operating systems for personal computers and in particular, those operating systems that are used within the Ministry of Foreign Affairs and Cooperation. This section will go into much greater detail about the operating systems that are in use at the Ministry but without a great deal of additional information on the conceptual or programming level - after all, this is a manual for end users, not for advanced computer operators and programmers. The treatment of operating systems here is not unlike the following section which looks at applications. Unlike the previous chapters, which were more orientated to explaining how a computer system works and what the various components are, this section will provide a lot more amount of immediate, "hands-on" information.
Nonetheless, some revisions and elaboration of the concepts are necessary and these are performed here. After all, the Operating System is what defines the experience of an end-user with a computer. It is the first piece of software that they use after a computer is turned on and it's the last software they use when the computer is turned off. It manages resources to the processor, memory, disk space and all other hardware. Through the user commands and automatic programs, it handles the manipulation of files and, perhaps most importantly, it provides a stable, consistent way for applications to deal with the hardware without each application having to know all the details of the hardware. An operating system can be defined as the set of utility programs that provide an interface between the hardware and applications.
As we've previously discussed Operating Systems can be defined along five dimensions: whether or not they are multiuser (mutiple users can run programs simultaneously), multiprocessing (a program can run on multiple CPUs simultaneously), multitasking (more than one program can run at a time), multithreading (different parts of a program can run concurrently), and realtime (responds to input instantly), Real-time operating systems tends to be used on scientific instruments and industrial systems - they have no real function in an office environment. Single-user, single-task operating systems were common in the 1980s and were exemplified by operating systems such as MS-DOS, whereas single-user multitasking operating systems, such as Windows98 are more common now. Multi-user operating systems can be found in the various variety of UNIX, including Linux. It is important thing to be aware of the difference between multi-user operating systems and single user networked systems. The former allows multiple users to use the same program simultaneously, whereas the latter shares resources.
When a computer is turned on, as mentioned in the first chapter, the first program to is the power-on self test (POST) that makes sure that the voltages are working, this follows by the execution of the ROM BIOS that conducts a check - in order - of the processor, memory, input/output addresses, interrupt request lines, direct memory access and Plug-n-Play devices, video adapters, and other adapters. Then the ROM BIOS searches for an operating system that will be located on the hard disk, a CD-ROM or (in sheer desperation) on a floppy disk. The bootstrap loader - a small utility with one function - loads the operating system to memory through the bootstrap loader and - assuming everything is working - the operating system will then run configuration files and any pre-established batch files.
A strange name which indicates the physical improbability of what it does. The term comes from the saying "to pull oneself up with your bootstraps". Nonetheless, bootstrap programs do work. It is perhaps a little unkind to say that the bootstrap program only does one thing as well - when it loads the operating system to the memory and some small driver programs that interface the various hardware subsystems. It also divides the computers memory to hold the operating system, user information and applications. It even establishes the data structures that will hold all the signals that various hardware and software components will send to each other as they compete for the system's resources.
All in all, quite a clever little program.
In general the tasks of operating systems fall into six categories; (i) processor management, (ii) memory management (iii) device management, (iv) i/o management (v) application interface and (vi) user interface. There are operating systems that do a lot more than this of course, but these six functions are basically the core of any operating system. Whilst this section will be concentrating on (v) and (vi) a brief look at all the functions is worthwhile.
With regards to processor their management, there are two issues. Firstly, to make sure that each process receives enough a share of the resources to function properly and secondly, to make sure that as many cycles as possible of the processor is used for actual processing. Processes are tasks which demand time and resources from the processors. They include applications of course, but also additional processes that applications themselves initiate. There are also numerous processes that run in the background of the computer without most users ever knowing that the even exist. Basically, the operating system has to queue individual tasks requested by each process according to the order and the priority of the task. This is easy enough in a single-tasking system, but one can imagine the complexity required for a multi-tasking system which at must give the appearance that multiple tasks are happening simultaneously. As one would imagine, in a multi-processor operating system the opportunity exists to divide these tasks among the multiple processors.
An operating system requires some processing cycles itself to perform the saving and swapping of registers, queues and stacks from applications and their process with the storage. However when a great number of processes are requesting processor cycles then the CPU can end up spending more of it's time engaging in saving information and swapping between processes rather than running applications. This slows the entire system down, sometimes even to a complete halt, and usually requires a user to kill some processes to bring some the demand on the CPU down. The reason that it is called "thrashing" is because it is typically recognizable by the sounds of the hard disk working furiously as it saves and collects data. Some operating systems minimize the prospect of thrashing by allowing for threads, a minimum process, to be dealt with by the CPU. Basically, these do not deals directly with CPU calculations, but not with any sort of I/O.
A primary cause of thrashing is when you run an operating system and applications which aren't really designed for the hardware that you're using. For example, if you run Red Hat Linux 8.0 that requires at least a 200 MHz Pentium II and 128 meg of ram on a machine that only has 96 meg of ram and is a 166 MHz Pentium II... Not that anyone would do that, would they?
When an operating system conducts memory management it must ensure that each process has enough memory, that it does not run into the memory space of another process and that the different types of memory are uses so each process can run most efficiently. In the first instance, this requires the operating system to set up memory ranges for the individual applications and processes according to block sizes, called pages). If the operating system makes the pages too small and the work on the CPU will be too intensive. If they're too big, it will be wasting memory. If however the operating system has run out of memory it will start moving information to the hard disk engaging what is called virtual memory management. The operating system also has to decide what sort of memory to use to complete a particular task. For example, when it's the high-speed cache, the main memory, or the secondary (the part of the hard disk being used as virtual memory).
In conducting device management, the key program for an operating system is the driver. This is the path between the hardware and the application. Most of a driver's function is about how to translate the electrical signals of the hardware to operating system and applications and how to translate the information received from the applications and operating system to electrical signals. Drivers are relatively independent to the rest of the operating system - in the previous chapter they were defined instead as part of the BIOS. The reason for this is that new driver programs can be added without requiring the rest of the operating system to be modified. Nonetheless, one usually finds quite an array of drivers with the installation disks that come with an operating system.
In managing input and output an operating system makes use of queues and buffers that take the stream of data from a device (such as a keyboard or mouse) and then releases them to the processor at a rate that the CPU can cope. The operating system will also manage the storage that a buffer or queue has and will instruct such storage facilities to take additional information from a device if storage is available. In providing an application interface, the operating system provides an environment, through application program interfaces (APIs) that allow programmers to utilize the functions of the computer without having to be aware of all the other details in the systems operation - especially those of the processor. The idea is to provide a series of high-level instructions through the API and let the operating system deal with the details.
Likewise in providing a user interface (UI) a consistent structure and appearance - an interface - is provided between the computer system and the user. These user interfaces can appear as a graphical structure, such is evident in the various types of Microsoft Windows, the Macintosh Operating System and the Linux user interfaces of Gnome and X-Windows, or they can appear as a command-line interface, such as MS-DOS or MS-NTVDM (Microsoft Virtual Dos Machine), or the various flavours of Unix command shells, of which BASH (Bourne-Again Shell) and C Shell. There is even an attempt (admittedly incomplete), called New Adventure Shell, that tries to portray the operating system interface as a dungeon maze where files represent treasure chests and with useful characters to help you on your "journey". It's pretty crazy, but it (mostly) works. Usually command line interfaces are more powerful than Graphic User Interfaces but the actual commands are less intuitive. If one does remember the commands however, they are significantly faster for many tasks and more reliable.
The utilities that make up the user interface are almost always a layer higher than the functions of the operating system that have been previously described. The core operating system functions usually reside in what is called the kernel. In some operating systems, such as various types of UNIX, the kernel _is_ the operating system. In others, there is an attempt to separate the functions. An example of the microkernel designs include Windows NT, QNX, and Mach and of the microkernel designs, Linux, MS-DOS and Windows95. Apple's Rhapsody and MacOS X put a microkernel on top of a microkernel. The advantage of microkernels is that they're very easy to transport to other hardware. The main disadvantage is that they're not always as efficient because of their (usually) modular design.
The major operating systems that are used throughout the world on personal computers include the various types of MS-Windows (MS-Windows v1-v3.x, Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP), the associated versions of MS-DOS, the different versions of the Macintosh Operating System, various distributions of the Linux operating system and other version of UNIX, IBM's OS/2 and OS/2 Warp, and Sun's JavaOS, The remainder of this chapter will only concentrate on those operating systems that are currently in use at the Ministry of Foreign Affairs and cooperation in order of use from Windows 98, Windows 2000, Windows XP, GNOME, MS-DOS, and BASH.
Types of users
A common feature on any network operating system or multiuser operating system is that there's different types of users. On the one hand there's the common, run of the mill, everyday user - which is nearly everybody. On the other extreme are Administrators (MS-Windows) or root (Linux) account holders. They have the responsibility for managing network system resources and, in the case, of multi-user machines, many of the configuration options. MS-Windows NT/2000 has several in-between steps, such as Account Operators, Backup Operators and Server Operators. Similar in-between accounts can be built in Linux.
Ministry of Foreign Affairs and Cooperation, GPA Building #1, Ground Floor, Dili, East Timor
Website code and design by Lev Lafayette. Last update August 20, 2003