Functions of an Operating System

Functions of an Operating System


An operating system has variety of functions to perform. Some of the prominent functions of an operating system can be broadly outlined as:

Processor Management: This deals with management of the Central Processing Unit (CPU). The operating system takes care of the allotment of CPU time to different processes. This is called scheduling. Two types of scheduling techniques are employed by an operating system :

  • Priority Scheduling: Each task is given CPU time according to the priority assigned to that task. The program with higher priority will be given CPU time before a program with lower priority. The CPU executes the task till it is completed or there is some interrupt request i.e. till the time operating system has to stop (interrupt) the current task due to an unavoidable job request. The major drawback of Priority scheduling is that even a small job has to wait for a long time when a long duration job with higher priority is being executed.
  • Round Robin Scheduling: This type of scheduling technique is also known as Time Sharing Scheduling. In this, each program or task is given a fixed amount of time to execute. The CPU continues with the execution till either the allotted time is over or there is some interrupt request or the task is completed before the allotted time. If the task is not completed at the end of the allotted time, it is put at the end of the queue. So each task gets its allotted share of CPU time. This scheduling technique improves the response time and provides an interactive environment. Hence time sharing operating system is very useful in network environment as each user is allowed to share the network resources.

Device Management: The Operating System communicates with hardware and the attached devices and maintains a balance between them and the CPU. This is all the more important because the CPU processing speed is much higher than that of I/O devices. In order to optimize the CPU time, the operating system employs two techniques - Buffering and Spooling.

  • Buffering: In this technique the temporary storage of input and output data is done in Input Buffer and Output Buffer. Once the signal for input or output is sent to or from the CPU respectively, the operating system through the device controller moves the data from the input device to the input buffer and for the output device to the output buffer. When the signal is sent to/from the operating system to the respective device controllers, the program doesn’t wait rather it returns to its processing. In case of input, if the buffer is full, the operating system sends a signal to the program which processes the data stored in the buffer. When the buffer becomes empty, the program informs the operating system which reloads the buffer and the input operation continues. Similarly for output when the program being executed has to display some output, it fills the buffer and then informs the operating system. Thereafter the operating system empties the buffer by sending data to the output device and in the meantime the program fills another buffer. This technique is called overlapped processing. This is because while the operating system reloads one buffer, the executing program doesn’t stop as it is able to retrieve/fill data from/in another buffer.

  • Spooling (Simultaneous Peripheral Operation on Line): This is a device management technique used for processing of different tasks on the same input/output device. Say for example there are various users on a network sharing the same printer. At one point of time more than one user might give print command. The speed of the printer is very slow as compared to the CPU processing. So the operating system temporarily stores the data of every user on the hard disk of the computer to which the printer is attached. The individual users need not wait for the printing process to be complete. Instead the operating system sends the data from to hard disk to the printer one by one.

Memory management: In a computer, both the CPU and the I/O devices interact with the memory. When a program needs to be executed it is loaded onto the main memory till the execution is complete. Thereafter that memory space is freed and is available for other programs. The common memory management techniques used by the operating system are Partitioning and Virtual Memory.

  • Partitioning: The total memory is divided into various partitions of same size or different sizes. This helps to accommodate number of programs in the memory. The partition can be fixed i.e. remains same for all the programs in the memory or variable i.e. memory is allocated when a program is loaded on to the memory. The later approach causes less wastage of memory but in due course of time, it may become fragmented.

  • Virtual Memory: This is a technique used by the operating system by virtue of which the user can load the programs which are larger than the main memory of the computer. In this technique the program is executed even if the complete program is not loaded on to the main memory. The operating system divides the main memory into equal sizes called pages. A part of the program resides in the main memory and is called the active set. The rest is in the secondary storage device in the form of tracks/sectors or blocks. With the help of Page Map Tables (PMT), the operating system keeps track which page of main memory is storing which block of secondary memory. A virtual address (which is not the real physical address) is mapped either to the main memory or the secondary memory. Hence virtual memory allows more programs and even larger programs to be executed in the main memory leading to efficient memory utilization.

File Management: The operating System manages the files, folders and directory systems on a computer. Any data on a computer is stored in the form of files and the operating system keeps information about all of them using File Allocation Table (FAT). The FAT stores general information about files like filename, type (text or binary), size, starting address and access mode (sequential/indexed sequential/direct/relative). The file manager of the operating system helps to create, edit, copy, allocate memory to the files and also updates the FAT. The operating system also takes care that files are opened with proper access rights to read or edit them.

Qus. What are various categories of software?

Ans: Software are classified into following categories –

(i) System Software

a. Operating System

b. Language Processor

(ii) Application Software

a. Packages

b. Utilities

c. Customized software

d. Developer Tools


Qus. What is the difference between an interpreter and a compiler?

Ans:

Interpreter: Interpreter is a type of system software that translates and executes instructions written in a computer program lini-by-line, unit by unit etc. It is slower in execution because each time when you run the program translation is required.

Compiler: Compiler is another type of system software that translates and executes instructions written in a computer program in one go. Once compiled program need not to translate again so it works faster.


Qus. What is application software? Why it is required?

Ans: Application software is the set of programs necessary to carry out operations for a specific task. Such as for word processing there are many application software like MS-Word, Wordpad etc. These software are required to perform special task using the computer like painting, recording, typing, data handling etc.


Qus. What is system software?

Ans: The software that controls internal computer operations is called system software. It manages all the resources of a system. Its example is Operating System.


Qus. Discuss the role of utility software in the context of computer performance?

Ans: Utilities are those application programs that assist the computer by performing housekeeping functions like backing up disk or scanning/cleaning viruses or arranging information etc. its example is Antivirus software.


Qus. What is the importance of an OS?

Ans: An operating system is a program which acts as an interface between a user and the hardware. It manages all the resources of the computer system. It provides and environment to the user to work with. All the application are installed after the operating system is installed. It manages memory, processing, storage, memory etc.


Qus. What is the utility of these software?

(a) disk fragmentor (b) backup software

Ans:

(a) disk fragmentor: A file is fragmented when it becomes too large for your computer to store in a single location on a disk. When this happens, your computer splits the file up and stores in pieces. You can use fragmented files, but it takes your computer longer to access them.

(b) Backup software: This utility program facilitates the backing-up of disk. Back-up means duplicating the disk information so that in case of any damage or data-loss, this backed-up data may be used.


Qus. Describe the role of Operating System as a resource Manager.

Ans: A computer system has many resources (hardware and software), which may be require to complete a task. The commonly required resources are input/output devices, memory, file storage space, CPU etc. The operating system acts as a manager of the above resources and allocates them to specific programs and users, whenever necessary to perform a particular task. Therefore operating system is the resource manager i.e. it can manage the resource of a computer system internally. The resources are processor, memory, files, and I/O devices. In simple terms, an operating system is the interface between the user and the machine.

Operating System Management Tasks

1. Processor management which involves putting the tasks into order and pairing them into manageable size before they go to the CPU.

2. Memory management which coordinates data to and from RAM (random-access memory) and determines the necessity for virtual memory.

3. Device management which provides interface between connected devices.

4. Storage management which directs permanent data storage.

5. Application which allows standard communication between software and your computer.

6. User interface which allows you to communicate with your computer.


Qus. What are the advantages of parallel computing?

Ans: Parallel computing is a type of computation in which many calculations or the execution of processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. It refers to the simultaneous working of multiple processors to solve a computational problem. Its advantages are –

(i) It saves time and the cost too.

(ii) It makes easier to solve larger or complex problems.

(iii) It provides efficient use of underlying hardware.

(iv) It can utilize the resources available remotely.

Programs

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad