Introduction to Operating Systems

Download document (in English): WORD, PDF

 

I, Definition and types

The operating system (OS) can be considered as the most important program that runs on a computer. Every general-purpose computer must have an operating system to provide a software platform on top of which other programs (the application software) can run. It is also the main control program of a computer that schedules tasks, manages storage, and handles communication with peripherals. The central module of an operating system is the 'kernel'. It is the part of the operating system that loads first, and it remains in main memory. Because it stays in memory, it is important for the kernel to be as small as possible while still providing all the essential services required by other parts of the operating system and applications. Typically, the kernel is responsible for memory management, process and task management, and disk management.

In general an application software must be written to run on top of a particular operating system. Your choice of operating system, therefore, determines to a great extent the applications you can run. For PCs, the most popular operating systems are Windows 95/98, MS-DOS (Microsoft-Disk Operating System), OS/2, but others are available, such as Linux, BeOS…

For large systems, the operating system has even greater responsibilities and powers. It is like a traffic cop: it makes sure that different programs and users running at the same time do not interfere with each other. The operating system is also responsible for security, ensuring that unauthorized users do not access the system. From this point of view, operating systems can be classified as follows:

An OS is a 16-bit operating system if it processes 16 bits of data at once, e.g.: DOS. On the other hand, Windows 98 and OS/2 Warp are 32-bit operating systems because they can process 32 bits of data at once.

A network operating system (NOS) is an operating system which makes it possible for computers to be on a network, and manages the different aspects of the network. Some examples are Windows for Workgroups, Windows NT, AppleTalk, DECnet, and LANtastic…

II, Storage management

To manage storage, the operating system uses files. A file is a collection of data or information that has a name, called the filename. There are many different types of files: data files, text files, program files… Different types of files store different types of information and therefore the type of the file reflects its usage. In DOS, Windows 95 and some other operating systems, one or several letters are added at the end of a filename and they are called the extension. Filename extensions usually follow a period (dot) and indicate the type of information stored in the file. For example, in the filename EDIT.COM, the extension is COM, which indicates that the file is a command file.

The operating system has a file management system to organize and keep track of files. Although all the operating systems provide their own file management system, you can install another file management system interacting with the operating system and providing more features, such as improved backup procedures and stricter file protection. The most commonly used file system is the hierarchical one that uses directories to organize files into a tree structure. There can be one tree structure per storage unit or one tree structure including all the storage units and representing by some special directories.

A directory is a special kind of file used to organize other files. It contains bookkeeping information about files that are, figuratively speaking, beneath them. You can think of a directory as a folder or cabinet that contains files and, perhaps, other folders. In fact, many graphical user interfaces use the term folder instead of directory.

Computer manuals often describe directories and file structures in terms of an inverted tree. The files and directories at any level are contained in the directory above them. The topmost directory is called the root directory. A directory that is below another directory is called a subdirectory. A directory above a subdirectory is called the parent directory.

To access a file, you may need to specify the names of all the directories above it, that is to say specify its access pathname (short: path). The absolute path of a file is le list of the names of all the directories above it from the root. The operating system also keeps track of the directory in which you are currently working. Pathnames that do not start with the root directory are assumed by the operating system to start from the working directory; they are relative paths. Each operating system has its own rules for specifying paths. In DOS systems, for example, the root directory is named '\', the parent directory can be referred as '..' , and each subdirectory is separated by an additional backslash. In UNIX, the root directory is named /, and each subdirectory is followed by a slash. In Macintosh environments, directories are separated by a colon.

So for example valid DOS absolute paths for the two files of the figure 1 are:

\DOS\Example.txt and \Other\Mine\Account.xls

Now if the working directory is '\Other', DOS relative paths are:

..\DOS\Example.txt and Mine\Account.xls

A wildcards character is a special symbol that stands for one or more characters. Many operating systems and applications support wildcards for identifying files and directories. This enables you to select multiple files with a single specification. For example, in DOS and Windows, the asterisk (*) is a wild card that stands for any combination of letters and the question mark is a wild card that stands for any single letter. The file specification 'm*' therefore refers to all files that begin with m. Similarly, the specification 'm*.doc' refers to all files that start with m and end with .doc. Many word processors also support wild cards for performing text searches.

 

Different operating systems impose different restrictions on filenames. Most operating systems, for example, prohibit the use of certain characters (especially the wildcard) in a filename and impose a limit on the length of a filename (DOS limited files name to 8 characters and extension to 3 characters). Within a single directory, filenames must be unique. However, two files in different directories may have the same name. Some operating systems, such as UNIX and the Macintosh operating system, allow a file to have more than one name, called an alias, links or symbolic links.

When it opens a file the operating system assigns temporarily number to it which is called the file handle. The operating system uses the file handle internally when accessing the file. A special area of main memory is reserved for file handles, and the size of this area determines how many files can be open at once. For example in DOS and Windows, you can set the maximum number of open files with the FILES= statement in CONFIG.SYS file which contains some configuration parameters of the OS.

To locate files on a disk the operating system uses a table: The File Allocation Table (FAT). Due to fragmentation, a file may be divided into many sections that are scattered around the disk. The FAT keeps track of all these pieces. In DOS systems, FATs are stored in hidden files, called FAT files. VFAT is a short for Virtual File Allocation Table, the file system used in Windows for Workgroups and Windows 95. VFAT is the 32-bit version of the older 16-bit FAT and it supports long filenames. A new version of VFAT is available in Windows 95 OSR 2 and Windows 98: FAT32 that increases the number of bits used to address clusters and also reduces the size of each cluster. The result is that it can support larger disks (up to 2 terabytes) and better storage efficiency (less slack space).

NTFS is a short for NT File System, one of the file system for the Windows NT operating system (Windows NT also supports the FAT file system). NTFS has features to improve reliability, such as transaction logs to help recover from disk failures. To control access to files, you can set permissions for directories and/or individual files. NTFS files are not accessible from other operating systems such as DOS. For large applications, NTFS supports spanning volumes, which means files and directories can be spread out across several physical disks.

To prepare a storage medium, usually a disk, for reading and writing you have to format it. When you format a disk, the operating system erases all bookkeeping information on the disk, tests the disk to make sure all sectors are reliable, marks bad sectors (that is, those that are scratched), and creates internal address tables that it later uses to locate information. You must format a disk before you can use it.

III, User interface

Like the major part of software, the operating system has a user interface (UI). The UI is the part of a program that connects the computer with a human operator (user). There are also interfaces to connect programs, to connect devices, and to connect programs to devices.

The first and oldest type of interface is the command driven interface. It refers to programs and operating systems that accept commands in the form of special words or letters. In contrast, programs that allow you to choose from a list of options in a menu are said to be menu driven. Command-driven software is often more flexible than menu-driven software, but it is more difficult to learn because it implies to learn the command language. This language is a programming language through which a user communicates with the operating system or an application. For example, the DOS command language includes the commands DIR, COPY, and DEL, to name a few. The part of an operating system that responds to operating system commands is called the command processor. When the command prompt is displayed, the command processor is waiting for a command. After you enter a command, the command processor analyzes the syntax to make sure the command is valid, and then either executes the command or issues an error warning. Another term for command processor is command line interpreter.

A Graphical User Interface (GUI) allows you to enter commands by pointing and clicking at objects that appear on the screen. It takes advantage of the computer's graphics capabilities to make the program easier to use. Well-designed graphical user interfaces can free the user from learning complex command languages. On the other hand, many users find that they work more effectively with a command-driven interface, especially if they already know the command language.

Graphical user interfaces, such as Microsoft Windows and the one used by the Apple Macintosh, feature the following basic components:

The first graphical user interface was designed by Xerox Corporation's Palo Alto Research Center in the 1970s, but it was not until the 1980s and the emergence of the Apple Macintosh that graphical user interfaces became popular. One reason for their slow acceptance was the fact that they require considerable CPU power and a high-quality monitor, which until recently were prohibitively expensive.

In addition to their visual components, graphical user interfaces also make it easier to move data from one application to another. A true GUI includes standard formats for representing text and graphics. Because the formats are well-defined, different programs that run under a common GUI can share data. This makes it possible, for example, to copy a graph created by a spreadsheet program into a document created by a word processor ('copy-paste'). To do so, the operating system implements a clipboard which is a special file or memory area (buffer) where data is stored temporarily before being copied to another location.

The 'drag-and-drop' expression describes applications that allow you to drag objects to specific locations on the screen to perform actions on them. For example, in the Macintosh environment or in Windows 95/98, you can drag a document to the trashcan icon to delete it. When implemented well, drag-and-drop functionality is both faster and more intuitive than alternatives, such as selecting options from a menu or typing in commands.

click here or press the space bar