Types of OS and OS Services
Explore the diverse landscape of operating systems tailored for different environments and understand the fundamental services they provide to users and applications.
Learning Goals
- Differentiate between various types of OS, including Batch, Time-sharing, Real-time, and Distributed systems.
- Identify the core services provided by an operating system for program execution and resource management.
- Understand the importance of error detection, resource allocation, and protection in an OS environment.
Types of Operating Systems
Operating systems have evolved into several specialized types to meet different computational needs. Understanding these types helps in choosing the right OS for a specific task.
1. Batch Operating System
The user does not interact directly with the computer. Instead, the user prepares their job (on cards or tape) and submits it to the computer operator.
- Key Characteristic: Jobs with similar requirements are batched together and run as a group to speed up processing.
- Limitation: Lack of interaction between the user and the job during execution.
2. Time-Sharing (Multitasking) Operating Systems
A logical extension of multiprogramming. Multiple jobs are executed by the CPU switching between them so frequently that users can interact with each program while it is running.
- Key Characteristic: Uses CPU scheduling and multiprogramming to provide each user with a small portion of a shared computer.
3. Real-Time Operating System (RTOS)
Used when there are rigid time requirements on the operation of a processor or the flow of data.
- Hard Real-Time: Guarantees that critical tasks be completed on time.
- Soft Real-Time: A critical real-time task gets priority over other tasks and retains that priority until it completes.
4. Distributed Operating System
Manages a group of independent computers and makes them appear to be a single computer.
- Benefit: Resource sharing, computation speedup, and reliability.
Essential Operating System Services
An operating system provides a set of services that are helpful to the user and ensure the efficient operation of the system itself.
Core Services for Program Execution:
- Program Execution: The system must be able to load a program into memory and run it. The program must be able to end its execution, either normally or abnormally.
- I/O Operations: A running program may require I/O, which may involve a file or an I/O device.
- File-System Manipulation: Programs need to read, write, create, and delete files and directories.
- Communications: One process may need to exchange information with another process. This can occur via shared memory or message passing.
- Error Detection: The OS needs to be constantly aware of possible errors (in the CPU, memory, I/O devices, or user programs) and take appropriate action.
Services for System Efficiency
While the previous services help the user, these services ensure the system itself operates efficiently:
- Resource Allocation: When there are multiple users or multiple jobs running at the same time, resources must be allocated to each of them.
- Accounting: Keeping track of which users use how much and what kinds of computer resources.
- Protection and Security: The owners of information stored in a multiuser or networked computer system may want to control use of that information. Protection involves ensuring that all access to system resources is controlled.
Knowledge Check
Which type of OS is most suitable for a system controlling a nuclear power plant?