BASIC COMPUTER ENGINEERING

Q. 3. Write the functions of operating system and explain its types.

Answer :

Ans. The main functions performed by the operating system are –

(i) Process Management – This module takes care of the creation and deletion of processes, scheduling of various system resources to the different process requesting them, and providing mechanisms for synchronization and communication among processes.

(ii) Memory Management – This module takes care of the allocation and deallocation of memory space to the various programs in need of this resource.

(iii) File Management -- This module takes care of file related activities such as organization, storing, retrieval, naming, sharing, and protection of files.

(iv) I/0 Devices Management – This module takes care of I/O devices to be used in efficient manner.

(v) Security – This module of an operating system protects the resources and information of a computer against destruction and unauthorized access.

(vi) Command Interpretation - This module of an operating system takes care of interpreting user commands and directing the system resources to handle the requests.

In addition to these major functions, an operating system also performs few other functions such as keeping an account of users (or processes) use how much and what kinds of computer resources, maintenance of log of system usage by all users, and maintenance of internal time clock.

Types of Operating System

The operating systems can be divided into the following six major categories -

(i) Batch Processing Operating Systems – The batch operating systems are capable of executing only one job at a time. The jobs or programs submitted by different users are grouped into batches with similar needs and are run through the computer as a group. The jobs in the batch are processed on the first-come-first-serve basis. After getting an appropriate command from the operator, the batch operating system starts executing the jobs one by one. The execution of a particular job generally involves three major activities, which are reading the job from the input device, executing the job by the system and printing the calculated result on to the output device.

The main advantages of batch processing operating systems are -

(a) The computer systems having the batch operating systems were very efficient because the idle time for these systems was very small.

(b) These operating systems facilitated the execution of jobs in an organised manner.

The main disadvantages of batch operating systems are –

(a) The jobs are executed on the basis of their arrival not as per their priority.

(b) The debugging of a program at execution time is not possible in these operating systems.

(c) The executing jobs may enter an infinite loop, as each job is not associated with a proper timer.

(ii) Multi-user Operating Systems - The multi-user operating systems enable multiple users to use the resources of a computer system at the same time. This means that, it allows a number of users to work simultaneously on the same computer system. A multi-user system is usually implemented by following the multi-terminal configuration. In this type of configuration, a single powerful computer system is connected to multiple terminals through serial ports. This computer system is responsible for processing the different requests generated by the various terminals at the same time. The devices connected with the various terminals are keyboard, mouse, and monitor. The central computer system is equipped with a fast processor and a memory of large capacity for catering to the multiple requests of the end users. Examples of multi-user operating systems are Unix, Linux, Windows 2000 and VM-386.

 The main advantages of the multi-user operating systems are -

(a) It allows the resources of the computer system to be utilized in an efficient manner.

(b) It enhances the overall productivity of the various users by providing simultaneous access to the various computer resources.

The main disadvantages of the multi-user operating systems are –

(a) The configuration of the computer system having multiuser operating system is complex and thus, is difficult to handle and maintain.

(b) This type of system may result in an inconsistent data if the activities of one user are not protected from another user.

(c) This type of operating system is needed to have robust security mechanisms.

(iii) Multi programmed Systems – The most important aspect of job scheduling is the ability to multi programs. In general, a single user cannot keep either the CPU or the I/O devices busy at all times. Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute. The idea is to keep several jobs in memory simultaneously. The operating system picks and begins to execute one of the jobs in the memory.

Eventually, the job may have to wait for some task, such as an I/O operation to complete. In a non multi programmed system, the CPU would sit idle. In a multiprogramming system, the operating system simply switches to, and executes, another job. When that jobs needs to wait, the CPU is switched to another jobs, and so on. Eventually, the first job finishes waiting and gets the CPU back. The CPU is never idle, as long as at least one job needs to execute.

(iv) Time-sharing Systems – Multi programmed, batched systems provided an environment where the various system resources were utilized effectively, but it did not provide for user interaction with the computer system. Time sharing or multitasking is a logical extension of multiprogramming. The CPU executes multiple jobs by switching among them but the switches occur so frequently that the users can interact with each program while it is running.

A time-shared operating system allows many users to share the computer simultaneously. Each action or command in a time-shared system tends to be short, so only a little CPU time is needed for each user. As the system switches rapidly from one user to the next, each user is given the impression that the entire computer system is dedicated to his/her use, however, it is being shared among many users.

A time-shared operating system uses CPU scheduling and multiprogramming to provided each user with a small portion of a time-shared computer. Each user has at least one separate program in memory. A program loaded into memory and executing is called as a process. When a process executes, it executes for only a short time before it either finishes or needs to perform I/O.

Time-sharing operating systems are more complex than multi programmed operating systems. In both, several jobs must be kept simultaneously in memory, so the system must have memory management and protection. Examples of multitasking operating systems are Unix, Linux, Windows 2000, and Windows XP.

The main advantages of multitasking operating systems are –

(a) It helps in increasing the overall performance of the computer system.

(b) It helps in increasing the overall productivity of the user by allowing a number of tasks at the same time.

 The disadvantages of multitasking operating systems are –

(a) A large amount of memory is needed to execute several programs at the same time.

(b) Some mechanism needs to be implemented to ensure that the activities of one process do not interfere with the activities of another process.

(v) Real-time Operating Systems – Real-time operating systems are used in environments where a large number of events, mostly external to the computer system, must be accepted and processed in a short time or within certain deadlines. Such applications are industrial control, telephone switching equipment, flight control, and real-time simulations.

The real-time operating systems can be of two types – hard real-time operating system and soft real-time operating system.

(a) Hard Real-time Operating System – These operating systems guarantee that critical tasks be completed within a certain range of time. For example, a robot is hired to weld a car body, if robot welds too early or too late, the car cannot be sold , so it is a hard real-time system that require to complete car welding by robot hardly on the time.

(b) Soft Real-time Operating System - This operating system provides some relaxation in time limit. For example - Multimedia systems, digital audio system etc.

Examples of real-time operating systems are M'TOS, Lynx, RTX.

The advantages of the real-time operating systems are -

(a) It is easy to design and develop and execute real-time applications under real-time operating system as compared to other types of operating systems.

(b) They are more compact than other operating systems. Thus, these systems need less memory space.

The disadvantages of real-time operating systems are -

(a) It is mainly focused on optimizing the execution time of an application and thus, it sometimes overlooks some of the other critical factors related to the overall efficiency of the computer system.

(b) It is only used for providing some dedicated functionality, and hence, cannot be used as a general-purpose operating systems.

(vi) Multiprocessor Operating Systems - The multiprocessor operating system allows the use of multiple processors (i.e., CPUs) in a computer system for executing multiple processes at the same time. Therefore, these systems provide faster execution of processes than computer systems performing multiprocessing with a single CPU.

Examples are Unix, Linux, Windows 2000.

The advantages of multiprocessor operating systems are as follows –

(a) It helps in improving the overall performance and throughput of the computer system.

(b) It helps in increasing the reliability of the computer system.

The disadvantages of multiprocessor operating systems are as follows –

(a) The cost of the computer systems having multiprocessor operating systems is very high.

(b) A large amount of memory is needed for executing several user programs.

(vii) Embedded Operating Systems – These are somewhat similar to real-time operating systems. The embedded operating system is installed on an embedded computer system, which is mainly used for performing computational tasks in electronic devices. These operating systems provide limited functionality that is needed for the corresponding embedded computer.
Examples are Palm OS and Windows CE.

The advantages of embedded operating systems are –

(a) These operating systems allow the implementation of embedded systems in an efficient manner.

(b) The computer system employing embedded operating systems is easy to use and maintain.

The disadvantages of embedded operating systems are — :

(a) Only some specific operations can be performed with these operating systems.

(b) These operating systems cannot be used in frequently changing environments.


RGPV