INTRODUCTION
An operating system is a program that is an intermediary between a user and the computer hardware. Different levels in a computer system are shown below.
An operating system provides an environment in which a user can execute programs. The purpose of an operating system is two fold:
· To make the computer system convenient to use.
· To use the computer hardware in an efficient manner.
A computer system consists of hardware, the operating system, application programs and users .
Hardware includes the central processing unit (CPU), memory and input / output (I/O) devices. These provide the basic computing resources. Application programs like compilers, database management systems, editors and many more allow users to use the hardware to solve their problems. The operating system controls and co-ordinates the use of the hardware among the various application programs of the various users. It provides an environment where software and data make use of the hardware in the computer system.
The operating system is a resource allocator. Many hardware and software resources are needed to solve a problem. These include CPU time, memory space, file storage, I/O devices and so on. The operating system as a manager of these resources, allocates resources to programs of users as required by the tasks. Since there is always a possibility of conflicts for resources because of more than one user requesting for resources, the operating system resolves the conflicts for efficient operation of the computer system.
The operating system as a control program controls the execution of user programs to avoid errors and improve use of the computer system.
A computer system has been developed to execute user programs there by making work easier for the user. But the bare hardware alone is not easy to use. Hence application programs are developed. These require certain common operations such as I/O device handling. The common functions of controlling and allocating resources are present in one piece of software – the operating system.
The primary goal of an operating system, that is convenience for the user is seen in small computers where as the secondary goal of efficient operation is important in large shared multi-user systems.
STORAGE STRUCTURE
Programs to be executed need to reside in the main memory. This is the memory that the CPU directly accesses. The main memory can be visualized as an array of bytes / words, each having its own address. Load / Store instructions allow movement of a word from the main memory to a CPU register and vice versa.
The Von-Neumann architecture brought in the concept of a stored program. The following is the sequence of steps in one instruction execute cycle:
Instruction execute cycle
Program and data are to be in the main memory for execution. Ideally they should reside there permanently, which is not possible because main memory
· is not all that big to hold all needed programs and data permanently.
· is volatile (contents are lost when power is turned off).
· cost is very high.
Secondary storage is an answer to the above listed problems. The main characteristics of secondary storage include
· large storage space
· Non-volatile or permanent storage
· Low cost
Thus program and data need to be loaded from secondary storage to main memory during execution. Common secondary storage devices include disks and tapes.
STORAGE HIERARCHY
The various storage devices differ in speed, cost, size and volatility (permanence of storage). They can be organized in a hierarchy. Shown below are some different levels of hierarchy .
As one moves up the hierarchy, the devices are expensive but fast and as we move down the hierarchy, the cost per bit of storage decreases but access times increases (devices are slow). There usually exists a tradeoff in the amount of storage required at each level in the hierarchy. Of the various storage devices in the hierarchy, those above the disks are volatile and the rest are non-volatile.
Thus the design of a computer system balances or makes a tradeoff of all the above factors namely speed, cost and volatility. It provides as much expensive volatile memory as necessary and as much inexpensive non-volatile memory as possible.