Answer: - There are Five Services provided by operating systems for
the convenience of users.
Program Execution
The purpose of a computer system is to allow the user to execute programs. So the operating Systems provide an environment where the user can conveniently run programs. The user does not have to worry about the memory allocation of multitasking anything. These things are taken care of by the operating systems. Running a program involves allocating and deallocating memory, and CPU scheduling in case of multiprocess. These functions cannot be given to the user-level program. So user-level programs cannot help the user to run programs independently without help from the operating system.
I/O Operations
Each program requires an input and produces output. This involves the use of I/O the operating system hides the user the details of the underlying hardware for the I/O. All the user sees is that the I/O has been Performed without any details. So the operating systems by providing I/O make it convenient for the users to run programs. For efficiency and protection users cannot I/O so this service cannot be provided by a user-level program.
File System Manipulation
The output of a program may need to be written into new files or input taken from some files. The operating system provides the service. The user does not have to worry about secondary storage management. The user gives a command for reading or writing to a file and sees his or her task accomplished. Thus operating system makes it easier for user programs to accomplish their task. This service involves secondary storage management. The speed of I/O that depends on secondary storage management is critical to the speed of many programs and hence I think it is best relegated to the operating system to manage it than giving individual users control of it. It is not difficult for user-level programs to provide these services but for the above-mentioned reasons, it is best if these services are left with the operating system.
Communications
There are instances where processes need to communicate with each to exchange information. It may be between processes running on the same computer or running on different computers. By providing this service the operating system relieves the user of the worry of passing messages between processes. In cases where the messages need to be passed to processes on the other computers through a network, it can be done by the user programs. The user program may be customized to the specifics of the hardware through which the message transits and provides the service interface to the operating system.
An Error is one part of the system that may cause
malfunctioning of the complete system. To avoid such a situation the operating system
constantly monitors the system for detecting errors. This relieves the user of
the worry of errors propagating to various parts of the system and causing
malfunctioning. This service cannot allow being handled by user programs
because it involves monitoring and in some cases altering the area of memory or
deallocation of memory for a faulty process. Or maybe relinquishing the CPU of
a process that goes into an infinite loop. These tasks are not critical to be
handed over to the user programs. A user program if given these privileges can
interfere with the correct (normal) Operation of the Operating system.
Post a Comment