CoursifyCoursify

Fundamentals of Operating System Architecture and Resource Management

Fundamentals of Operating System Architecture and Resource Management

Verified Sources
May 18, 2026

An Operating System serves as the intermediary between computer hardware and the application software. At its core, the operating system manages resources, enforces security boundaries, abstracts hardware complexities, and schedules execution.

The Core Architectural Component: The Kernel

The absolute heart of any operating system is the Kernel. It is loaded into memory during boot and remains active continuously to manage memory allocation, process scheduling, and hardware peripheral access.

Architecturally, kernels are designed primarily in one of two fundamental styles:

  • Monolithic Kernel: In this architecture, all system services (including the Virtual File System, device drivers, scheduler, and memory manager) run within a single, highly privileged address space.
  • Microkernel: In a microkernel design, the kernel space is stripped down to the bare necessities—typically thread management, physical memory allocation, and Inter-Process Communication (IPC). All other services run in User Space as isolated servers.

Footnotes

  1. Computer Basics: Understanding Operating Systems - Overview of hardware management, process control, and system abstraction.

  2. Introduction to Operating Systems - Neso Academy's lecture on memory hierarchies, kernel types, and process management. 2 3

Operating Systems: Crash Course Computer Science #18

Kernel Space vs. User Space

Modern CPUs use hardware rings (such as Intel x86 Ring 0 and Ring 3) to enforce security boundaries. Ring 0 (Kernel Space) grants unrestricted access to physical hardware instructions. Ring 3 (User Space) restricts applications to a sandboxed environment where direct hardware interaction is strictly prohibited. Programs must transition to Ring 0 via system calls to request system resources.

Process Lifecycle and CPU Scheduling

A Process is the primary unit of work inside an operating system. To manage these active execution contexts, the operating system maintains a 5-state process lifecycle model, transition states, and scheduling queues.

Memory Management: Paging and Virtual Memory

To provide isolation and stability, modern operating systems implement Virtual Memory. Through virtual memory, each process acts as if it has a contiguous, private address space.

This abstraction relies on:

  1. Paging: Dividing virtual address spaces into fixed-size chunks called pages and mapping them to physical frames in RAM.
  2. Memory Management Unit (MMU): A dedicated hardware controller that translates virtual addresses to physical RAM addresses on the fly.
  3. Page Table: A data structure managed by the kernel that keeps track of the mappings between virtual pages and physical memory frames.
  4. Page Fault: An interrupt triggered by the MMU when a process attempts to access a page that resides on secondary storage (swap space) instead of active RAM.

Footnotes

  1. Computer Basics: Understanding Operating Systems - Overview of hardware management, process control, and system abstraction.

  2. Introduction to Operating Systems - Neso Academy's lecture on memory hierarchies, kernel types, and process management. 2

The Step-by-Step Process of a Context Switch

  1. 1
    Step 1

    An external event (such as a timer interrupt or peripheral input) or a software trap (such as a system call) interrupts the currently running process.

  2. 2
    Step 2

    The CPU registers, instruction pointer (program counter), and process flags are pushed onto the process's kernel stack and saved into its Process Control Block (PCB).

  3. 3
    Step 3

    The kernel updates the state of the active process from 'Running' to 'Ready' or 'Blocked', and moves it to the appropriate scheduler queue.

  4. 4
    Step 4

    The OS CPU scheduler executes its selection algorithm (e.g., Round Robin or Multi-Level Feedback Queue) to determine the next process to execute.

  5. 5
    Step 5

    The kernel retrieves the target process's PCB, restores its saved register state, and configures the MMU's page table registers to point to the new process's virtual memory mapping.

  6. 6
    Step 6

    The CPU changes state back to user execution privilege (Ring 3), sets the program counter to the saved instruction pointer, and begins executing the selected process.

Round Robin (RR) Scheduling

Round Robin is a preemptive scheduling algorithm designed for time-sharing systems. Each process is assigned a small unit of CPU time, called a time quantum (typically 10-100 milliseconds).

Key Characteristics:

  • If a process finishes before its quantum expires, it yields the CPU voluntarily.
  • If a process runs longer than the quantum, the OS preempts it and places it at the tail of the ready queue.
  • Highly effective for keeping response times low, though context switching overhead increases if the time quantum is configured too low.

Architectural Comparison Matrix

Comparing Monolithic and Microkernel architectures across core attributes (Scale: 1-10, higher is better)

The Danger of Thrashing

If the combined working sets of all active processes exceed the physical memory available on the system, the operating system will spend more time swapping pages in and out of secondary storage than executing instructions. This pathological state is known as thrashing and can cause system responsiveness to stall.

Advanced Operating System Architectures & Edge Cases

Knowledge Check

Question 1 of 3
Q1Single choice

Which of the following kernel designs is characterized by running core operating system services (like file systems and device drivers) as user-space processes?

Explore Related Topics

1

Fundamentals of Computer Networks: Data Representation, Data Flow, Topologies, Protocols, OSI Model, and Transmission Media

Computer networking fundamentals are presented, covering how data is encoded, moved, and structured across layered protocols, topologies, and physical media.

  • Binary representation (00s and 11s) and encapsulation transform user data into segments, packets, frames, and bits.
  • Data flow modes (simplex, half‑duplex, full‑duplex) and link configurations (point‑to‑point vs. multipoint) affect throughput and latency.
  • Common topologies (bus, star, ring, mesh, tree, hybrid) with mesh link count n(n1)2\frac{n(n-1)}{2} dictate reliability and cost.
  • The OSI 7‑layer model defines PDUs (data, segment, packet, frame, bits) and isolates troubleshooting per layer.
  • Transmission media are split into guided (twisted pair, coaxial, fiber‑optic) and unguided (radio, microwave, infrared) options, chosen based on bandwidth, distance, EMI resistance, and expense.
2

Fundamentals of Microprocessors

Microprocessors are the central processing units of computers, built on the Von Neumann architecture and composed of an ALU, register array, and control unit that work together via internal and external buses. The course covers the instruction cycle, performance considerations, and contrasts CISC and RISC designs.

  • ALU performs arithmetic/logic; registers provide sub‑clock‑cycle access; CU decodes instructions and generates control signals.
  • Instruction cycle: Fetch (PC increments), Decode (opcode → control signals), Execute (ALU operation, write‑back, flag update).
  • Registers are far faster than external RAM, so maximizing their use reduces latency.
  • Pipelining speeds execution but branch instructions cause pipeline flushes, adding delay.
  • CISC emphasizes complex, variable‑length instructions; RISC uses simple, fixed‑length, register‑centric instructions requiring more registers but enabling one‑cycle execution.
3

Process Scheduling in a Multiprogramming Operating System

Process scheduling is the OS mechanism that selects which ready process runs on a single CPU in a multiprogramming system, keeping the processor busy while processes alternate between CPU and I/O bursts.

  • Aim: maximize CPU utilization and throughput, minimize turnaround, waiting, and response times.
  • The short‑term scheduler picks a ready process (e.g., FCFS, priority, round‑robin) and the dispatcher performs the context switch.
  • Metrics: Turnaround Time=Completion TimeArrival Time \text{Turnaround Time}= \text{Completion Time} - \text{Arrival Time}, Waiting Time=Turnaround TimeCPU Burst Time \text{Waiting Time}= \text{Turnaround Time} - \text{CPU Burst Time}; trade‑offs mean no policy optimizes all goals, and favoring short jobs can cause starvation, requiring fairness mechanisms such as aging.
Chat with Kiro