The operating system provides some services to the programs and to the users. The specific set of services varies from one operating system to another but here is a list of services which are common in almost all operating system. These operating system services can be divided into two broad categories:
1. User services
2. System services
User needs some interface to pass his/her commands to the system. Thus, the OS provides two interface: GUI (Graphical User Interface) or the CLI (Command Line Interface). The GUI provides the user icons and the user can use mouse to operate upon those icons. But in the CLI the user has to interact by writing some commands on a shell, like bash. Both these interfaces have their own advantages and disadvantages. GUI is very easy to learn and use. On the other hand, CLI is difficult for beginners but is more powerful as compared to GUI as you can do much more by writing the right command. Consider a simple scenario where you want to create 1000 files with names1, 2, …1000. With CLI the command is :
but with GUI you can give it a try and see how much time it takes you to do the task.
The system must be able to run a program by placing it into RAM. The program should be able to finish its execution normally or if there is an error it should be indicated to the user. Hence, the OS handles these tasks for the user.
A program like MSWord may require to take input from the user via keyboard or it may want to send a file for printing to the printer. Now, the user can not handle the I/O devices. Hence, the operating system should provide certain means to operate these I/O devices.
The user may want to read from a file or write into a file, save it in some particular location. All these require a check on what permissions are available to the user on any particular file. Also, you may be required to search for files, hence the files should be organized in some manner like arranging them in directories. So, the system should provide certain services to manipulate the files.
Sometimes processes want to communicate among themselves i.e., they want to send some message to each other. These processes can be on the same system or might be running on different systems. An operating system provides two mechanism to handle this inter process communication: shared-memory and message-passing.
The operating system should be aware of all errors that occur in the system and it should report these errors to the user so that the user can take appropriate action. Certain times the operating system might be able to debug the issue on its own also.
The operating system provides three services to the system.
The system is used by multiple process at the same time (you run 10-15 applications on your mobile at any given time). Each of these process request for some resource and some may request for the same resource at the same time. The operating system should be able to handle all the requests and allocate them the resources with minimum waiting time.
The system should be able to keep track of all users who are using the system. This helps to monitor and track malicious activities. A simple method used by OS to do this is by allowing different users accounts in the system. Everyone logs in with his/her personal account and the operating systems keeps on tracking who does what. Later, the admin can analyse the activity log of each user.
Protection means securing the data of one process from another. A process P1 must not be able to write into the address space of process P2. Security means safeguarding the data from external threats like virus, worms, etc. Operating system deploy different tools from these. One of the most common tool is firewall.
Note: Click within the slide area for animations. Clicking on the “next” slide button will not display any animation