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
Post a Comment