What is an Operating System and its Functions/Roles?


A computer is a machine that consists of a variety of hardware components. Hardware devices receive instructions in machine language and perform activities in response to them. The actions could include copying files between drives, printing a page, etc.

What is an Operating System
What is an Operating System

What is an Operating System?

The operating system gives users easy-to-use graphical (or/and command-line options) interfaces. It receives instructions as events and converts them into low-level machine language per the hardware present.

What is the need for an operating system?

Giving instructions directly to the hardware is not feasible for a computer user. If a user wants to do that, it requires converting high-level instructions into the machine language of the underlying hardware. But still, not possible all the time, as a user might not be a tech guy. So there is a system software named Operating System.

Other than just accessing hardware, an Operating System(OS) plays a role in using resources efficiently and securely for the user and system processes. In case when various users run multiple processes. An OS will schedule the processes for less workaround time, and one user process will not interfere with any other user process.

Lists of popular Operating systems 

For Desktop and Servers.

      • Windows
      • Linux
      • MAC OS
      • Novell Netware

For mobile devices. 

      • Android
      • iOS
      • Windows
      • Blackberry
      • Symbian

What are the Components of an Operating System?

What are the components of Operating System
What are the components of the Operating System?

An overview of the components of the operating system is shown in the diagram above. Hardware is at the lowest level of the system, while software or user applications are at the highest level.

  • User Software or Applications – All computer programs a user executes to complete a task, such as a Media Player, PDF viewer, etc.
  • Shell – This is the interface between the user and the hardware. The shell translates user events into the format that the kernel understands. A company may choose to use an existing kernel (e.g., Open Source) but develop its own shell to add additional functionality to the system.
  • Kernel –  This is the most complex part of an operating system. It interacts with the hardware and shell. A kernel is developed for specific hardware. It contains device drivers for various devices attached.

What are the goals of the Operating System?

The goal of each operating system is to access the computer hardware in the simplest and an efficient way. We can categorize goals into the following.

  • User Level Goal –  The basic purpose of any operating system is to make access to computer hardware components easier. It provides a user-friendly graphical user interface where users can do all activities by typing and clicking.
    A hardware device has its own set of machine instructions. At the machine language level, a program can directly access the device. But it is complicated, so the operation system bridges the gap. The interface converts user-level easy commands into device-level complex machine instructions.
  • System-Level Goal – System-level function is the internal working where a user is uninvolved. The Operating System should manage all resources efficiently and promptly. If a request is waiting for resources (e.g., I/O operation), another process can do another activity. The OS does context switching and minimizes the turnaround time.

What are the functions of an Operating System?

  • User Management –  An operating system can have multiple user profiles with different roles. Each has its own workspace to work. For example, if there are two users, John and Alice, as normal users. John can not view/modify Alice’s files and vice versa. But if a user is an administrator, it can do all activities.   The user management function is important for organizations that must protect a computer against the employees’ installation of pirated or unauthorized software applications.
  • Process scheduling –  A process is a code that is in execution. While execution, a process may move among various states, such as READY, WAITING, TERMINATED, etc. The operating system assigns the CPU to a process, and once a process needs an I/O or other operation, it moves the process to another state and assigns the next process to the CPU. Along with this one method, other algorithms handle multiple processes running together, such as round-robin, shortest job first, etc. The goal of the process management function is to ensure that the CPU is efficiently allocated to all processes.
  • Input/Output(I/O) operations for devices –  I/O operations of a device are to read and write to/from the device hardware. For example, a computer has Network Interface Card  Reads/Write data from/to the network. The Operating System function converts user-level requests into device-level actual commands. The conversion needs a device driver from the hardware manufacturing company. A device driver is the glue between the operating system and the device.
  • Memory management –   Once a process moves from an IDLE state to running, it is loaded into the primary memory (RAM).   The operating system allocates the memory, and the CPU executes the process. An operating system ensures that the other processes should also get the memory efficiently. This requires memory management functionality.
  • File Management – A file is an entity that stores user information. It could be a text application of any other type. A directory or folder is a container that can contain multiple files int. The directory makes it easy to group and access the files easily. Operating Sytems have all the necessary functions to maintain files and folders. The functions can be for creating, deleting, reading, writing, and renaming.
  • Deadlock Management –  Deadlock is the state where all processes are waiting circularly, and no one is completing them. The operating system tries to prevent a deadlock.