Fundamental Concepts of Operating Systems
An operating system is system software that manages computer hardware, software resources, and common services for computer programs. It acts as an intermediary between the user, application software, and physical hardware components like the central processing unit, main memory, and storage devices. Without an operating system, a computer cannot load programs, organize files, or process user input.
Core Architecture and Structural Layers
The Kernel Layer
- The kernel is the central core program of an operating system that loads first during startup and remains permanently in primary memory.
- It directly controls hardware access, allocates processor time, manages system memory, and responds to hardware interrupts.
- A monolithic kernel executes all operating system services, including file systems, virtual memory, device drivers, and system calls, in a single privileged memory space. Examples include Linux and traditional Unix.
- A microkernel keeps only the bare minimum services in privileged kernel space, such as low-level memory management and basic inter-process communication, while running device drivers and file systems in user space. Examples include QNX and MINIX.
- A hybrid kernel combines the modular architecture of microkernels with the performance benefits of monolithic kernels. Examples include the Windows NT kernel and Apple macOS XNU kernel.
Shell and System Calls
- The shell is the outer software layer that acts as the user interface, interpreting commands entered by a user and passing them to the kernel.
- A Command-Line Interface shell takes text commands, with standard examples including Bash in Linux and PowerShell in Windows.
- A Graphical User Interface shell provides visual interaction through windows, icons, menus, and pointers.
- A system call provides the formal programmatic interface through which a running application requests services directly from the kernel.
- Standard system calls include fork to create child processes, exec to run new programs, read and write for input-output operations, and exit to terminate a process.
Primary Functions and Management Subsystems
Process and CPU Scheduling
- A process is a program in active execution, consisting of program code, current activity, processor registers, and an allocated memory stack.
- The CPU scheduler selects which ready process in memory gets processor execution time based on defined scheduling algorithms.
- First-Come, First-Served schedules processes in the direct order of arrival without preemption.
- Shortest Job Next executes the process requiring the least CPU burst time first.
- Round Robin assigns a fixed time slice or quantum to each process cyclically to support multitasking.
- Priority Scheduling allocates CPU time based on assigned priority levels, which can be preemptive or non-preemptive.
Memory Management and Virtual Memory
- The memory manager allocates and deallocates memory blocks dynamically to running processes.
- Paging divides physical computer memory into fixed-size blocks called frames and divides logical process memory into identical blocks called pages.
- Segmentation divides logical memory into variable-sized units called segments, which match logical modules like functions, arrays, or data stacks.
- Virtual memory uses hard disk or solid-state drive space to simulate extra physical RAM.
- The Memory Management Unit uses page tables to translate virtual logical addresses generated by the CPU into actual physical RAM addresses.
- A page fault occurs when a program tries to access a data page that is mapped in virtual address space but not currently loaded into physical RAM.
File and Storage Management
- The file system organizes digital files into directory hierarchies, managing file naming, storage allocation, and read-write access permissions.
- Allocation methods include contiguous allocation, linked list allocation, and indexed allocation using pointers.
- File allocation tables (FAT32), New Technology File System (NTFS), and extended file systems (ext4) represent standard file systems used across storage media.
Device and Input-Output Management
- Device drivers are specialized software programs that allow the operating system kernel to communicate with specific hardware peripherals.
- Interrupt handlers process hardware signals that temporarily pause the CPU to service urgent hardware requests.
- Direct Memory Access controllers transfer data blocks directly between peripheral devices and main memory without continuous CPU intervention.
Major Operating System Types and Architectures
| Operating System Type | Primary Operational Characteristic | Response / Processing Model | Representative Examples |
| Batch Operating System | Groups similar computing jobs into batches without direct user interaction during execution | Sequential batch processing | IBM OS/360 |
| Time-Sharing OS | Allocates rapid CPU time slices among multiple concurrent users | Interactive multi-user time multiplexing | Unix, Linux |
| Distributed OS | Coordinates multiple autonomous computational nodes communicating over a network | Shared network resource distribution | Apache ZooKeeper environments, Amoeba |
| Real-Time OS (Hard) | Guarantees strict completion of critical tasks within precise time deadlines | Zero-tolerance deterministic response | VxWorks, RTLinux, FreeRTOS |
| Real-Time OS (Soft) | Prioritizes critical tasks without causing total system failure if deadlines slip | High-priority best-effort execution | PlayStation OS, multimedia streaming systems |
| Network OS | Manages shared file access, printer sharing, and security over a local area network | Client-server network services | Windows Server, Novell NetWare |
| Embedded OS | Compact system dedicated to running specific functions within consumer or industrial hardware | Resource-constrained, dedicated microcode | Android Auto, Embedded Linux |
Operating Modes and System Security
Dual-Mode Operation
- Modern microprocessors use hardware status bits to enforce dual-mode operation: User Mode and Kernel Mode.
- User Mode executes standard applications with restricted instruction sets and isolated memory areas to prevent unauthorized system modifications.
- Kernel Mode, also called Supervisor Mode or Privileged Mode, grants direct, unrestricted execution access to all CPU instructions and physical memory addresses.
- The transition from user mode to kernel mode occurs through hardware interrupts, software exceptions, or explicit system calls.
Deadlock Conditions
- A deadlock occurs when a set of concurrent processes are permanently blocked because each process holds a resource while waiting for another resource held by another process.
- The four Coffman conditions must hold simultaneously for a deadlock to occur: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
- Deadlock handling techniques include prevention, avoidance using algorithms like Dijkstra’s Banker’s Algorithm, detection, and recovery.
Facts
- An operating system is the primary system software required to initialize and manage computer hardware.
- The Master Boot Record or UEFI firmware initializes hardware checks before loading the operating system bootloader into memory.
- Linux is an open-source monolithic kernel developed by Linus Torvalds in 1991.
- Unix was created in 1969 at Bell Labs by Ken Thompson, Dennis Ritchie, and their team.
- The kernel is the core component that remains resident in primary memory throughout computer operation.
- System calls switch execution from restricted user mode to privileged kernel mode.
- The four necessary conditions for deadlock are Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
- Dijkstra’s Banker’s Algorithm is a standard algorithm used for deadlock avoidance in multi-process systems.
- Thrashing happens when excessive page replacement causes the operating system to spend more time swapping data than executing instructions.
- Direct Memory Access allows hardware peripherals to read and write directly to main memory without loading the CPU.
- Spooling stands for Simultaneous Peripheral Operations On-Line, used to queue print jobs and peripheral tasks.
- RTOS platforms like VxWorks and RTLinux are used in mission-critical applications including aerospace navigation, pacemakers, and industrial control.
Originally written on
December 19, 2015
and last modified on
August 18, 2026.