Introduction to Operating System By Dr. Manish Bansal
Introduction to Operating System OS is a System Software. Operating System is a interface between user and computer hardware The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner. It provides the basic environment to run various application programs.
OS Definitions Def1: An operating system is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware. Def2: A more common definition is that the operating system is the one program running at all times on the computer (usually called the kernel), with all else being application programs. Def3: An operating system is concerned with the allocation of resources and services, such as memory, processors, devices, and information. The operating system correspondingly includes programs to manage these resources, such a scheduler, memory management module, I/O programs, and a file system etc.
Operating System as Resource Manager Hardware Consists of CPU, ALU, Memory, I/O Devices It is a set of special softwares which interacts between user Programme and hardware for better utilization of hardware It is a set of system and user programs where user interacts directly
Types of OS Batch OS Multiprogramming OS Time Sharing OS Parallel OS Distributed OS Real-time OS
Batch OS In this type of system, there is no direct interaction between user and the computer. The user has to submit a job (written on cards or tape) to a computer operator. Then computer operator places a batch of several jobs on an input device. Jobs are batched together by type of languages and requirement. Then a special program, the monitor, manages the execution of each program in the batch. The monitor is always in the main memory and available for execution.
Batch OS Advantages and Disadvantages Advantages: 1. Suppose a job takes a very long time(1 day or so). Then, such processes can be performed even in the absence of humans. 2. They doesn't require any special hardware and system support to input data. Disadvantages: 1. It is very difficult to debug batch systems. 2. Lack of interaction between user and operating system. 3. Suppose an error occurs in one of the jobs of a batch. Then, all the remaining jobs get affected i.e ; they have to wait until the error is resolved. 4. CPU is ideal because of slow speed of I/O devices.
Multiprogramming OS Multiprogramming OS increased CPU utilization by keeping multiple processes in memory simultaneously. Operating system picks up and begins to execute one of the jobs from memory. Once this job needs an I/O operation operating system switches to another job (CPU and OS always busy). Jobs in the memory are always less than the number of jobs on disk(Job Pool). If several jobs are ready to run at the same time, then the system chooses which one to run through the process of CPU Scheduling . In Non- multiprogrammed system, there are moments when CPU sits idle and does not do any work. In Multiprogramming system, CPU will never be idle and keeps on processing.
Time Sharing OS Time sharing OS is a logical extension of Multiprogramming OS. The CPU executes multiple jobs by switching among them. Each task is given some time to execute, so that all the tasks work smoothly. Each user gets time of CPU as they use single system. The time that each task gets to execute is called quantum. It is generally very short e.g. 1ms that is why the response time is very shout in TS-OS After this time interval is over OS switches over to next task. If the jobs are busy in performing I/O then CPU will be busy in processing other jobs in memory as per quantum fixed, unlike multiprogramming where CPU switched to other job when one process went for I/O.
Distributed OS These types of operating system is a recent advancement in the world of computer technology and are being widely accepted all-over the world and, that too, with a great pace. Various autonomous interconnected computers communicate each other using a shared communication network. Independent systems possess their own memory unit and CPU. These are referred as loosely coupled systems or distributed systems. These system’s processors differ in size and function. The major benefit of working with these types of operating system is that it is always possible that one user can access the files or software which are not actually present on his system but on some other system connected within this network i.e., remote access is enabled within the devices connected in that network.
Distributed OS Adv. And Dis. Adv. Advantages of Distributed Operating System: Failure of one will not affect the other network communication, as all systems are independent from each other Electronic mail increases the data exchange speed Since resources are being shared, computation is highly fast and durable Load on host computer reduces These systems are easily scalable as many systems can be easily added to the network Delay in data processing reduces Disadvantages of Distributed Operating System: Failure of the main network will stop the entire communication To establish distributed systems the language which are used are not well defined yet These types of systems are not readily available as they are very expensive. Not only that the underlying software is highly complex and not understood well yet
Parallel Systems Multiprocessor systems are also known as parallel systems or tightly coupled systems. Such systems have more than one processor in close communication, sharing the computer bus, clock and sometimes memory and peripheral devices. Here, the task is divided into subparts and these subparts are then distributed among the available processors in the system. Parallel processing completes the job on the shortest possible time.
Parallel Systems
Parallel System Advantages Increased Throughput : By introducing multiple processors more work is done in a less time. Economy of Scale : Parallel systems save money because of sharing common hardware. E.g. its cheaper to store data on one disk if several programs operate on the same set of data. Increased Reliability : In parallel system functions are properly distributed among several processors, if one processor fails then whole system will not be halted only gets slow down.
Real Time OS Real time system means that the system is subjected to real time, i.e., response should be guaranteed within a specified timing constraint or system should meet the specified deadline. For example: flight control system, weather forecasting system etc. Types of real time systems based on timing constraints: Hard real time system: This type of system can never miss its deadline. Missing the deadline may have disastrous consequences. The usefulness of result produced by a hard real time system decreases abruptly and may become negative if tardiness increases. Tardiness means how late a real time system completes its task with respect to its deadline. Example: Flight controller system. Soft real time system: This type of system can miss its deadline occasionally with some acceptably low probability. Missing the deadline have no disastrous consequences. The usefulness of result produced by a soft real time system decreases gradually with increase in tardiness. Example: Telephone switches.