1. The Evolution of Computing: From Batch Processing Despair to Time-Sharing Interactivity
Imagine you are a university computer science student in 1962. You have spent four grueling nights writing an algorithm to compute matrix eigenvalues. You sit at a mechanical keypunch machine, carefully punching holes into an 80-column cardboard deck of cards. You walk down to the basement computer center, hand your deck to a white-coated system operator, and are told: "Check back tomorrow afternoon for your printout."
Twenty-four hours later, you eagerly collect your green-bar printout only to read a single devastating line on page one: SYNTAX ERROR ON CARD 14: MISSING COMMA. Your entire 24-hour turnaround cycle was wasted on a single typographical slip. In this early era of Batch Processing, the central mainframe computer executed one job at a time from start to finish. If that job spent minutes waiting for a slow magnetic tape drive or card reader to read input, the multi-million-dollar CPU sat completely idle, spinning useless clock cycles while dozens of scientists and students waited outside in frustration.
The Four Epochs of OS Architecture: Clarifying the Taxonomy
One of the most frequent point deductions on undergraduate Operating Systems midterms stems from confusing adjacent architectural terms: Uniprogramming, Multiprogramming, Multitasking (Time-Sharing), and Multiprocessing. Let us construct a rigorous taxonomy:
| Architectural Epoch | Processes in RAM | Preemption Mechanism | Primary Design Goal | User Interaction | Representative Systems |
|---|---|---|---|---|---|
| Uniprogramming | Single process at any time | None (runs until halt or exit) | Direct hardware utilization | Single user / Hands-on console | Early mainframes, MS-DOS 1.0 |
| Multiprogramming (Batch) | Multiple processes in memory | Cooperative (Yields ONLY upon I/O block) | Maximize CPU Utilization: Keep CPU busy when a job waits for disk | None (Jobs submitted as offline batch decks) | IBM OS/360, CDC Scope |
| Time-Sharing (Multitasking) | Multiple interactive processes | Preemptive Time Quantum (q): Enforced via hardware timer interrupt | Minimize Response Time: Provide instantaneous feedback to concurrent interactive users | High (Direct interactive shells, terminals, GUIs) | MIT CTSS, MULTICS, UNIX, Linux, Windows 11, macOS |
| Multiprocessing | Multiple processes across multiple cores | Hardware multi-core parallel preemption | True simultaneous physical parallelism and maximum throughput | Concurrent multi-threaded interactive desktop & cloud servers | Modern SMP Linux, macOS (Apple Silicon), Windows Server |
The Formal Definition of a Time-Sharing Operating System
A Time-Sharing Operating System (TSOS) is a logical extension of multiprogramming wherein a single Central Processing Unit (CPU) is rapidly multiplexed among multiple concurrent users and active processes through the allocation of predetermined, small temporal intervals known as Time Slices or Time Quanta ($q$).
By switching the CPU between processes every few milliseconds (typically 10ms to 100ms), the operating system creates the virtual illusion that each connected user possesses a private, dedicated processor. Pioneer Fernando Corbató and his team at MIT demonstrated this breakthrough in 1961 with the Compatible Time-Sharing System (CTSS) on the IBM 7094, followed by MULTICS and Ken Thompson and Dennis Ritchie's creation of UNIX in 1969 — the direct ancestor of modern Linux, macOS, iOS, and Android.
2. The Core Mechanics: Time Slicing (Quantum), Round-Robin & Context Switching
To deliver the experience of simultaneous execution on a single central processing core, the operating system relies on an intricate symphony of hardware clocks, interrupt handlers, and kernel data structures. At the center of this engine sits the Round-Robin (RR) CPU Scheduler coupled with a physical Programmable Interval Timer (PIT).
Hardware Foundations: The Timer Interrupt Engine
How does the operating system regain control of the CPU if a user program enters an infinite loop like while(1) {}? In early cooperative systems, the entire machine would lock up until manually rebooted. Time-sharing systems solve this via hardware interrupts:
- The Quartz Crystal Countdown: The motherboard incorporates a hardware timer (such as the Intel 8254 PIT or the modern Local APIC Timer). The OS initializes this timer chip with a countdown counter corresponding to the system's time quantum (e.g., 20 milliseconds).
- The Hardware Interrupt: The timer decrements at a fixed quartz frequency. When the counter reaches zero, the chip pulls the CPU's physical interrupt line high (generating
IRQ 0). - Privilege Escalation (Ring 3 → Ring 0): The hardware CPU immediately suspends execution of the current user program, saves the Instruction Pointer (
RIP) and Flags to the kernel stack, and transfers execution to the kernel's registered Interrupt Service Routine (ISR) running in privileged Ring 0.
sequenceDiagram
autonumber
participant App as User Process (Ring 3)
participant CPU as CPU Hardware & PIT Timer
participant Kernel as OS Kernel Scheduler (Ring 0)
participant RAM as Memory (PCBs & Ready Queue)
App->>CPU: Executing user instructions...
Note over CPU: PIT Countdown reaches zero!
CPU->>Kernel: Hardware Interrupt (IRQ 0) Triggered!
Note over Kernel: Mode Switch to Ring 0 (Privileged)
Kernel->>RAM: Save running Process Context (PCB_A)
Kernel->>Kernel: Scheduler evaluates Ready Queue (Round-Robin)
Kernel->>RAM: Load incoming Process Context (PCB_B)
Kernel->>CPU: Update CR3 Page Table & Restore Registers
CPU->>App: IRET: Resume Process B in User Mode (Ring 3)
Inside the Process Control Block (PCB): What State is Swapped?
When the CPU preempts Process A to run Process B, the operating system must capture an exact snapshot of Process A's execution state so it can resume later as if nothing happened. This snapshot is stored in the Process Control Block (PCB):
| PCB Component | Hardware Registers / State | Critical Role in Context Switching |
|---|---|---|
| Program Counter (PC) | EIP / RIP |
Points to the exact machine instruction where Process A was interrupted. |
| General Purpose Registers | RAX, RBX, RCX, RDX, RSI, RDI, R8-R15 |
Contains live in-flight variables, loop counters, and arithmetic results. |
| Stack Pointers | RSP (Stack Pointer), RBP (Base Pointer) |
Preserves the active function call stack, local variables, and return addresses. |
| Memory Management State | CR3 Register (Page Table Base), Segment Selectors |
Dictates the virtual-to-physical address space mappings for memory protection. |
| I/O & File Status | File Descriptor Table, Socket Handles | Tracks open file offsets, pending network buffers, and terminal connections. |
The Real Cost: Measuring Context Switch Latency
A context switch is pure computational overhead: during the switch, the CPU is performing zero useful work for the user. A typical context switch consumes between 1,000 and 5,000 CPU clock cycles (∼1 to 5 microseconds). Worse still is the hidden penalty: CPU Cache Pollution. When Process B runs, it evicts Process A's hot data lines from L1 and L2 caches, and replacing the CR3 register forces a flush of the Translation Lookaside Buffer (TLB). When Process A resumes, it suffers hundreds of memory stall cycles reloading its working set.
- If q is too small (< 1ms): The system spends more time switching between processes than running user code! If context switch cost C = 1ms and q = 1ms, 50% of the CPU's total horsepower is wasted on administrative overhead.
- If q is too large (> 500ms): Round-Robin degenerates into non-preemptive First-Come-First-Served (FCFS) batch scheduling. Short interactive jobs (like echoing a keystroke in a terminal) become trapped behind heavy compute jobs, destroying user responsiveness.
- The Empirical Rule of Thumb: In production operating systems, the time quantum is chosen such that approximately 80% of CPU bursts are shorter than q (typically 10ms to 50ms in desktop kernels).
Interactive Simulation: Explore Time Slicing & Preemption Live
Use the interactive simulation below to observe CPU scheduling dynamics in real time. Switch between a Tiny Quantum (q=2), Balanced Quantum (q=4), and Large Quantum (q=8) to watch how quantum sizing directly impacts the CPU Efficiency ratio (η) and Average Response Time.
Interactive Round-Robin Time Slicing, Context Switching & Multi-User Process Queue. Click Step Tick to advance the hardware timer and witness instruction execution, or toggle the Time Quantum (q) to examine how quantum length balances interactive response latency against context-switching overhead. Click + Add Task to spawn new interactive user jobs into the Ready Queue!
Time-Sharing CPU Scheduling Invariants & Mathematical Formulations for CS Students
A Time-Sharing Operating System relies on preemptive multiprogramming with a fixed hardware-enforced Time Quantum ($q$) to grant each interactive user or thread rapid, cyclical access to the CPU. The scheduler utilizes a First-In-First-Out (FIFO) Ready Queue structured as a circular Round-Robin ring.
| Operating System Paradigm | Primary Architectural Goal | Scheduling Policy | Typical Quantum (q) | User Responsiveness | Context Switch Overhead |
|---|---|---|---|---|---|
| Time-Sharing (Multitasking) | Minimize Response Time ($T_{response}$) for interactive users | Preemptive Round-Robin / Multilevel Feedback Queue | 10ms – 100ms (PIT tick) | High (Sub-second interactive feedback) | Moderate (1 μs – 5 μs per switch) |
| Batch Processing | Maximize Batch Throughput & CPU Utilization | Non-preemptive FCFS or Shortest Job First (SJF) | None (q → ∞) | Zero (Hours/days turnaround) | Negligible (Only between entire jobs) |
| Real-Time OS (RTOS) | Guarantee Hard/Soft Deterministic Deadlines | Preemptive Earliest Deadline First (EDF) / Rate Monotonic | Event-driven / Microsecond ticks | Strict Determinism (Hard deadlines) | Ultra-low bounded latency |
Key Mathematical Formulations for Examinations:
- CPU Efficiency (η): η = q / (q + C) × 100%, where q is the time quantum and C is the hardware context switch latency. As q approaches 0, efficiency drops to 0% (pure thrashing).
- Maximum Bounded Waiting Time: In a round-robin ready queue with n processes and quantum q, each process waits at most (n − 1) × q time units before receiving its next CPU time slice.
- Turnaround Time vs. Response Time: $T_{turnaround} = T_{completion} - T_{arrival}$ measures entire job completion duration, whereas $T_{response} = T_{first_exec} - T_{arrival}$ measures the delay before the user sees the first terminal output.
3. The Technical Advantages of Time-Sharing Operating Systems
The transition from non-preemptive batch systems to time-sharing was arguably the most transformative paradigm shift in software history. By introducing time slicing and rapid preemption, time-sharing systems transformed computers from intimidating batch-calculating machines into interactive tools for human thought. Below is the technical breakdown of its primary advantages.
1. Sub-Second Interactivity and Minimized Response Time
In interactive computing, the primary performance metric is not Turnaround Time (how long the whole job takes to finish), but Response Time ($T_{response}$): the latency between a user submitting an action (such as typing a character or clicking a mouse) and the system producing its very first response output.
Psychological studies show that human users perceive computing interactions as instantaneous if feedback arrives within 100 milliseconds. Consider three concurrent processes arriving at time $t = 0$:
- Process P1 (Compute Compilation): Burst time = 24ms
- Process P2 (Text Editor Keystroke): Burst time = 4ms
- Process P3 (Shell Prompt Command): Burst time = 2ms
| Scheduling Algorithm | Execution Sequence (Gantt Order) | Response Time P1 | Response Time P2 | Response Time P3 | Average Response Time |
|---|---|---|---|---|---|
| Batch / FCFS (Non-preemptive) | P1 [0-24] → P2 [24-28] → P3 [28-30] |
0 ms | 24 ms | 28 ms | 17.3 ms (P3 frozen for 28ms!) |
| Time-Sharing Round-Robin (q = 4ms) | P1 [0-4] → P2 [4-8] → P3 [8-10] → P1 [10-30] |
0 ms | 4 ms | 8 ms | 4.0 ms (77% reduction!) |
Under FCFS, User 3 waited 28 milliseconds before seeing a single letter appear on screen. Under Time-Sharing with $q = 4\text{ms}$, User 3 received CPU execution within just 8 milliseconds!
2. Maximized CPU Utilization via Human "Think Time" Harvesting
Why is sharing a single CPU among dozens of humans remarkably efficient? Because human users are astonishingly slow compared to silicon clock cycles:
- An experienced typist inputs approximately 60 words per minute, or one keystroke every 200 milliseconds.
- A 4.0 GHz processor executes 800,000,000 CPU clock cycles in that single 200ms gap between keystrokes!
- A human reading a document or compiling an equation takes seconds or minutes of "Think Time", during which their process sits in the
WAITINGstate awaiting the next keyboard interrupt.
In a time-sharing system, the CPU never waits for a human. The instant User A pauses to think, the scheduler seamlessly shifts clock cycles to User B, User C, or background daemon threads. CPU idle time is driven close to zero.
3. Seamless Concurrent Resource Sharing & Centralized Administration
Time-sharing architectures pioneered multi-user file permissions (read/write/execute in UNIX), shared memory libraries (DLLs / .so shared objects), and centralized data stores. Instead of copying an expensive 500MB compiler or database binary into 40 separate memory spaces, the OS memory manager maps a single physical copy of the Code (Text) Segment into each user's virtual address space with read-only permissions, drastically reducing RAM footprint.
4. Hardware Cost Amortization
In academic institutions and modern enterprises alike, dedicated hardware for every single user is prohibitively expensive and leads to massive underutilization. Time-sharing amortizes the cost of high-end enterprise silicon (multi-socket servers, high-speed NVMe arrays, multi-gigabit NICs) across hundreds of simultaneous students and remote workers.
4. The Inherent Disadvantages, Trade-Offs & Architectural Traps
While time-sharing systems opened the gateway to modern personal and cloud computing, multiplexing a shared physical computer among aggressive concurrent workloads introduces serious architectural challenges. Computer system designers must constantly battle the physics of memory hierarchies, CPU caches, and concurrent race conditions.
1. Context Switching Overhead and CPU Cache Cold Starts
As explored in Section 2, switching between processes is never free. Beyond the direct cost of saving registers to the PCB, the primary performance penalty comes from Cache Invalidation and Cold Misses:
- Modern CPU cores rely on high-speed L1 instruction (L1i) and data (L1d) caches operating at sub-nanosecond latencies (~1ns / 4 clock cycles).
- When Process A runs, it loads its hot working variables into L1/L2 caches. When the timer interrupts and schedules Process B, Process B's instructions and data overwrite those cache lines.
- When Process A gets dispatched again, its entire cache footprint has been evicted! The CPU core must stall for 50 to 100 nanoseconds (200+ clock cycles) fetching data from main system RAM. This phenomenon is known as the Cache Footprint Eviction Penalty.
2. Memory Contention and The Catastrophe of Thrashing
In a multi-user time-sharing system, every concurrent user process demands its own memory space (code, heap, stack, libraries). Modern operating systems use Virtual Memory with Paging to allow total allocated virtual memory to exceed physical RAM by swapping inactive pages to disk/SSD.
However, if the system admits too many concurrent processes, it encounters Thrashing — a devastating state where the operating system spends virtually all of its time moving memory pages between RAM and swap storage, rather than executing user code.
flowchart TD
subgraph Thrashing_Death_Spiral [The Thrashing Death Spiral]
A["Too Many Concurrent Users Admitted (High Multiprogramming)"] --> B["Sum of Working Sets Exceeds Physical RAM: Σ WS_i > RAM"]
B --> C["Processes Suffer Continuous Page Faults!"]
C --> D["Processes Move to WAITING State Awaiting Disk I/O"]
D --> E["CPU Becomes Idle (Waiting for Disk)"]
E --> F["Naive OS Thinks CPU is Underutilized & Admits MORE Processes!"]
F --> B
end
style Thrashing_Death_Spiral fill:#1e1e2e,stroke:#f38ba8,stroke-width:2px;
3. Security, Memory Sandboxing & Hardware Side-Channels
Under a single-user system, security is straightforward: the user owns the machine. In a shared multi-user time-sharing environment, strict Isolation Guarantees are essential:
| Isolation Vector | Hardware & OS Defense | Vulnerability / Failure Mode |
|---|---|---|
| Memory Addressing | MMU Page Tables, Read/Write/Execute bits, Ring 0 vs Ring 3 privileges | Buffer overflow attacks into adjacent processes or kernel space. |
| Microarchitectural Caches | Kernel Page Table Isolation (KPTI), Flush on context switch | Spectre & Meltdown: Rogue user processes exploit speculative execution and CPU cache timing to snoop private keys and passwords of other users sharing the same core! |
| Resource Exhaustion | POSIX ulimit, Linux cgroups (CPU quotas, memory caps) |
Fork Bombs: A malicious user recursively spawns processes until the OS Process Table (PID table) is exhausted, denying service to all other users. |
4. Concurrency Hazards in Kernel Code
To enable preemptive time-sharing, the operating system kernel itself must be reentrant and preemptible. If Process A triggers a kernel system call to allocate memory, and a hardware timer interrupt fires in the middle of modifying the kernel free-memory linked list, a subsequent Process B calling malloc() could corrupt the entire list! Kernel developers must implement complex locking primitives (Spinlocks, Mutexes, RCU - Read-Copy-Update), which introduces risks of Deadlocks, Race Conditions, and Priority Inversion.
5. Absolute Incompatibility with Hard Real-Time Systems
Because time-sharing prioritizes average user response time and fairness, it inherently introduces latency jitter. When you click a mouse or run a command, you do not care if the system responds in 5ms or 15ms. But in an Automotive Anti-lock Braking System (ABS), an aircraft flight control system, or an intensive care pacemaker, missing a 2ms deadline by even 500 microseconds can cause fatal physical disaster.
Example: Suppose 3 identical jobs arrive at $t=0$, each requiring 10ms of CPU time.
- Under FCFS: Job 1 finishes at 10ms, Job 2 at 20ms, Job 3 at 30ms. Average Turnaround Time = $(10 + 20 + 30) / 3 = \mathbf{20ms}$.
- Under Round-Robin (q = 1ms): All three jobs interleave every 1ms. Job 1 finishes at 28ms, Job 2 at 29ms, Job 3 at 30ms! Average Turnaround Time = $(28 + 29 + 30) / 3 = \mathbf{29ms}$!
5. Modern Real-World Systems, University Exam Q&As & Technical Interview Deep Dive
The time-sharing architectures designed in the 1960s and 1970s did not fade away — they evolved into the scheduling backbones that power every modern operating system, cloud hypervisor, and container cluster today.
How Modern Operating Systems Implement Time-Sharing
| Operating System | Scheduler Architecture | Time-Sharing Scheduling Mechanics |
|---|---|---|
| Linux (Kernel 2.6.23 – 6.x) | Completely Fair Scheduler (CFS) / EEVDF | Replaces fixed time slices with Virtual Runtime (vruntime) tracked in a red-black tree. Processes that have consumed the least CPU time are scheduled first. Higher priority (nice values) scales the rate at which vruntime advances. |
| Microsoft Windows | Preemptive Priority Scheduler | Features 32 priority levels. The system dynamically boosts the priority and lengthens the quantum (by up to 3×) for threads belonging to the foreground window to guarantee snappy user responsiveness. |
| Kubernetes & Docker | cgroups v2 CFS Bandwidth Control | Enforces multi-tenant cloud time-sharing using cpu.cfs_period_us (default 100,000μs / 100ms) and cpu.cfs_quota_us. If a container pod consumes its quota within a period, the Linux kernel throttles it until the next period. |
High-Yield University Exam Questions & Detailed Solutions
The following technical questions represent standard problem sets from CS university examinations (such as Silberschatz, Galvin & Gagne, and Tanenbaum OS curricula) and software engineering technical interviews:
Key Takeaways Summary Checklist
| Concept | Key Takeaway for Computer Science Students |
|---|---|
| Core Purpose | Multiplexes single or multiple CPUs among concurrent users to minimize Response Time via preemptive time slicing ($q$). |
| Hardware Primitives | Enforced by physical Programmable Interval Timers (PIT), Ring 0 / Ring 3 mode switches, and Process Control Block (PCB) serialization. |
| Quantum Trade-off | $q$ too small → Context switch overhead ($\eta = \frac{q}{q + C}$) thrashes CPU. $q$ too large → Degenerates into FCFS batch, ruining interactivity. |
| Key Failure Mode | Overcommitting physical RAM leads to Thrashing, where page fault latency collapses CPU utilization. |
| Modern Descendants | Powers Linux Completely Fair Scheduler (CFS), Windows priority boost, and Docker/Kubernetes container cgroups. |
Frequently Asked Questions (FAQ)
- What is the fundamental distinction between Multiprogramming, Multitasking, and Multiprocessing?
- Multiprogramming: Keeps multiple jobs resident in RAM simultaneously. When the active job yields to perform I/O, the CPU switches to another job. The primary objective is to maximize CPU utilization; it is non-preemptive.
Multitasking (Time-Sharing): A preemptive extension of multiprogramming. A hardware timer interrupt preempts the CPU at fixed time quantum intervals ($q$) so that multiple interactive users or threads experience sub-second response times. The primary objective is to minimize response time on a single or multiple cores.
Multiprocessing: The physical presence of two or more independent CPU cores/processors executing distinct instructions in true simultaneous parallel hardware. - If context switch time is C = 1.5ms and time quantum is q = 13.5ms, what percentage of CPU capacity is lost to overhead?
- The total time required for one full scheduling cycle of execution plus context switch is:
T_cycle = q + C = 13.5ms + 1.5ms = 15.0ms
The percentage of CPU capacity lost to administrative context switch overhead (η_loss) is:
Overhead Percentage = (C / (q + C)) × 100% = (1.5 / 15.0) × 100% = 10.0%
Therefore, exactly 10% of total CPU horsepower is consumed purely by state saving and restoring, leaving 90% for user computation. - Why does Round-Robin scheduling produce poor average turnaround time when all processes have identical burst lengths?
- Suppose n processes arrive simultaneously at $t = 0$, each requiring exactly 10 units of CPU burst time, and the quantum is $q = 1$. Under Round-Robin, each process gets 1 unit of time in rotation. Consequently, no process completes until the 10th round!
Every process finishes within a tiny window near the end of the execution timeline (between $t = 10n - n + 1$ and $10n$). In contrast, under FCFS, Process 1 finishes at $t = 10$, Process 2 at $t = 20$, and so on. FCFS yields a substantially lower average completion time because early jobs finish and exit early. Round-Robin deliberately sacrifices turnaround time to guarantee that all processes share immediate progress equally. - How does a Time-Sharing Operating System prevent a rogue user process from monopolizing the CPU indefinitely?
- The OS relies on two non-bypassable hardware enforcement mechanisms:
1. Dual-Mode Hardware Operation: The CPU runs user programs in unprivileged User Mode (Ring 3), where privileged hardware instructions (like modifying interrupt tables or stopping the clock) are physically disabled.
2. Programmable Interval Timer (PIT): The operating system programs a hardware timer before dispatching the user process. When the timer reaches zero, a physical interrupt (IRQ 0) triggers, forcing the CPU hardware to escalate to privileged Kernel Mode (Ring 0) and jump to the kernel scheduler's Interrupt Service Routine, regardless of what the user program was executing. - What is Thrashing in a virtual memory time-sharing system, and how does the Working Set Model prevent it?
- Thrashing occurs when the total memory demand of all active processes exceeds available physical RAM:
Σ Working_Set(P_i) > Total Physical Memory
Processes encounter constant page faults, spending virtually all time waiting for disk paging. The OS perceives the CPU as idle (because threads are blocked waiting for I/O) and mistakenly tries to admit even more processes, accelerating the failure spiral.
Peter Denning's Working Set Model defines a process's working set $W(t, \Delta)$ as the set of pages referenced in the most recent $\Delta$ memory accesses. The OS monitors each process's working set size. If the sum of all working sets exceeds total RAM, the OS temporarily suspends/swaps out an entire process (moving it fromREADYtoSUSPENDED-READY), freeing its page frames for the remaining processes until thrashing subsides. - Why can't a standard Time-Sharing OS (like desktop Linux or Windows) be used in safety-critical Hard Real-Time systems?
- A Hard Real-Time System requires deterministic worst-case latency bounds: an action must complete before an absolute deadline (e.g., triggering an airbag within 15 milliseconds of accelerometer impact).
Standard Time-Sharing systems optimize for average-case throughput and user fairness, not worst-case latency. Unpredictable latencies introduced by variable timer ticks, virtual memory page faults, kernel lock contention, and cache evictions can cause non-deterministic delays ranging from microseconds to hundreds of milliseconds. Such latency jitter is unacceptable in systems where a missed deadline results in physical destruction or loss of life. - How does the modern Linux Completely Fair Scheduler (CFS) differ from classical fixed-quantum Round-Robin?
- Classical Round-Robin assigns an identical fixed time quantum $q$ (e.g. 20ms) to every process. This is suboptimal because high-priority processes receive the same time slice as background tasks unless priority weighting is artificially hacked into multi-level queues.
The Linux CFS discards fixed quantums entirely. Instead, it tracks each process's accumulated execution time through a metric calledvruntime(Virtual Runtime) stored in a red-black tree (Self-balancing BST). When scheduling, the CPU picks the process with the smallestvruntime(leftmost node in the tree). A process with a higher priority (lower nice value) has itsvruntimeaccumulate at a slower rate, allowing it to naturally receive proportionally more physical CPU time without needing arbitrary time slices.
can you tell me more about use of this OS
nice work