Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Table of contents
What is an Operating System?
Types of Operating Systems
Why are Operating Systems Used?
Functions of Operating System
Process Management
Memory Management
Device Management
File Management
Job Priority
Control over System Performance
Handling I/O 
Handling and Logging of Errors
Services Provided by an Operating System
Frequently Asked Questions
What are the functions of OS?
What are the 5 main functions of an operating system?
What is OS and its types and functions?
Last Updated: Mar 27, 2024

Functions of Operating System(OS)

Author Saloni Singhal


The functions of an operating system (OS) cover a wide range of crucial duties that make it easier to manage and utilise computer resources effectively. It is crucial for controlling hardware resources, running programmes, and offering essential services. 

Functions of Operating System(OS)

How can such small units of a system carry out such extensive processing, and how can multiple processes coincide? If you have and are still curious, this blog will help you understand the concepts more clearly.

What is an Operating System?

An Operating System provides an interface for the user and hardware. It is in charge of running all the processes, Resource Allocation, CPU management, File Management, and many other tasks in our system. The purpose of an operating system is to provide an atmosphere to the user where they can execute programs easily and efficiently.

Some of the most used operating systems are as such:

  • Windows
  • macOS
  • Linux
  • iOS
  • Android
  • Unix
  • IBM z/OS

Types of Operating Systems

Let us look at some types of Operating Systems-

  • Batch Operating SystemThis type of OS does not interact with the system directly. A set of similar jobs is stored in the main memory. The next job gets assigned to the CPU only when the previous job is done. Read about Batch Operating System here.
  • Multiprogramming Operating System
  • The main memory consists of multiple jobs waiting for CPU access. The OS selects one of the processes and assigns it to the CPU. Now, if the process in execution is interrupted by an outside or internal factor process, it performs context switching, and another process in the queue is executed. In this way, we can utilize the CPU at max, and the user can do multiple tasks at once.
  • Multitasking Operating System
  • Multitasking OS allows the user to perform multiple tasks as a single user at a given time on one computer system. The switch is so rapid that the user gets the illusion that all the processes are running at the same time. 
  • Time-Sharing Operating System
  • In this system, processors simultaneously share time among multiple users. This time is referred to as quantum. Once the task is completed, the OS switch to the next task. The main goal of such systems is to reduce response time.
  • Real-Time Operating System
  • Real-Time OS is usually built for dedicated systems to accomplish specific tasks within the specified time. This time period is called response time.

Also see, Difference Between Bit and Byte

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job

Why are Operating Systems Used?

  1. An operating system provides a platform for users to run their software programs. It is designed to operate various tasks, such as controlling various tasks and execution, etc.
  2. Booting is the process of starting the computer. When the CPU is first switched ON, loading the OS to the main Memory to start the computer is booting. Hence, the OS helps start the computer when the power is switched ON.
  3. The OS helps to run more than one app on the computer. It plays a vital role while multitasking since it manages Memory and other devices.
  4. OS acts as an interface between computer software and hardware. It also acts as an interface for the user and the computer.
  5. All the data in the system is in the form of files which can be hard to access. The OS helps to manage these files on the system. Thus, it becomes easier for the user to access these files easily.
  6. The OS also helps to manage the main memory of the system. It allocates and deallocates memory for all the system tasks. 

Functions of Operating System

Let us look at some functions of Operating Systems-

Process Management

In a multiprogramming environment, when there are multiple processes queued, it is the job of the OS to decide the order in which process will have access to the processor and the time each process has for some event. This function of the operating system is known as process scheduling.

Process Scheduling is done using various algorithms. These scheduling are implemented using schedulers like pipelines where the process is scheduled.

  1. Long-term scheduler- It interacts between secondary and primary memory and decides the process that will be submitted for processing.
  2. Medium-term scheduler- It helps in rescheduling the process into the main memory, and the process can be continued from where it left off. 
  3. Short-term scheduler- It is the fastest scheduler that selects only those ready to execute processes. 

Memory Management

An operating system is responsible for managing the memory. Primary memory is fast but relatively small compared to secondary memory. This memory through which the CPU directly interacts with the operating system and keeps track of the memory used by a particular user in their program. i.e., The memory that has already been utilized and has not yet been used.

All the data is stored in the form of addresses. There are two types of addresses:

  1. Physical address- It is the real address where the data is stored in the memory.
  2. Logical address- This is an address given by the CPU.

The OS keeps track of these addresses. The process is loaded in the main memory for fast execution. This allocation can be of two types:

  1. Contiguous allocation- store in continuous location.
  2. Non-contiguous allocation- store in a non-continuous fashion. Paging and segmentation are used to allocate this type of memory.

For a detailed answer on how memory management is done by operating systems, you can refer to this blog.

Device Management

An operating system keeps track of all the devices connected to the system. It also decides how a particular device would be allocated to some process and how long. The vital function of OS is to ensure that all the devices are allocated efficiently and effectively.

File Management

A system contains a huge amount of data. Here, the operating system keeps track of where data is stored, user access settings, and the status of every file, along with managing and deleting files.

  1. Manage the file attributes, i.e., name, location, and size for a given file.
  2. Manage all the operations like opening, renaming, closing, and updating a file.
  3. Manage the directories which contain the info about the files.
    Also read - File management in operating system


Computer security is a very crucial aspect of any operating system. The better the security, the more reliable our system will be. It prevents unauthorized access to programs and user data. E.g., Modern operating systems use a firewall for security.

Operating systems provide access control mechanisms to limit who has access to what resources. The OS manages user access to files and folders through ownership and permissions. This makes it harder for unauthorised people to read, alter, or delete important files. Many operating systems come with built-in encryption features that guard data both while it's in transit and at rest.

Job Priority

It determines actions that should be done first in a computer system, so the OS assigns priorities to the given job. One with the highest priority will be executed first.

Managing job priorities is essential for maximising resource allocation, assuring responsive performance, and satisfying the needs of various activities or users.  Because activities are frequently time-sensitive, job priority is essential in real-time operating systems. Due to their strict time limits, these systems make sure that tasks with deadlines are given more priority.

Control over System Performance

The OS takes care of the activities of the computer system during multiple processes. This aborts the program having some errors. Thus, the operating system sends instant messages to the user for any unexpected error and helps improve the system's performance. 

Handling I/O 

The OS is responsible for handling inputs, i.e., from the keyboard, mouse, desktop, etc. It ensures that all kinds of operations on input/output occur most efficiently.

Abstract view of Components of Computer System

The primary goal of an Operating System is to execute user programs and make tasks easier. Various application programs and hardware systems are used to perform this work. Operating System is software that manages and efficiently controls the entire set of resources.

Handling and Logging of Errors

The OS's error detection and reporting system notifies users or administrators of errors and problems. The auditing and logging of the records system use and event logs for use in troubleshooting and security evaluation. Errors are possible for a number of causes, including software faults, user error, and hardware malfunctions. 

To maintain system stability, dependability, and efficient troubleshooting, the operating system is crucial in error detection, management, and logging. The operating system helps maintain system stability, assists in problem diagnosis, and makes sure that users and administrators are promptly informed about the system's health and status by handling and logging failures effectively.


By supplying protocol layers and controlling network connections, the OS controls network communications. The OS enables users to set up their networks and join various networks. Errors are possible for several causes, including software faults, user error, and hardware malfunctions. The operating system is crucial in error detection, management, and logging to maintain system stability, dependability, and efficient troubleshooting. 

The operating system helps maintain system stability, assists in problem diagnosis, and ensures that users and administrators are promptly informed about the system's health and status by effectively handling and logging failures.

Services Provided by an Operating System

Here are the different services provided by the OS.

  1. Program Execution
    The OS runs all the user and system programs. It manages the whole process of program execution. In the first step, it loads the program in the memory for execution. The order of execution of these processes depends on the scheduling algorithm. While the program is running, the OS handles the thread of deadlock. The OS uses various system resources to ensure a smooth program execution.
  2. Handling Input/Output Operations
    The OS manages the I/O operations of the computer system. All the input tasks from the keyboard, mouse, and desktop are a few of these operations. OS also gives access to the required I/O devices for the process when needed. 
  3. Manipulation of File System
    The OS decides where to store all the data in the system. It provides a medium for the user to create or delete files or directories. OS grants permission to read and write to a process. The OS also provides the backup of the file system.
  4. Error Detection and Handling
    The OS manages and handles any error that occurs during a process. It constantly checks for any possible errors that may occur during the process and tries to fix them. It works as a backup for any possible intrusion into the system.
  5. Resource Allocation
    In a computer system, resources are shared by multiple processes. The OS handles these resources and tries to lower the risk of deadlock. It gives resources to the process in such a way that the resources are utilized properly.
  6. Accounting
    In a computer system, multiple functions can remain active at a time. The OS keeps track of these functions in the system. It also includes a track of all facts, including some mistakes that may have happened.
  7. Information and Resource Protection
    In a computer system, protection is a must in order to control access to the process, program, or resources in the machine. The OS provides security to the system from any external attacks and threats. All the operating systems must provide this facility to the computer system.
  8. System Services
    The OS system gives various services to the user to interact with the system. The OS provides services to handle system performance, resource usage, and system health. It also provides tools for system diagnostics and observing the system's performance.

Frequently Asked Questions

What are the functions of OS?

Functions are the task performed by the OS. The OS provides various functionality to the user. Some of these are process management, memory management, device management, security, etc. It helps the user to interact with the system easily.

What are the 5 main functions of an operating system?

The five main functions of the OS are process management, file management, device management, memory management, and handling I/O. Apart from these, the OS also helps the user to interact with the system.

What is OS and its types and functions?

Operating System is a software program that acts as an interface for computer hardware and software. Some of the types of OS are Windows, Linux, Mac OS, Android, and IOS. It helps in file, memory, and device management of the system.


So, this article discussed the functions of an operating system and some basics, like why we need an operating system. The operating system essentially acts as the foundation for modern computing, smoothly integrating hardware and software elements while supplying a setting that promotes user productivity and effective resource management.

Recommended Readings:


You can also consider our Operating System Course to give your career an edge over others.

Previous article
Layered Structure of Operating System
Next article
Interactive Operating System
Live masterclass