An operating system provides an environment for the execution of programs. It provides certain services to programs and to the users of those programs. These services are provided for the convenience of the programmers, to make the programming task easier. Some common types of services given by operating systems are given below:
Table of Contents
Types of services given by operating systems
Program execution
The system must be able to load a user program into memory and run it. The program must be able to end its execution, either normally or abnormally.
Input/output operations
A running program may be required to input data and output results. An I/O operation may involve a file or a device. For specific, special functions may be desired (such as rewinding a tape, clearing the screen, and so on).
Since a user program cannot execute I/O operations directly, the operating system must provide some means for I/O operations.
File system manipulation
Programs may need to read and write files and the users create and delete files by name. the operating system provides numerous file operations.
Error Detection
The operating system needs to be aware of possible errors in the system.
Errors may occur in the CPU and memory (such as memory error or power failure), in I/O devices (such as parity error on tape or printer out of paper), or in the user program (such as an arithmetic overflow, and attempt to access illegal memory location or using too much CPU time).
The operating system takes appropriate actions if an error occurs.
Resource Allocation
In some computer systems, multiple users or multiple jobs run at the same time and resources should be allocated to each of them. Resources are managed by the operating system.
Accounting
It may necessary to keep track of which users use how much and what kind of computer resources. Keeping records may be required for the purpose of billing or for statistics.
File management
A computer is so popular, one of the main reasons is its file management system. The operating system manages all types of files according to their formate and types. The operating system also provides the facility of changing files and folders to the user.
Program loading and execution
Once a program is assembled or compiled, it must be loaded into memory for execution. The operating system may provide loaders, linkage editors for program execution. This is one of the major services provided by the operating system.
Programming language support
Compilers, assemblers, ad interpreters for common programming languages (such as FORTRAN, Pascal, BASIC, C) are often provided with the operating systems.
Hope you find all types of services given by operating systems. Otherwise, you may comment below.