Functions of Operating System

In this article, we will discuss the functions of operating system. We will discuss how the operating system acts as a resource manager, provides security, manages storage, etc. So, let’s get started. But first, let’s recap what an operating system is.

What is an Operating System?

An Operating System is an interface between the user (i.e. us who use the computer) and the hardware. It lets the user interact with the hardware via using some application programs (or simply applications like word, power-point presentation, etc.)

The primary goal of an operating system is human convenience. The way an operating system acts as an interface between the user and the hardware is shown below.

So, now that we have understood the meaning of an operating system, let us now study the functions of operating system.

Functions of Operating System

An operating system performs the following functions:

1. Execution of Programs

Programs can be of 2 types; user programs and system programs. The user programs are the tasks assigned by the user to the computer. For instance, when a user clicks a folder, he/she provides the task of opening that folder to the computer. The system programs are the programs that are operating system specific. For instance, when we delete a file, it gets backed up in the recycle bin, and it is not done by us. So, the operating system is responsible for program execution, be it user programs or system programs.

2. I/O Operations

One of the very basic functions of operating system is to handle the inputs and give outputs. So, the operating system is responsible for handling the inputs from all the devices, be it a mouse or a keyboard or a writing tab, etc. Also, it is the responsibility of the operating system to ask the appropriate device to return the output. For instance, if we click on a folder, the input is the mouse click and the output should be displayed on the desktop whereas if we print something, we should get the correct print from the printer.

3. Allocation of Resources

An operating system is responsible for the allocation of resources to different processes. There are different processes running and waiting in a processor. It is one of the most important functions of an operating system to allocate and deallocate the resources from the processes so that there is no conflict between them.

4. Security and Protection

A very basic example of security can be seen when we start our laptops/PCs or even phones. It asks us to enter a password. However, security and protection are more than just entering a password using the device. There can be some processes that might harm the other process only. So, for this, we need inter-process security also. This is also provided by the operating system.

5. Process Management

Process Management is one of the most important functions of operating system. We all open more than one application on our devices. For instance, let us say that we have to write an article. So, we open Microsoft word for it. Now, if we want to get some ideas about the article that we are going to write, we open Google Chrome. So, we open 2 apps together. We can even open a music app and work while listening to the music. However, the processor is able to handle only one process at a time.
We don’t realize this because of the speed of Context Switching. Context Switching means that the processor keeps on switching between the processes very fast and it appears to us as if multiple programs are running together. An operating system is responsible for this context switching and it achieves this using various CPU Scheduling Algorithms like Shortest Job First (SJF), Round-Robin, Priority Scheduling, etc.

6. Memory Management

Memory management is one of the most important functions of operating system after process management. Basically, through process management, we manage the order and nature of Context Switching, however, through memory management, the operating system manages the way memory is utilized by these different processes. A process can only be executed if some part of the main memory (RAM) gets allocated to it. A process gets some main memory allocated when it requests it and the part of the main memory occupied by this process gets deallocated when the process terminates.
This allocation and deallocation of the main memory are managed by the Operating System only.

7. Storage Management or File Management

The terms storage management and memory management can be confusing a lot of times. However, let us clarify the difference between these 2 terms. The term memory management refers to the main memory allocation and deallocation management by the OS. However, storage management refers to secondary storage management.
As we see in our devices, the operating system divides the data into files and directories (folders). The folders can contain more folders and files. So, the operating system is responsible for managing this secondary storage, knowing the exact division of the storage and the locations of files and directories on the disk.

8. Application Management

Apart from the system software, there are other application software installed in a device. For instance, a user interacts with Google Chrome which is an application software installed on the device by the user. An operating system makes it possible for the user to interact with these application software smoothly by acting as a layer between the hardware and these application software.

9. Error Handling

One of the functions of operating system is to detect, prevent and report errors. For instance, it might happen sometimes that we try to open a file or a folder and we get the message with some particular hex code that a particular DLL is not present. An example is shown below.

So, this is a part of error handling by the operating system. It is reporting the error so that the user can rectify this error by downloading the required DLL file and can then start the application.

10. Taking Care of the System Health

One of the most underrated functions of operating system is taking care of the system’s health. Troubleshooting problems for improving overall performance is one of the most important factors in the System’s Health.

So, these are the different functions of operating system. Although there can be a lot more large and small functionalities of an operating system, these are the major 10 functions of operating system that we have talked about. We hope that you have understood the functions of operating system and have liked the discussion too. We hope to see you again soon at PrepBytes.

Leave a Reply

Your email address will not be published. Required fields are marked *