Operating System Services

An operating system executes programs and makes the process of solving them easier. It also makes the computer system easier to use and helps the user use the computer hardware efficiently. Apart from these, it also provides an array of services both to the users and the programs.

Services of Operating System

The OS is the resource manager of a system. Thus, there are multiple services it provides in order to have an efficient system that can utilize these resources to the fullest. Following are the services provided by operating systems:

1. User Interface

An interface is required to communicate with the user. Then it can either be a Command Line Interface or a Graphical User Interface.

There is also a third kind that is Batch Based Interface which is usually overlooked. It uses commands to manage the commands entered into files and then these files get executed.

As for the first two, Command Line Interface commonly uses text commands input by the users to interact with the system. These commands can also be given using a terminal emulator, or remote shell client.

A Graphical User Interface (GUI) allows users to interact with the computer system or any other computer-controlled device.

A GUI usually consists of all the graphical icons displayed on a computer screen, visual indicators like widgets, texts, labels, and text navigation. Thus, a user can directly perform actions with a click of the mouse or keyboard.

2. Program Execution

The OS loads a program into memory and then executes that program. It also makes sure that once started that program can end its execution, either normally or forcefully. The major steps during program management are:

  • Loading a program into memory.
  • Executing the program.
  • Making sure the program completes its execution.
  • Providing a mechanism for:
    1. process synchronization.
    2. process communication.
    3. deadlock handling.

3. File System Manipulation

A program is read and then written in the form of directories and files. These files can be stored on the storage disk for the long term. The OS allows the users to create and delete files, duplicate these files, and search files and their information or properties.

It also does permission management for these files i.e., allowing or denying access to these files or directories based on the file ownership.

4. I/O Operations

I/O operations are required during the execution of a program. To maintain efficiency and protection of the program, users cannot directly govern the I/O devices instead the OS allows to read or write operations with any file using the I/O devices and also allows access to any required I/O device when required.

5. Communication systems

Processes need to swap information among themselves. These processes can be from the same computer system or different computer systems as long as they are connected through communication lines in a network.

This can be done with the help of OS support using shared memory or message passing. The OS also manages routing, connection strategies, and the problem of contention and security.

6. Resource Allocation

When multiple users or multiple jobs run on a system concurrently, the resources need to be allocated equally to all of them.

CPU scheduling is used to allocate resources fairly and for the better utilization of the CPU. These resources may include CPU cycles, main memory storage, file storage, and I/O devices.

7. Error Detection

Errors may occur in any of the resources like CPU, I/O devices, or memory hardware. The OS keeps a lookout for such errors, corrects errors when they occur, and makes sure that the system works uninterruptedly.

8. Accounting

This keeps a check of which resource is being used by a user and for how long it is being used. This is usually done for statistical purposes.

9. Protection and Security

This is to ensure the safety of the system. Thus, user authentication is required to access a system. It is also necessary to protect a process from another when multiple processes are running on a system at the same time.

The OS controls the access to the resources, protects the I/O devices from invalid access, and provides authentication through passwords.

10. Command Interpretation

The OS understands and interprets commands that are input by the user and displays the input accordingly. Multiple command interpreters can be supported by an OS and they do not necessarily need to run in kernel mode.

If the interpreter is separate from the kernel then you can modify the interpreter and prevent any unauthorised access into the system.

11. Resource Manager

The OS manages resources such as processor, memory, I/O devices etc efficiently. It allocates resources to processes and administers running programs to ensure user satisfaction.

It also decides the time at which a program should run, the amount of memory allocated for execution, where to save a file, and much more.

Apart from these basics, there are some more services the OS provides that are a part of resource management. These are:

a. Process Management
When multiple processes run simultaneously on a system, the OS helps manage them in order to enhance system performance. Apart from this, the OS also manages printer spooling, virtual memory, swapping, etc and CPU scheduling is used to allocate resources.

Major activities regarding process management are:
1. Creates and deletes processes.
2. Suspends and re-activates processes.
3. A mechanism for

    • process synchronization
    • process communication
    • deadlock handling

b. Main-Memory Management
This deals with the primary, secondary, and virtual memory and increases the amount of memory available for each process. In order to perform program execution, it is necessary to load the program into the main memory.

The OS ensures that there is enough memory for a process to execute and different locations of memory are being used properly for effective execution of processes.

During execution, the memory manager tracks available memory locations, where processes can be allocated or unallocated.

c. Secondary-Storage Management
Primary and cache storage are volatile memories thus, the data is lost once power is turned off.

Moreover, main memory cannot accommodate all data and programs so secondary storage is needed as a backup like tape drives, disk drives, and other media. This provides easy access to the files and folders in the secondary storage using disk scheduling algorithms.

OS manages free space on the secondary storage devices, allocates storage space to new files, schedules memory access requests, and creates and deletes files.

d. Network Management
The OS works as a network resource manager when multiple systems form a network or in a distributed system. The processors communicate through network lines called networks.

Today’s networks are usually based on client-server configuration where a client is the program running on the local machine requesting a service and a server is the program running on the remote machine providing a service.

 

OPERATING SYSTEM SERVICES

Summary

The services offered by Operating System make communicating with the system easy and user-friendly. These services are:

1. User Interface
2. Program execution
3. File System Manipulation
4. I/O operations
5. Communication system
6. Resource allocation
7. Error detection
8. Accounting Protection and security
9. Command interpretation
10. Resource management

These services are what make the OS so popular. Nobody likes complicated things and the OS makes working with a system so simple with all its services and functions.