Table of Contents
An operating system (OS) is an essential software program that manages the hardware and software resources of a computer. It acts as an intermediary between computer hardware and the end user, making the computer system convenient to use. Operating systems have evolved greatly over the decades, from basic systems designed to manage tape storage to modern OSes powering smartphones in people‘s pockets. This comprehensive tutorial will walk you through the key concepts, functions, components, types, history and future trends of operating system software.
What is an Operating System?
At its most basic level, an operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. It provides the foundation on which all application software on a device runs.
Some key responsibilities handled by operating systems include:
- Process management – Creating and terminating processes, allocating system resources to processes, facilitating inter-process communication and synchronization
- Memory management – Allocating memory space as per process requirements and need. Implementing virtual memory for efficient memory usage.
- File management – Organizing data storage over disk volumes, data retrieval, access permissions and data protection
- Device management – Managing input/output devices like printers and ensuring coordinated working
- Handling system security and user authentication
- Providing application environment and user interface for program execution and usage
Without an operating system, a computer is just hardware and cannot be used productively. The OS hides the complex low-level details of hardware operation from users and applications through several abstractions and interfaces. This makes using a computer convenient.
History and Evolution of Operating Systems
The first operating systems were developed in the late 1950s. They were designed to make more efficient use of computer systems mainly involving magnetic tapes for data storage. Primitive job control languages allowed orchestrating batch jobs on the system.
Later in the 1960s, operating systems with support tape storage systems were upgraded to support disk storage systems. Multiprogramming systems like CTSS were developed allowing multiple programs to be loaded in memory and increasing CPU utilization. Time-sharing operating systems were developed allowing multiple users to use a system through terminals at the same time.
The 1960s also saw seminal commercial OSes being deployed by IBM and DEC. IBM developed the S/360 system for mainframe systems. DEC developed TOPS-10 operating systems for the PDP line of computers.
In the 1970s, research efforts resulted in experimental OS architectures. The advancement of microprocessors paved the way for distributed computing through computer networking. Steve Job‘s Apple II and Bill Gate‘s DOS operating system brought personal computers into the mainstream.
The 1980s was marked by the launch of classic operating systems like MS-DOS, CP/M 86, Mac OS, and Unix. The 1990s saw Microsoft launching the Windows family of operating systems, which would go on to dominate the desktop and laptop market along with improvements in supporting GUIs, networking and protected memory systems.
In the 2000s, Linux expanded its presence significantly proving a real alternative for commercial Unix deployments on servers and mainframes. The explosion of mobile devices was made possible by the launch of iOS and Android operating systems that could support the constraints of smartphones and tablets. Device convergence led to similar OS architectures being used across smartphones, tablets, and even vehicles.
As OSes have evolved from batch systems to interactive timesharing systems all the way to complex Internet-enabled OSes across a variety of devices from servers to wearables, key focus areas have been support for multiprocessing, multitasking, computer networking as systems became more sophisticated and complex. Today operating systems power systems across a vast continuum – from high performance computing clusters to gamer‘s entertainment rigs to literally billions of smartphones and devices.
Types of Operating Systems
There are several ways to categorize operating systems based on their technical architecture design goals and operational environments:
Batch Operating Systems
Early operating systems were designed as batch systems. In a batch OS, there is no direct interaction between the user and the system. Users prepared their programs on an off-line peripheral device like a punch card and submitted them in batches to operators to run. Output was collected later after job completion. The operator needed to schedule programs based on run time to minimize wait times. Batch operating systems include early versions of IBM‘s FCOS and OS/360.
Time-sharing Operating Systems
Time sharing operating systems were designed to support multiple users using the system simultaneously. This was made possible by CPU time-sharing – rapidly switching between multiple processes allowing the illusion of simultaneity. Core concepts here include preemptive multitasking, multiprocessing, computer networking. Examples include Multics, UNIX, VMS, OS-9, CTSS.
Distributed Operating Systems
Distributed systems consist of multiple independent CPUs interconnected through a computer network that communicate and coordinate actions by passing messages to each other. Distributed computing aims to use large numbers of processors to achieve higher performance at lower cost. Examples include LOCUS, Mach, ChorusOS.
Network Operating Systems
Network operating systems are designed to support client-server computing architecture across a LAN or WAN. It provides networking capabilities and may support thousands of users in a network. Microsoft Windows Server, Apple macOS Server, Linux and BSD distributions are examples of network operating systems.
Real-Time Operating Systems
Real-time operating systems contain features for precise, deterministic and fast execution for use in environments where an failure can be catastrophic. They monitor and respond to inputs within strict time constraints and are used to control scientific experiments, medical imaging systems, industrial control systems and more. Examples include FreeRTOS, VxWorks, QNX, PikeOS, and ThreadX.
Embedded Operating Systems
Embedded operating systems are designed for mobile devices and embedded system environments. They are designed to use fewer resources like CPU processing power, system memory (RAM) and storage. They are often real-time operating systems with additional features for security and running for years without rebooting. Examples include FreeRTOS and ThreadX running on ARM devices.
There are other domain-specific operating systems designed for multimedia systems like A/V editing (MediaCentral), Datacenter servers (Z/OS, z/VSE), Smart devices, etc. But the above categories capture most general-purpose operating system designs.
Operating System Components
An operating system provides multiple components and interfaces to manage how applications or users interact with computer hardware. Key components include:
1. Kernel
The kernel is the central component of an operating system. It interacts closely with the processor and hardware interfaces to execute low-level tasks like process scheduling, memory management, disk access, handling interrupts and I/O communications. There can be different types of kernels like monolithic kernels, layered kernels and microkernels
2. System Calls
System calls are APIs the kernel provides to end user programs to access hardware resources managed by the operating system and carry out privileged actions like I/O access that require permission.
3. Drivers
Device drivers are programs that control and communicate with hardware devices attached to the system like printers, disk drives, video adapters etc. These provide a consistent way to address hardware from a user program through the operating system.
4. File systems
The file system provides logical data storage and retrieval functions for accessing data stored in logical volumes residing on hard disks and other storage media. It provides a hierarchical view of data storage and controls access permissions, quotas and data protection.
5. User Interface
The user interface provides an interaction method for the end user to operate the computer and use application programs. Command line interfaces and Graphical User Interfaces (GUI) are common. Advanced interfaces now include voice commands, gestures and augmented reality as well.
Key Functions of an Operating System
Operating systems need to perform many key functions to effectively manage system resources for efficient use. Let‘s discuss some major responsibilities handled by a typical operating system:
Process Management
The operating system handles creating, scheduling and terminating processes. This includes facilities for parallel processing on multicore systems, interprocess communication and synchronization required for instance in multithreaded programs.
Main Memory Management
This involves allocation, de-allocation and assignment of memory chunks to programs as needed. The memory manager handles storage hierarchy management and mapping virtual memory to physical memory through techniques like paging and segmentation.
Secondary Storage Management
The file system provides long term storage through efficient and logical organization of data on storage devices. The operating system manages mount points, storage volumes, data abstraction through hierarchical directories, metadata, access control, caching and space allocation.
I/O System Management
This subsystem hides low level hardware specifics from other modules through device abstraction and handles tasks like buffering, spooling, buffering and allocation/de-allocation of I/O devices like printers and optical drives to requesting processes.
Security
Operating systems contain security modules to protect against malware, worms, data loss and unauthorized access to system resources using authentication, permissions, encryption and other security mechanisms.
Command Interpretation
Command interpreters translate user commands typed into a CLI or instructions from application programs into a format understandable by the operating system so that those requests can be serviced.
Networking and communication management
Networking capabilities like managing communication protocols, file access across networked systems, routing, frame/packet generation & relaying is handled by this subsystem.
Operating systems provide tons of other helper facilities including debugging aids, system logs, performance monitoring tools, resource use accounting aids and more. But most core OS responsibilities revolve around the above primary functions.
Benefits of an Operating System
Operating systems provide several key benefits that make computers convenient to use:
Abstraction and Ease of Use
The OS provides abstraction between low level hardware details and the end user. This simplifies usage through high level models and interfaces. The user does not need hardware knowledge to use the computer productively.
Portability and Interoperability
OS interfaces enable application portability, so programs can run across UNIX/Linux or Windows environments. Standards help communication between independently created programs.
Multitasking and Concurrency
Modern operating systems enable simultaneous execution of multiple applications through advanced concurrency mechanisms and fast context switching. This improves productivity.
Optimized Performance
Sophisticated memory management results optimal utilization of memory usage and storage for acceptable performance. Mechanisms like virtual memory, I/O scheduling, caching, paging help here.
Security and Access Control
Centralized control over computer resources allows managing security policies, user permissions, anti-malware scanners and encryption capabilities for data security.
Reliability
Reliability features like journaling, volume mirroring, fail safe and transaction support mechanisms enable faster crash recovery and prevent data loss.
Networking and Communication
Modern OSes allow users to access applications and data hosted centrally through computer networking via domain services, cloud-based infrastructure reducing costs substantially.
Graphical User Interfaces
Visual interfaces have replaced archaic command-line interfaces for most general purpose usage thanks to available computing resources thereby improving ease of use.
Drawbacks of Operating Systems
Of course, there are some pain areas associated with using operating systems event though they provide many benefits:
Complexity & Hardware Needs
Modern OSes have become bulky demanding significant hardware resources, yet lacking in speed or vulnerability free operations. Multimedia demands have increased complexity.
Stability & Reliability Issues
Despite extensive testing, issues like race conditions, deadlocks and related glitches that cause system crashes or freezes requiring reboots affect reliability and trust.
Security Threats
Viruses, worms, malware have exposed data vulnerability problems despite layered defenses demanding constant vigilance through technical and administrative controls.
Cost
Proprietary commercial OSes require significant investment in licenses, tools and labor for deploying and maintaining mission critical environments securely and that needs budgeting for.
Lack of Customizability
Enterprise users often struggle to customize OS behavior as per their operational needs within reasonable effort. Complexity adds hindrances and costs here.
32-bit vs 64-bit Operating Systems
Modern desktop, servers and mobile systems use predominantly either 32-bit or 64-bit operating systems. What does that mean? Which one to choose?
Fundamentally, the central processing unit (CPU) performs calculations and logical comparisons on chunks of data called registers. A 32-bit CPU has data registers, memory address registers and internal data buses 32 bits wide allowing it to process 32 bits of data at once. A 64-bit CPU can process data chunks 64 bits wide doubling throughput.
Hence, 64-bit hardware and software systems:
- Can address vastly more physical memory – up to 128 GB for 32-bit vs 128 PB for 64-bit
- Perform faster computations using wider data paths & extra registers
- Offer enhanced security through features like ASLR unavailable in 32-bit environments
The width of the registers that a CPU uses to manipulate data internally and the corresponding external buses determines maximum memory addresses directly. 32-bits means 2^32 memory locations can be addressed, or 4 GB total RAM support for the processor, which is why 32-bit systems cannot use more RAM.
Similarly, 2^64 locations can be addressed by 64-bit CPUs, leading to massive 16 EB (Exabyte) memory capacity support enabling high performance systems to process Big Data applications for instance.
Hence, 64-bit computing is almost necessary for servers and intensive computing tasks today. For personal computing, both 32-bit and 64-bit operating systems are still commonly used based on available applications and hardware. Early 64-bit adoption challenges led to almost all modern OSes offering both 32-bit and 64-bit execution environments to ease transitions.
The Future of Operating Systems
Operating systems have come a long way from the batch processing environments of the 1950s to space exploration systems on Mars rovers to neural network driven voice assistants on smartphones today.
Future OS research is focusing on multiple frontiers simultaneously including security, distributed computing, embedded systems, reliability and adoption of machine learning based approaches.
Some interesting problems being tackled involve:
- Using hypervisor models and containerization to isolate processes and data across users, devices and applications especially on cloud platforms
- Leveraging AI/ML to improve heuristic threat detection from malware and prediction of failures.
- Stronger access controls and policy customizations tailored to mobile platforms
- Streamlined patching, upgrades and disaster recovery through centralized configuration management
- Seamless synchronization and aggregation of data across devices per user / account
- Low overhead real-time analytics for IoT and edge deployments
- Continued convergence of OS, networking and storage layers with database systems
Of course, keeping systems secure via proactive threat modeling and architectural shifts would be crucial going forward given increasing attacks targeting weaknesses in computer systems these days rather than just stealing isolated information.
The last decade has seen open source operating systems successfully disrupt traditional vendor landscapes through strong community involvement and faster feature upgrades. The rise of platforms like Kubernetes and OpenStack enabling cloud deployments promises to only accelerate such adoption further.
Exciting new application needs from autonomous vehicles to immersive gaming systems will continue influencing operating system designs heavily as computation and data generation grows worldwide. Undoubtedly, operating systems will continue evolving fast to power next-generation computing infrastructure in the decades ahead.