Introduction
Operating systems can be grouped into categories based on how they schedule work and who or what they serve. A batch operating system processes jobs submitted in groups without user interaction during execution, a time-sharing operating system divides CPU time among multiple interactive users so each feels they have exclusive access, a real-time operating system guarantees a task completes within a strict deadline, and a distributed operating system coordinates multiple physically separate computers so they appear to users as one system.
Cricket analogy: A franchise's video analysis team processes a whole batch of match footage overnight without any live interaction, mirroring how a batch operating system runs a group of jobs without user interaction during execution.
Explanation
Time-sharing operating systems, which are what most desktop and server systems use today, rely on the same process scheduling concepts as a general operating system but are tuned to minimize the delay each interactive user perceives, giving the impression of dedicated access even though the CPU is actually being shared. Real-time operating systems are further split into hard real-time, where missing a deadline is considered a system failure, such as in an aircraft flight control system, and soft real-time, where an occasional missed deadline degrades quality but is not catastrophic, such as in video streaming.
Cricket analogy: A stadium's live scoring system must update the board within a strict fraction of a second of every ball, since a delayed update would be considered a failure, mirroring a hard real-time operating system's strict deadline requirement.
Mobile operating systems, such as those found on smartphones and tablets, are built around touch input, cellular and wireless connectivity, and strict power management to extend battery life, while distributed operating systems coordinate resources across multiple networked machines, presenting a single logical system to users even though the underlying computation may be spread across many physical computers in different locations. Each category makes different trade-offs; a real-time system sacrifices flexibility for predictability, while a general time-sharing system sacrifices strict predictability for flexibility and responsiveness across many different kinds of tasks.
Cricket analogy: A franchise's traveling squad management app is built around a single portable device with limited battery, mirroring how a mobile operating system is built around touch input, connectivity, and strict power management.
Example
# Check the CPU scheduling policy assigned to a running process (Linux)
chrt -p <pid>
# List available scheduling policies, including real-time ones
chrt -mThe chrt command reveals that even a general-purpose time-sharing operating system like Linux supports real-time scheduling policies for individual processes that need stricter timing guarantees, showing that these categories are not always mutually exclusive at the implementation level. A process assigned a real-time policy gets prioritized CPU access ahead of normal time-shared processes, illustrating how a single kernel can blend time-sharing behavior for most tasks with real-time behavior for the specific processes that need it.
Cricket analogy: A franchise's normal training schedule can still carve out a priority slot for an injured player's urgent physio session ahead of everyone else, mirroring how a time-sharing operating system can still grant a process real-time priority.
Key Takeaways
- Batch operating systems process groups of jobs without user interaction during execution.
- Time-sharing operating systems divide CPU time among multiple interactive users, giving each an impression of exclusive access.
- Real-time operating systems guarantee task completion within strict deadlines, split into hard and soft real-time categories.
- Mobile operating systems prioritize touch input, connectivity, and strict power management for battery life.
- Distributed operating systems coordinate multiple networked machines to present a single logical system to users.
Practice what you learned
1. What defines a batch operating system?
2. What is the key difference between hard and soft real-time operating systems?
3. What do mobile operating systems prioritize that general desktop systems typically do not emphasize as heavily?
4. What does a distributed operating system primarily coordinate?
5. What does the Linux chrt command demonstrate about time-sharing systems?
Was this page helpful?
You May Also Like
What Is an Operating System
How an operating system manages a computer's hardware and provides the environment in which applications run.
What Is a Motherboard
How the motherboard acts as the central circuit board that connects the CPU, memory, storage, and peripherals into one working computer.
Binary Number System
How computers represent all data using the base-2 binary number system, built from just two digits, 0 and 1.