Functions of an Operating System


In this topic, you will learn about, Functions of an Operating System.

Functions of An Operating System:

1.Process Management: A process does nothing unless its instruction is executed by the CPU. A process can be thought of as a program in execution. A process needs certain resources including CPU times, memory, files, and I/O devices to accomplish its task. These resources are either given to the process when it is created or allocated to it while it is running. When the process terminates the operating system will reclaim any reusable resources

*instruction life cycle
*instruction set
*instruction registers

The operating system is responsible for the following activities in connection with process management.

  1. The creation and deletion of both user and system processes.
  2. Suspension and resumption of processes.
  3. The provision of a mechanism for process synchronization.
  4. The provision of a mechanism for process communication.
  5. The provision of a mechanism for deadlock handling.

2.Memory Management: The main memory is central to the operation of a modern computer system. Main memory is a large array of words or bytes ranging in six from hundreds of thousands to hundreds of millions. Each word or byte has its own address.

For a program to be executed we need main memory which must be mapped to absolute addresses and loaded into memory. As the program executes it access program instruction and data from memory by generating this absolute address.

To improve both the utilization of the CPU and the speed of the computer’s response to its users, we must keep several programs in memory. There are many different memory management schemes.

The operating system is responsible for the following activities in connection with memory management.

  1. Keep track of which parts of memory are currently being used and by whom.
  2. Decide which processes are to be loaded into memory when memory space becomes available.
  3. Allocate and deallocates memory space as needed.

3.File Management: File management is one of the most visible components of an operating system. A computer can store information on several different types.

Each media has its own characteristics and physical. Each media is controlled by a device such as describe, take a drive with its own unique characteristics. These properties include speed capacity data transfer rate and access methods.

For convenient use of the computer system, the operating system provides a uniform logical view for information storage known as the file.

A file is a collection of related information defined by its creator. Commonly file represents programs and data file consists of a sequence of bits, bytes, lines, or records those meaning are defined by the creator.

The operating system is responsible for the following activities in connection with the file management process.

  1. The creation and deletion of files.
  2. The creation and deletion of directories.
  3. The support of primitives for manipulating files and directories.
  4. The mapping of files on two secondary storage and print the backup of the file on stable storage media.

4.Secondary storage Management: The main purpose of a computer system is to execute the program. These programs, with the data they access, must be the main memory during execution because the main memory too smaller to accommodate all data or programs. its data are lost when power is lost the computer system provides secondary storage to back up to the main memory. The most modern computer system uses disk as the principle online storage medium, for both programs and data.

The operating system is responsible for the following activities in connection with disk management.

  1. Three space management.
  2. Storage allocation.
  3. Disk scheduling.

5.I/O System Management: One of the purposes of an operating system is to hide the peculiarities of specific hardware devices from the user. This is hidden by the I/O subsystem. The I/O subsystems consist of:

  1. A Memory management component including buffering caching and spooling.
  2. A general device driver interface.
  3. Drivers for specific hardware devices.

Command Interpreter System (Interface Management): One of the most important system programs for an operating system is the command interpreter which is the interface between the user and the operating system. Many commands are given to the operating system by control statements. When a new job is started in a batch system or when a user logs on to a time-shared system, a program that reads and interprets control statements is executed automatically. This program is called the command-line interpreter or shell.

Protection System: If a computer system has multiple users and allows the concurrent execution of multiple processes, then the various processes must be protected from one another activity. For that purpose, mechanisms are provided to ensure that the files, memory segments, CPU, and other resources can be operated on by only these processes that have gained proper authorization from the operating system.

Protection refers to a mechanism for controlling the access of a program, processes, or users to the resources defined by a computer system. This mechanism must provide a means for the specification of the controls to be imposed.

Together with a means of enforcement. A protection-oriented system provides a means to distinguish between authorized and unauthorized uses.

Operating system services: An operating system provides an environment for the execution of the program. The operating system provides certain services to the program and the user of those programs. The common services are:

  1. Program Execution: The system must be able to lead a program and run it. The program must be able to end its execution either normal or abnormal.
  2. I/O operation: A running program may require I/O. This I/O may involve a file or an I/O device. For efficiency and protection, users usually cannot control I/O devices directly. These for the operating system must provide some means to do I/O.
  3. File System Manipulation: The file system is a particular interest. It should be obvious that programs need to read and write files. They also need to create and delete files.
  4. Communication: There are many circumstances in which one process needs to exchange information with another process. There are two major ways in which such communication can occur. The first takes place between processes executing on the same computers and the second takes place between processes executing on a different computer system that are tied together by a computer network. Communication may be implemented via shared memory or by the technique of message passing in which packets of information are moved between processes of the operating system.
  5. Error Detection: – The O.S constantly needs to be aware of possible errors. Errors may occur in the CPU and memory hardware, in the I/O device, or in the user program. For each type of error, the O.S should take the appropriate action to ensure correct and consistent computing.

In addition, another set of Operating System function exists not for helping the user, but rather for ensuring the efficient operations of the system itself they are: –

  1. Resources Allocation: When there are multiple users or multiple jobs running at the same time, resources must be allocated to each of them. Many different types of resources are managed by the Operating System such as CPU cycles main memory, file storage, I/O devices, etc.
  2. Accounting: We want to keep track of which users use how much and what kinds of computer resources. This record-keeping may be for accounting or simply may be for accounting or simply for accumulating usage statistics. Usage statistics may be valuable for researchers who wish to reconsider the system to improve computing services.
  3. Protection: The owners of information stored in a multi-user computer system may want to control its use when several disjoint processes execute concurrently, it should not be possible for a process to interface with others, for with the O.S itself. Protection involves ensuring that all access to system resources is controlled.

Comment below if you have queries related to the above topic, Functions of Operating System.


Please enter your comment!
Please enter your name here