Operating Systems & Types
The Operating System (OS) is the most important system software on any computer. It acts as an interface between the user and the hardware. Depending on the environment—from personal laptops to hospital life-support machines—different types of OS are required.
Learning Objectives
- 11.3.1.5 Describe the main functions of operating systems
- 11.3.1.6 Compare single-user and multi-user operating systems
- 11.3.1.7 Compare single-tasking and multitasking operating systems
- 11.3.1.8 Describe the features of a real-time operating system
- 11.3.1.9 Describe the features of a network operating system
- 11.3.1.10 Describe the features of a batch processing operating system
Conceptual Anchor
The OS as a City Manager
Think of the OS as the ultimate manager of a digital city:
- The Police (Security & Error Handling): Stops unauthorized access and handles crashes.
- The Traffic Controller (Process & Multitasking Management): Decides which cars (programs) get to use the road (CPU) and prevents collisions.
- The Librarian (File Management): Keeps track of where every single document is stored.
Rules & Theory
Main Functions of an OS
| Function | Description | Example |
|---|---|---|
| Provides User Interface | Allows users to interact with the system via GUI (Graphical) or CLI (Command Line). | Clicking an icon with a mouse. |
| I/O Device Management | Controls the flow of data between the computer and peripherals using drivers. | Sending a document to a printer. |
| Memory Management | Allocates RAM to running programs and ensures they do not overwrite each other's data. | Giving a game 4GB of RAM while running. |
| Process & Multitasking Management | Allocates CPU time slices to different programs so they can run simultaneously. | Listening to Spotify while typing in Word. |
| File System Management | Controls the creation, reading, writing, and deletion of files and directories. | Saving a document in a specific folder. |
| Security & Access Control | Protects the system from unauthorized access using passwords and permissions. | Logging into a Windows account. |
| Error Handling | Detects software/hardware errors, prevents full system crashes, and provides error messages. | Showing a "Printer out of paper" warning. |
Basic OS Distinctions
Single-User vs Multi-User
Single-User OS: Designed for one person using the device at a time. All resources belong to them. (e.g., Windows 11 Home, iOS).
Multi-User OS: Allows multiple users to log in and use the system's resources simultaneously. Requires strict security and resource allocation. (e.g., Linux Server, UNIX, Mainframes).
Single-Tasking vs Multitasking
Single-Tasking OS: Can only execute one program at a time. The current program must be closed to open a new one. (e.g., MS-DOS, early mobile OS).
Multitasking OS: Executes multiple programs at once by rapidly switching the CPU's focus (time-slicing) between tasks. (e.g., modern Windows, macOS, Android).
Advanced Operating System Types
Advanced Operating System Types
Real-Time Operating System (RTOS)
Core Concept: Accepts inputs, processes them immediately, and provides feedback without significant delay. The critical metric here is Response Time.
Hard Real-Time
Very strict time constraints; a delay is completely unacceptable.
Uses: Aircraft systems, critical medical systems.
Firm Real-Time
Deadlines exist, but missing one does not result in great loss.
Uses: Multimedia systems.
Soft Real-Time
Small delays are acceptable.
Uses: Online transactions, computer games.
Advantages
- Less downtime and high availability (designed for continuous operation).
- Fast task management specifically for critical processes.
Disadvantages
- Limited multitasking capabilities.
- High complexity: development requires specialist knowledge.
Batch Processing OS
Core Concept: Data is collected over a period of time. When all data is collected, jobs that perform similar functions are executed together as a 'batch' without manual intervention.
Ideal Use Cases: Processing bank cheques, printing massive utility/gas bills, and generating payrolls.
Advantages
- Repeated jobs are done fast without user interaction.
- Can work offline, putting less stress on the main processor.
- Processing can be scheduled for off-peak times (e.g., at night) when the computer is idle.
Disadvantages
- If one job takes too long or an error occurs, other jobs will have to wait for an unknown time.
- Difficult to debug.
- Operators must be specially trained to use batch systems.
Network Operating System (NOS)
Core Concept: Designed to manage network resources and enable connected devices to exchange information. It handles communication between network client software (workstations) and network server software.
Key Features: Transparency (accessing remote resources as if they were local), Directory Services (locating users/folders), and Security (authentication and authorization).
Peer-to-Peer (P2P) Architecture
Resources are shared in a common accessible location, and all devices are treated equally.
Client/Server Architecture
Users access resources through a server, which handles centralized management.
Worked Examples
1 Selecting the Right OS Type
Scenario A: A hospital heart-rate monitor.
Answer: Real-Time OS.
Reasoning: The system cannot lag. It must respond to changes in a patient's heart rate instantly, within guaranteed milliseconds. Any delay could be fatal.
Scenario B: Generating electricity bills for 100,000 citizens.
Answer: Batch Processing OS.
Reasoning: The task is highly repetitive, requires no human interaction during the calculation, and can be grouped into a batch and run overnight when CPU usage is low.Common Pitfalls
Fast OS vs Real-Time OS
A high-end gaming PC is extremely fast, but it does NOT run a Real-Time OS. If a game drops a frame or lags for 0.5 seconds, it's just annoying. In a true RTOS (like in a self-driving car), lagging for 0.5 seconds results in a crash. RTOS is about guaranteed response times, not just raw speed.
Tasks
List 5 main functions of an operating system.
Explain the concept of "time-slicing" in a multitasking operating system. How does it work on a single-core CPU?
A school wants to install a system to manage user accounts, block specific websites, and allow teachers to share a central printer. Which type of OS should they install on their main server, and why?
Compare Batch Processing OS and Real-Time OS in terms of User Interactivity and Time Constraints.
Self-Check Quiz
Q1: Which OS function prevents two programs from trying to use the same block of RAM at the same time?
Q2: Why is batch processing generally done at night?
Q3: Give an example of a hard real-time system constraint.