Thursday 30 July 2020

What are the various services or functions of an Operating System (OS) ?

Operating System Services or Functions of an OS:

An operating system provides a user friendly environment for the creation and execution of programs and provides services to the user. Services provided by one operating system differ with other operating system i.e. it differs from OS to OS.


 

1.    Program creation:  

     OS provides editors, debuggers to assist the programmer in creating programs.

 

2.    Program execution: 

    A number of tasks are required to execute a program. It includes instructions and data to be loaded into main memory, IO devices, files and other resources must be prepared.  The OS handles these tasks for the user. The program must be able to end its execution either normally or abnormally.

 

3.    IO operation: 

     Here by IO we mean an IO for any file or any specific IO device.  Program may require any IO device while running.  A user cannot execute IO operations directly; the OS must provide some means to do so.

 

4.    File system manipulation:  

    Program needs to read a file or write the data to a file.  An OS gives the permission to the program for operations on a file.

 

5.    Communication:  

     In some cases, the data transfer between two processes is required. The two processes may reside on one computer or on different computers but, connected through a computer network.  Communication may be implemented by two methods - shared memory and message passing.

 

6.    Error detection:  

     The OS constantly needs to be aware of possible errors.  It should take the appropriate action to ensure correct and consistent computing. Ex. of errors include memory error, power failure, printer out of paper, illegal instruction in the program (division by zero, arithmetic overflow, etc.).

 

 A multi-user OS provides following services:

 

1.    Resource allocation:

OS manages different types of resources. OS collects all the resources in the network environment or a system and grant these resources to requested process. Resources commonly managed by OS include CPU cycles, main memory, IO devices, file storage etc.

 

2.    Accounting:

Logs of each user must be kept to keep record of which user uses how much and what kind of computer resources.  These logs are used for accounting purposes, for billing and to improve system efficiency.

 

3.    Protection:

Protection ensures that all access to system resources is controlled.  Security to a system is usually implemented by means of a password.  External IO devices must be protected from invalid access attempts. In protection, all the access to the resources is controlled.  In multi process environment, it is possible that one process to interface with other or with other operating system, so protection is required.

 


No comments:

Post a Comment