Course Content
Operating Systems (OS)
Case Studies and GATE-Level Numericals – Operating Systems

Section 1: Case Studies (Real-World Applications)

These examples help students understand how OS concepts are applied in real-life systems.


Case Study 1: Linux Process Scheduling

Scenario:


The Linux OS uses a Completely Fair Scheduler (CFS). Instead of assigning strict time slices, it uses a red-black tree to ensure fairness across tasks.

 

Learning Insight:

 

  • Unlike Round Robin, Linux prioritizes tasks based on how long they’ve waited.
  • CFS dynamically adjusts process priorities for interactive responsiveness.

Case Study 2: Windows Virtual Memory Management

Scenario:


Windows uses demand paging and a working set model to manage memory. It adjusts the number of pages allocated to each process depending on recent usage.

 

Learning Insight:

 

  • The working set model avoids thrashing.
  • Page faults are minimized by prefetching and page-replacement algorithms (modified Clock algorithm).

Case Study 3: Android Low Memory Killer (LMK)

Scenario:


On Android devices, when memory becomes scarce, the LMK framework kills background apps to free up space.

 

Learning Insight:

 

  • Real-time memory management based on app priority (foreground, visible, hidden).
  • Reflects importance of resource prioritization in mobile OS.

Case Study 4: Real-Time OS in Automotives

Scenario:


Embedded OS like VxWorks or QNX run in cars’ ECU (Electronic Control Unit) systems to manage sensors and brakes.

 

Learning Insight:

 

  • Hard real-time constraints.
  • Scheduling algorithms like Rate Monotonic or EDF (Earliest Deadline First) are commonly used.


Section 2: GATE-Level Numericals (With Solutions)

These problems are structured to match GATE’s level of difficulty and format, ideal for advanced learners.


Problem 1: Turnaround Time and Waiting Time

Question:


Given 3 processes with burst times 4, 3, and 2 respectively. Assume arrival time is 0 for all and FCFS is used.

 

Solution:

Process Burst Time Completion Time Turnaround Time Waiting Time
P1 4 4 4 0
P2 3 7 7 4
P3 2 9 9 7

Average Turnaround Time: (4+7+9)/3 = 6.67

Average Waiting Time: (0+4+7)/3 = 3.67


Problem 2: Page Replacement – LRU

Question:


Page reference string: 7, 0, 1, 2, 0, 3, 0, 4.
Frame size = 3. How many page faults using LRU?

Solution:


Step-by-step replacement:

  • Faults at: 7, 0, 1, 2, 3, 4 → 6 faults

Problem 3: Turnaround and Waiting Time (SJF Non-Preemptive)

Burst Times: P1=6, P2=8, P3=7, P4=3
Order Executed: P4 → P1 → P3 → P2

Process Completion Time Turnaround Waiting Time
P4 3 3 0
P1 9 9 3
P3 16 16 9
P2 24 24 16

Avg Turnaround Time: 13

Avg Waiting Time: 7


Problem 4: Page Faults using FIFO

Reference String: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5
Frame Size: 3
Answer: 9 page faults (illustrated using a sliding window FIFO queue)


Problem 5: Banker's Algorithm – Safe State Check

Given:

 

  • Processes = 5, Resources = 3 types
  • Allocation, Max, Available matrices given.
    Task:
    Apply Banker’s Algorithm to check if system is in a safe state and list safe sequence.

 

Concepts Covered:

 

  • Need Matrix = Max – Allocation
  • Work vector, Finish array
  • Step-by-step safe sequence validation
0% Complete
WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.