Operating Systems Service
An Operating System supplies different kinds of services to both the users and to the programs as well.
It also provides application programs (that run within an Operating system) an environment to execute it
freely. It provides users the services run various programs in a convenient manner.
Here is a list of common services offered by an almost all operating systems:
• User Interface
• Program Execution
• File system manipulation
• Input / output Operations
• Communication
• Resource Allocation
• Error Detection
• Accounting
• Security and protection
This section will give a brief description of what services and operating system usually provide to
users and those programs that are and will be running within it.
User Interface of Operating System
Usually Operating system comes in three forms or types. Depending on the interface their types have
been further sub divided. These are:
• Command line interface
• Batch based interface
• Graphical User Interface
Let’s get to know in brief about each of them.
The command line interface (CLI) usually deals with using text commands and a technique for entering
those commands. The batch interface (BI): commands and directives are used to manage those commands that
are entered into files and those files get executed. Another type is the graphical user interface (GUI): which is
a window system with a pointing device (like mouse or track-ball) to point to the I/O, choose from menus
driven interface and to make choices viewing from a number of lists and a keyboard to entry the texts.
Pointing device
• is an input interface that allows a user to input spatial data to a computer.
Program Execution in Operating System
The operating system must have the capability to load a program into memory and execute that program.
Furthermore, the program must be able to end its execution, either normally or abnormally / forcefully. The
purpose of computer system is to allow the users to execute programs in an efficient manner. The operating
system provides an environment where the user can conveniently run these programs. The user does not have
to worry about the memory allocation or de-allocation or any other thing because these things are taken care
of by the operating system. To run a program, the program is required to be loaded into the RAM first and then
to assign CPU time for its execution. Operating system performs this function for the convenience of the user.
It also performs other important tasks like allocation and de-allocation of memory, CPU scheduling etc.
File System Manipulation in Operating System
Programs need has to be read and then write them as files and directories. File handling portion of
operating system also allows users to create and delete files by specific name along with extension, search for
a given file and / or list file information. Some programs comprise of permissions management for allowing or
denying access to files or directories based on file ownership.
While working on the computer, generally a user is required to manipulate various types of files like as
opening a file, saving a file and deleting a file from the storage disk. This is an important task that is also
performed by the operating system. Thus operating system makes it easier for the user programs to
accomplish their task by providing the file system manipulation service. This service is performed by the
‘Secondary Storage Management’ a part of the operating system.
I/O operations in Operating System
A program which is currently executing may require I/O, which may involve file or other I/O device. For
efficiency and protection, users cannot directly govern the I/O devices. So, the OS provide a means to do I/O
Input / Output operation which means read or write operation with any file. Each program requires an input and
after processing the A program which is currently executing may require I/O, which may involve file or other I/O
device. For efficiency and protection, users cannot directly govern the I/O devices. So, the OS provide a means
to do I/O Input / Output operation which means read or write operation with any file. Each program requires an
input and after processing the input submitted by user it produces output. This involves the use of I/O devices.
The operating system hides the user from all these details of underlying hardware for the I/O. So the operating
system makes the users convenient to run programs by providing I/O functions. The I/O service cannot be
provided by user-level programs and it must be provided by the operating system.
Communication System of Operating System
Operating system performs the communication among various types of processes in the form of shared
memory. In multitasking environment, the processes need to communicate with each other and to exchange
their information. These processes are created under a hierarchical structure where the main process is known
as parent process and the sub processes are known as child processes. Process needs to swap over information
with other process. Processes executing on same computer system or on different computer systems can
communicate using operating system support. Communication between two processes can be done using shared
memory or via message passing.
Resource Allocation of Operating System
When multiple jobs running concurrently, resources must
need to be allocated to each of them. Resources can be CPU
cycles, main memory storage, file storage and I/O devices. CPU
scheduling routines are used here to establish how best the CPU
can be used.
In the multitasking environment, when multiple jobs are
running at a time, it is the responsibility of an operating system to
allocate the required resources (like as CPU, main memory, tape
drive or secondary storage etc.) to each process for its better
utilization. For this purpose various types of algorithms are
implemented such as process scheduling, CPU scheduling, disk
scheduling etc.
Error Detection
Errors may occur within CPU, memory hardware, I/O devices and in the user program. For each type of error,
the OS takes adequate action for ensuring correct and consistent computing. Operating system also deals with
hardware problems. To avoid hardware problems the operating system constantly monitors the system for
detecting the errors and fixing these errors (if found). The main function of operating system is to detect the
errors like bad sectors on hard disk, memory overflow and errors related to I/O devices. After detecting the
errors, operating system takes an appropriate action for consistent computing.
This service of error detection and error correction cannot be handled by user programs because it involves
monitoring the entire computing process. These tasks are too critical to be handed over to the user programs.
A user program, if given these privileges; can interfere with the corresponding operation of the operating
systems.
User program
• is a program that must communicate with a resource manager for some or all of its processing.
Accounting
This service of operating system keeps track of which users are using how much and what kinds of
computer resources has been used for accounting or simply to accumulate usage statistics. Operating system
keeps an account of all the resources accessed by each process or user. In multitasking, accounting enhances
the system performance with the allocation of resources to each process ensuring the satisfaction to each
process.
Protection and Security
Protection includes in ensuring all access to system resources in a controlled manner. For making a
system secure, the user needs to authenticate him or her to the system before using (usually via login ID and
password). If a computer system has multiple users and allows the concurrent execution of multiple processes,
then the various processes must be protected from one another’s activities.