Skip to main content

Operating System Services

Article No: 3

We saw that an operating system provides certain services to programs and to the users of those programs. The specific services provided will, of course differ from one operating system to another, but there are some common types of functions that we can identify. The main functions provided by most operating system of today are as follows:

Program execution

The system must be able to load a program into memory and to run that program. The program must be able to end its execution, either normally or abnormally (indicating errors).

I/O operations

A running program may require I/O. This I/O may involve a file or an I/O device. For specific devices, special functions may be desired (such as to rewind a tape drive, or to blank a CRT screen). For efficiency, protection, users usually cannot control I/O devices directly. Therefore, operating system must provide a means to do I/O.

File-system manipulation

The file system is a particular interest. Obviously, programs need to read and write files. Programs also need to create and delete files by name.

Communications

In many circumstances, one process needs to exchange information with another process. Such communication can occur in the major ways. The first takes place between processes that are executing on the same computer; the second takes place between processes that are executing on the different computer systems that are tied together by 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 by the operating system.

Error detection

The operating system constantly needs to be aware of possible errors. Errors may occur in the CPU and memory hardware (such as a memory error or power failure), in I/O devices (such as parity error on tape, a connection failure on a network, or lack of paper in the printer) and in the user program (such as an arithmetic overflow, an attempt to access an illegal memory location, or too-great use of CPU time). For each type of error, the operating system should take appropriate action to ensure correct and consistent computing.

Resource allocation

When multiple users are logged on the system or multiple jobs are running at the same time, resources must be allocated to each of them. Many different types of resources are managed by the operating system. Some (such as CPU cycles, main memory, and file storage) may have a special allocation code, whereas others (such as I/O devices) may have more general request and release code. For instance, in determining how best to use the CPU, operating systems have CPU-scheduling routines that take into account the speed of the CPU, the jobs that must be executed, the number of registers available, and other factors. There might also be routines to allocate a tape drive for use by a job.

Accounting

We want to keep track of which users use how many and which kind of computer resources. The record keeping may be used for accounting (so that the users can be billed) or simply for accumulating usage statistics. Usage statistics may be a valuable tool for researches who wish to reconfigure the system to improve computing services.

Protection

The owners of information stored in a multiuser computer system may want to control use of that information. When several disjointed process execute concurrently, it should not be possible for one process to interfere with the others, or with the operating system itself. Protection involves ensuring that all access to system resources is controlled. Security of the system from outsiders is also important. Such security starts with each user having to authenticate him to the system, usually by means of a password, to be allowed access to resources. It extends to defending invalid access attempts, and to recording all such connections for detection of break-ins. If a system is to be protected and secure, precautions must be instituted throughout it. A chain is only as strong as its weakest link.

Note:

1. Operating System Concepts (By Silberschatz Galvin Gagne)
For more information, you can refer William Stailing's OS book, which will give you abundant knowledge about OS. Thank you very much for reading an article and to be a part of this blog.

Compiled By: Chaudhary Amit V.

Comments

Popular posts from this blog

Characteristics of a Good Programming Language

Till now there are many high level languages which are very popular, and there are others, which could not become so popular in-spite of being very powerful. There might be many reasons for the success of a language, but one obvious reason is the characteristics of the language. Several characteristics believed to be important with respect to making a programming language good are briefly discussed below. Simplicity A good programming language must be simple and easy to learn and use. For example, BASIC is liked by many programmers only because of its simplicity. Thus, a good programming language should provide a programmer with a clear, simple and unified set of concepts which can be easily grasped. It is also easy to develop and implement a compiler or an interpreter for a programming language that is simple. However, the power needed for the language should not be sacrificed for simplicity. The overall simplicity of a programming language strongly affects the readability of the pr...

Angular 4 and Firebase Authentication: Setup

If you have come to this article, it means you are keen to learn new technology and that too Firebase. I love Firebase because it provides all basic but important features of any web application. Take for example, authentication, which is cumbersome and risky if not implemented with utmost care. And when we have the integration of Angular and Firebase, it becomes a lot easier for a developer to build such crucial modules in less time with minimal efforts. In this article we will create a simple Angular application using Firebase. I am going ahead with the understanding that you know the benefits of Firebase and have little knowledge about it. There are plenty of posts out on the web if you are behind. Step 1: Install Angular CLI (if not installed). npm install -g angular-cli Step 2: Create new Angular 4 project. By default now angular CLI will create Angular 4 project so you need not fret. ng new firebase-authentication Step 3: Check whether the ne...

Switch-case, simple calculator . . .

11.      Write a program to perform some mathematic functions with the help of “switch-case” statement. #include<stdio.h> #include<conio.h> void main() { int a,b,ans; char c; clrscr(); printf("\ Enter a and b:"); scanf("%d%d",&a,&b); printf("\n Enter operator:"); fflush(stdin); scanf("%c",&c); switch(c) { case'+':ans=a+b;       break; case'-':ans=a-b;       break; case'*':ans=a*b;       break; case'/':ans=a/b;       break; } printf("\n ans %d",ans); getch(); } 12.      Print the Fibonacci series #include<stdio.h> #include<conio.h> void main() { int a=1,b=1,s=3,c,ch; clrscr(); printf("how many steps="); scanf("%d",&ch); printf("%5d%5d",a,b); for(s=3;s<=ch;s++) {       c=a+b;       printf("%5d",c);       a=b;    ...