0
3.4kviews
Functions of Operating System
1 Answer
2
67views

An operating system provides the platform for the execution of software. It provides service to the programs and their users. The figure below shows one view of the various operating system functions and how they relate to each other.

enter image description here

Fig: Functions of an operating system

User Interface

Nowadays, almost all operating systems have a user interface. This interface can have various forms like CLI or Batch interface.

Command Line Interface (CLI) uses text commands and a method for entering them, e.g., commands for file operations like copy, delete, etc. In Batch interface (BI), commands and directives to control these commands are entered into files, and those files are executed simultaneously. Another interface is Graphical User Interface (GUI) which is easier to use. Here, the interface is a window system which provides a pointing device like a mouse to direct I/O, choose from menus, make selections, and a keyboard to enter text.

Program Execution

The system must be able to load a program into the main memory and run it. The program must be able to end its execution, either successfully or by indicating an error.

I/O operations

While the program is executing, it might need input or output which may involve a file or an I/O device. Sometimes special functions may be required (such as writing to a DVD drive or blanking a display screen). For efficiency and protection, users usually cannot directly control I/O devices. Therefore, the operating system must provide a means to do it.

File-system manipulation

A program may need access to files and directories for reading from it and writing to it. They may also need to perform file operations like create, delete, list, etc. Some programs also involve permissions management to allow or deny access to files or directories based on their ownership. Many operating systems provide a variety of file systems keeping performance characteristics in mind.

Communication

Many times one process needs to exchange information with another process. Such communication may occur between processes that are executing on the same computer or different computers within a network. There are many ways to facilitate this communication viz. shared memory and message passing, where packets of information are moved between processes by the operating system.

Error detection

The operating system needs to be constantly aware of possible errors. Errors may occur anywhere in the system, may in CPU or memory or hardware (like power failure), or I/O devices (such as a parity error on tape, a connection failure on a network, or lack of paper in the printer), or in the user program (such as an arithmetic overflow, an attempt to access an illegal memory location). An operating system should take the correct action for solving these errors and continuing the system flow.

Another set of operating-system functions exists not for helping the user but rather for ensuring the efficient operation of the system itself. Below are some of them:

Resource allocation

When there are multiple users or multiple jobs running at the same time, resources must be appropriately allocated. An operating system manages different types of resources. Some resources (such as CPU cycles, main memory, and file storage) may have unique allocation code, whereas others (like I/O devices) may have much more general request and release code. To handle these resources and utilize them properly, the operating system has various scheduling schemes. There may also be routines to allocate printers, modems, USB storage drives, and other peripheral devices.

Accounting

The operating system should keep track of the usage of resources. This record keeping may later be used for accounting user bills or simply stored for future research purposes. These statistics prove a valuable tool for researchers who work on improving computing services.

Protection and security

In a multi-user or networked computer system, users might want to protect the information they own. When multiple processes execute at a time, care should be taken that they must not share the data of each other. Protection involves ensuring that all access to system resources is controlled.

Security of the system from the outside world is also essential. Such security starts with requiring users to authenticate themselves to the system. The operating system also protects external I/O devices, including modems and network adapters, from invalid access attempts and records all such connections to prevent future break-ins.

Please log in to add an answer.