The operating system provides the following services (as shown in Figure 3.1) to the running programs to make the programming task easier (Silberschatz et.al., (2008)):
- Program execution: The operating system loads the programs in the memory to start the execution and terminate the program when they finish or when errors occur.
- I/O operations: When a running program needs to perform I/O operation, the operating system provides a means to do it.
- File-system manipulation: The operating system provides means to read and write files and directories. It provides means to create and delete them by name, search for a given file, and list file information.
- Communications: The operating system provides means to perform information exchange among running processes.
- Error detection: The operating system needs to be able to detect errors in the system. It should be able to handle these errors to make the processes able to resume working.
The operating system provides others service to ensure the efficient operation of the system itself such as:
- Resource allocation: The operating system fairly allocates the system resources to the running processes.
- Accounting: The operating system should be able to keep track how much each user used the system for accounting purposes.
- Protection and security: The operating system should grant access for each system resource to the authorized processes only. The operating system should protect the system from intruders.