Operating System

By Kifayat Ullah Khan

Msc Computer Science

Chapter # 1

With out its software a computer is basically a useless lump of metal. With it’s software a computer can store, process, and retrieve information, display multimedia documents, search the Internet, and read or write information from or to database, and engage in many other valuable activities to earn it’s keep.

;Computer software can be divided in roughly two kinds.

(1).System Programs, which manages the operation of the computer itself.

(2).Application Programs, which perform the actual work the user wants. The most fundamental system program, is the operating system, which controls all the computer’s resources and provides the bases upon which the application programs can be written.

We view an operating system the program implemented in either software or firmware, that makes the hardware usable. Hardware provides "raw computing power", operating system makes this computing power conveniently available to users, and they manages the hardware carefully to achieve good performance. An operating system acts like an intermediatory layer between the user and the computer.

An operating system is first program loaded into computer’s main memory, when the machine(computer) is switched on. Some portion of the operating system remains in the computer’s main memory while the computer is running. Other portions of the operating system are swapped in and out of the memory when facilities are required by the user.

The size of the operating system depends upon the factors, the characteristics of the computer and the facilities it provides to the users, e.g. The operating system for a single user micro-processor would be relatively small and simple as compared to operating system for a large multi-user system.

A modern computer system consists of one or more processors, some main memory(RAM), disks, printers, Network interface cards and other Input / Output devices. All in all a complex system. Writing programs that keep track of all these components and use them correctly, let alone optimally, is an extremely difficult job. If every programmer had to be concerned with how disk drives work, and with all dozens of things that could go wrong when reading a disk block, it is unlikely that many programs could be written at all.

Many years ago it become abundantly clear that some way had to be found to shield programmers from the complexity of the hardware. The way that has evolved gradually is to put a layer of software on top of the bare hardware, to manage all parts of the system, and present the user with an interface or virtual machine that is easier to understand and program. This layer of software is the operating system


 

At the bottom is the hardware, which in many cases is itself composed of two or more layers. The lowest layer contains physical device, consisting of integrated devices. Next comes a layer of primitive software (on some machine) that directly controls these devices and provides a clean interface to the next layer. This software is called the microprogramme, is usually located in the ROM(Read Only Memory) for example, the microprogramm must determine where the numbers to added are located, fetch them, add them, and store the result some where. The set of instruction the micro programme interprets defines the machine language.

The machine language typically has between 50 to 300 instructions, mostly for moving data around the machine, doing arithmetic, and comparing values. In this layer I/O devices are controlled by loading values into special devices registers.

A major function of the operating system is to hide all this complexity and give the programmer a more convenient set of instruction to work with.

On top of the operating system is the rest of system software. Here we find the command interpreter, windows system, compilers, editors and similar application independent programs. It is important to realize that these programs are definitely not part of the operating system. The operating system is that portion of software that runs in ‘Kernel Mode’ or ‘Supervisor mode’. Compilers, editors, games and other application programs run in ‘user mode’. If a user does not like a particular compiler, he is free to write his own if he so chooses; he is not free to write his own disk interrupts handlers, while is part of the operating system and is normally protected by hardware against attempts by user to modify it.

Finally, above the system programs come the application programs. These programs are purchased or written by users to solve their particular problems, such as word processing, spread sheets, engineering calculations, computer games playing and may more.

A Quick Look At Operating System

In the begging, there was hardware.

Hardware

Computer hardware being what it is , it is pretty useless without explicit instruction to flow. Therefore with the development of the first computers came the first software programs. All of these programs were written in the machine’s numerical languages(no assembler languages and no high level languages).

These programs were developed by people (mathematicians, electronic engineers and physicists).,who work very closed to the electronic engineers, who built the first machine. Quit often they were the people who built the hardware. This relation between the programmer and hardware builders was necessary since the complete control of the machine was in the hands of the programmer. If they want to type a message on the console typewriter, then they had to provide the correct instruction sequence to do this task. If they want to read data from tape recorder, they had to issue the commands that started the tape recorder’s motor, enable the recorder read/write heads, read the data into intermediate buffer and finally, stop the motor. This took a great deal of knowledge about the peripheral devices.

Like a novice programmer’s first attempts at writing a BASIC program, the first programs were very rudimentary, aimed at finding out how the computer worked. Did it do what the engineers promised it would do? These programs were of use to anybody other than the scientists and engineer's interested in the operation of the computers.

The sophistication of the first programmers grew. Soon, software applications programs containing complex groups of instructions for the operation of the hardware

were written amortization tables, highly accurate mathematical calculation, population statistics. The computer user did not have to understand anything about the computer because the application software assumed the responsibility of running the hardware. The hardware, protecting the user from the rigors of the computer.

 

 

It soon become apparent the same groups of instructions were apparent that the same groups instruction were appearing in almost every program. These instructions groups usually were involved with the control of the input and output devices. he next trend was to isolate these routines and place them in a memory location where every application could get to them. More and more programs relied on these routines to request hardware services from the peripheral I/O devices. Another shell was developed around the hardware. This particular shell was growing between the application software and the hardware.

This development had come real advantages. First working and proven software was available for common tasks, and a programmer would not have to reinvent the wheel with every program. Second person without an education in electronics could program since he did not have to understand the details o operating the peripheral I/O equipment. It was only necessary to group the proper information together and call me of the resident I/O routines.

In put an output routines were not the only software procedures to be added to this middle shell. There were other commonly used software utilities that joined the I/O routines. These routines included such common utilities as a random number generator get the line, get the date, set the time and date and load and execute a task. The entire group of software is the foundation of an operating system. They are collectively called the kernel of the operating system.

Applications System.

At the same time, a duplicate action was taking place at the application program level. Instead of a group of well-used low-level routines being gathered a group of often-used application programs were being collected. The application included in this collection were utilities such as copy a file, delete a file, text editor, program debugger, and several other utilities. These utilities were useful took that exploited the capabilities of the kernel routines. Since they were tightly associated with the kernel software. it only sense that they be included with the operation system package.

All of the big computer companies had developed operating system for their line of computers. This worked out fairly well. To sell software an author only had to be sure that the host machine and operating system for the program was the same as the originating machine. This being true, the operating system kernel routines could be used to access the peripheral devices, regardless of small differences ( logical addresses, operating space on capacity) in the hardware. Moving application program to a machine of different make (different machine language) or operating system ( different kernel and interface) meant that the entire application program( at the machine language level) had to be recreated. If the new operating system kernel was lacking in some of the required routines, the programmer would have to write those routines to add to the application program. (This is one of the place where programming languages come into the computer scenario, and tend to mask the operating system differences). Wouldn’t it be nice if all of the interfaces to all of the operating system kernels were the same?

 

 

 

 

 

 

EMERGENCE OF STANDARD OPERATING SYSTEM.

With the introduction of the microprocessor and development of the personal computer. the operating system story takes another turn. We find the market loaded with many brands of home computers all of them using one or more processors from a small group of several computer's since they all use the same microprocessor (the same machine language)

However if every brand of computer used a different operating system, them, although programs would not have to be recreated to get the proper machine language they would have to be recreated to change the interfaces to the operating system kernel to perform I/O function. And what was once side task in a major job Software companies would be forced to keep a version of a program for every operating system on the market.

The inconvenience ( not to mention the danger ) of adapting software to several operating systems has caused the emergence of standard operating systems of the various microprocessors. With each microprocessor ( and family of personal computers) on the market, there is an identifiable standard operating system.

Having an operating system shell around the hardware ( which may have big differences in I/O devices) software authors can be confident that their works will be usable on any numbers of personal computers.

Well now you bought one of these PC and you received or bought an operating system with it. The manual talked about Copy, Erase, Format, an Dir. There was nothing about an operating system kernel. What is all of the about?

Remember that operating system is composed of two parts, the set of application utilities and the kernel. For the average user, knowledge about the application utilities ( copy Print, Dir. Format and others) is sufficient to get the computer to do useful work for you.