Operating Systems, System Software & Architectures
An operating system acts as the foundational system software intermediary between physical computer hardware and user applications. Governing system resources through privileged execution modes, the operating system manages central processing unit scheduling, main memory allocation, secondary storage file structures, and peripheral input-output communication. At its heart lies the kernel, operating in supervisor mode (Ring 0) while user applications execute in restricted user mode (Ring 3) to prevent unauthorized hardware access. Kernels are architecturally divided into monolithic kernels—such as standard Linux, where device drivers, file systems, and memory management run in shared address space for speed—and microkernels, such as Minix and QNX, which maintain only fundamental inter-process communication and low-level scheduling in kernel space, executing drivers in user space for fault tolerance.
Concurrency, process lifecycle, and memory management mechanics represent essential operational responsibilities. A process represents a program in active execution, transitioning through distinct lifecycle states: New, Ready, Running, Waiting (Blocked), and Terminated. The CPU scheduler applies deterministic scheduling algorithms—including First-Come First-Served (FCFS), Shortest Job First (SJF), Round Robin (using predefined time slices or quanta), and Multi-Level Feedback Queues—to optimize throughput, turnaround time, and response latency while preventing deadlock conditions characterized by Coffman's four criteria (Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait). For memory, virtual memory architectures utilize hardware Memory Management Units (MMU) and Translation Lookaside Buffers (TLB) to map virtual page addresses to physical page frames via page tables. Page faults occur when referenced pages reside in swap space on secondary storage, necessitating page replacement algorithms such as Least Recently Used (LRU) or Optimal replacement to minimize thrashing.
Software classification distinguishes application software from system software, which encompasses operating systems, device drivers, firmware, compilers, interpreters, assemblers, linkers, and loaders. During the boot initialization sequence, motherboard firmware—traditionally legacy BIOS (Basic Input/Output System) using Master Boot Record (MBR) partitioning, now predominantly modern UEFI (Unified Extensible Firmware Interface) utilizing GUID Partition Tables (GPT) and Secure Boot—performs the Power-On Self-Test (POST) before executing the primary bootloader. File systems structure persistent data storage, utilizing File Allocation Tables (FAT32), New Technology File System (NTFS), fourth extended filesystem (ext4), or Apple File System (APFS) to manage disk blocks, master file tables, directories, and journaling mechanisms that safeguard data integrity against sudden power failures.
Key Concepts & Examination Highlights
- An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.
- The kernel is the foundational core component of an operating system that maintains complete control over everything in the system.
- Monolithic kernels run all operating system services (VFS, IPC, drivers, memory management) in kernel space address space.
- Microkernels keep only minimal mechanisms (IPC, basic scheduling, address spaces) in kernel mode, running servers in user mode.
- Hybrid kernels combine aspects of microkernel and monolithic kernel architectures, as seen in Windows NT and macOS XNU.
- The CPU switches between User Mode (Ring 3) and Kernel Mode (Ring 0) using hardware-enforced protection rings.
- A system call is the programmatic way in which a computer program requests a privileged service from the operating system kernel.
- A process is an active program in execution containing program counter, stack, registers, and memory segments.
- A thread is the smallest sequence of programmed instructions that can be managed independently by a CPU scheduler (lightweight process).
- The five primary process states in an OS lifecycle are New, Ready, Running, Waiting (Blocked), and Terminated.
- First-Come First-Served (FCFS) is a non-preemptive scheduling algorithm susceptible to the convoy effect.
- Shortest Job First (SJF) is optimal in minimizing average waiting time but can cause starvation for longer execution tasks.
- Round Robin (RR) scheduling allocates a fixed unit of time known as a time quantum or time slice cyclically to ready processes.
- Priority Scheduling executes processes based on assigned priority, which can lead to starvation mitigated by aging techniques.
- Deadlock occurs when two or more processes are unable to proceed because each is waiting for resources held by the other.
- Edward G. Coffman Jr. identified the four necessary conditions for deadlock in 1971: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
- The Banker's Algorithm, formulated by Edsger Dijkstra, is a classic deadlock avoidance algorithm testing safe state transitions.
- Virtual memory creates an illusion for processes that they have contiguous, dedicated physical memory through address virtualization.
- Paging divides virtual address space into fixed-size blocks called pages, and physical memory into blocks called page frames.
- The Memory Management Unit (MMU) is a computer hardware component that translates virtual memory addresses to physical RAM addresses.
- A Translation Lookaside Buffer (TLB) is a hardware memory cache used to reduce the time taken to access user memory page tables.
- A page fault is an interrupt raised by hardware when a program accesses a memory page not currently mapped in physical RAM.
- Thrashing occurs when an operating system spends more execution time swapping pages in and out of memory than executing program instructions.
- Least Recently Used (LRU) is a popular page replacement algorithm that replaces the page that has not been referenced for the longest time.
- Belady's Anomaly is the counterintuitive phenomenon where increasing the number of page frames results in an increase in page faults in FIFO replacement.
- The BIOS (Basic Input/Output System) is legacy firmware that initializes hardware during booting and provides runtime services.
- The Power-On Self-Test (POST) is the initial diagnostic routine executed by BIOS or UEFI upon powering on a computer system.
- UEFI (Unified Extensible Firmware Interface) modernizes BIOS, supporting storage drives larger than 2 TB and Secure Boot verification.
- Master Boot Record (MBR) is an older partition scheme limited to 2 terabytes and four primary partitions per drive.
- GUID Partition Table (GPT) is the standard modern partition table layout utilizing Globally Unique Identifiers and supporting up to 128 partitions.
- GRUB (Grand Unified Bootloader) is a widespread multiboot loader commonly utilized in Linux operating system environments.
- A compiler translates entire high-level source code into machine code or object code before execution takes place.
- An interpreter executes high-level source instructions directly line by line without previously compiling them into object files.
- An assembler converts low-level symbolic assembly language mnemonics into binary machine code instructions.
- A linker combines multiple compiled object files and libraries into a single executable binary program.
- A loader copies the executable binary file from secondary storage into main RAM and prepares it for CPU execution.
- Unix was created in 1969 at Bell Labs by Ken Thompson, Dennis Ritchie, Brian Kernighan, and Douglas McIlroy.
- POSIX (Portable Operating System Interface) is a family of IEEE standards maintaining application compatibility across Unix-like systems.
- Linux is a free, open-source monolithic kernel created by Finnish student Linus Torvalds in 1991.
- GNU Project was launched in 1983 by Richard Stallman to create a completely free Unix-like operating system.
- Debian, Ubuntu, Fedora, Red Hat Enterprise Linux (RHEL), and Arch Linux are prominent Linux distributions (distros).
- The FAT32 (File Allocation Table) file system has a maximum single file size limitation of 4 gigabytes.
- NTFS (New Technology File System) is the proprietary journaling file system developed by Microsoft for Windows NT.
- ext4 (fourth extended filesystem) is the default journaling file system for numerous modern Linux distributions.
- APFS (Apple File System) is the default 64-bit copy-on-write file system utilized across Apple macOS and iOS platforms.
- A journaling file system logs changes to a dedicated journal before committing them to the main storage volume to prevent data corruption.
- In Linux and Unix systems, standard process 1 with Process ID (PID) 1 is the initial system process, commonly systemd or init.
- Context switching is the process of storing the CPU state of an active process so execution can resume later, enabling multitasking.
- Device drivers are specialized system software programs that enable operating systems to communicate with hardware peripherals.
- Real-Time Operating Systems (RTOS), such as FreeRTOS and VxWorks, guarantee deterministic execution deadlines for embedded systems.
Sample Solved Questions & Concept Explanations
8 Verified Concept QuestionsWhich hardware execution ring provides the highest privilege level where the operating system kernel executes?
Who created the free, open-source Linux kernel in 1991?
Which CPU scheduling algorithm allocates a fixed slice of execution time known as a time quantum cyclically to ready processes?
Which of the following is NOT one of Coffman's four necessary conditions for deadlock in operating systems?
What condition occurs when an operating system spends more time swapping pages in and out of secondary storage than executing active instructions?
What is the maximum single file size limit supported by the FAT32 file system?
Which hardware component translates virtual page addresses generated by software into physical memory addresses in RAM?
Which software utility combines multiple compiled object code modules and libraries into a single executable binary program?