CS2850 Operating Systems Comprehensive Revision Guide
(Based on Past Papers 2022-2024 & Lecture Slides)
1. Exam Format Analysis
Theory Questions (60%):
- Definitions (e.g., kernel vs. user mode).
- Algorithm comparisons (e.g., SJF vs. FCFS).
- Case studies (e.g., page replacement, deadlock avoidance).
Programming/C-Based Exercises (40%):
- Pointer manipulation (e.g., swapping values).
- Dynamic memory management (e.g.,
malloc
,free
). - String operations (e.g., merging, truncation).
Key Topics: Memory management, process scheduling, IPC, file systems, deadlocks, virtualization.
2. Core Concepts & Guidance
Memory Management
Key Slides: 25-32, 44
Static vs. Dynamic Relocation
- Static: Addresses bound at compile time. Example: Early OS without multiprogramming.
- Dynamic: Addresses bound at runtime using base/limit registers. Example: Modern virtual memory.
- Exam Focus: Explain how dynamic relocation supports multiprogramming.
Page Replacement Algorithms
- NFU: Selects pages with the lowest usage counter.
- FIFO, LRU, Optimal: Trade-offs in overheads and efficiency.
- Example Q: Given R/M bits, justify which page is evicted by NFU.
Process Scheduling
Key Slides: 21-24, 49
Batch Systems
- SJF: Minimizes average waiting time (requires prior burst time knowledge).
- Advantage over FCFS: Reduces starvation for short jobs.
Interactive Systems
- Round Robin: Uses time slices (quantums).
- Exam Focus: Explain how quantum size impacts throughput vs. latency.
- Example Q: Calculate turnaround time for processes with given burst times.
Inter-Process Communication (IPC)
Key Slides: 10-20
Critical Sections
- Solutions: Peterson’s algorithm, semaphores, monitors.
Producer-Consumer Problem
- Exam Focus: Implement using
sleep
/wakeup
primitives vs. semaphores.
File Systems
Key Slides: 34-37
FAT vs. Linked-List Allocation
- FAT: Faster seek times via table-based block tracking.
- Example Q: Compare MS-DOS and UNIX V7 directory structures.
Deadlocks
Key Slides: 38-41
Banker’s Algorithm
- Steps: Calculate Need = Max – Allocated, check safe sequence.
- Exam Focus: Analyze resource allocation graphs for deadlocks.
Virtualization
Key Slides: 50-51
- Hypervisors:
- Type 1 (bare-metal) vs. Type 2 (hosted).
- VMware ESX: Resource isolation advantages.
3. Programming Tasks Breakdown
Key Slides: W1 slides, 46-48
Pointer Manipulation
- Example: Swap values using
swapx(int *p1, int *p2)
. - Pitfall: Avoid forgetting dereferencing (
*p1
vs.p1
).
Dynamic Memory
- Always check
malloc
return values. - Example (pure text format):
char *s = malloc(SIZE);
if (s != NULL) {
copyString(input, s); // Ensure null-termination
free(s); // Prevent leaks
}
String Operations
- Truncation: Reserve space for
\0
withi < SIZE-1
. - Exam Focus: Explain
strcpy
buffer overflow risks.
4. Exam Strategy
Theory Questions
- Use structured answers: Define → Compare → Example from slides (e.g., MULTICS segmentation).
Programming Questions
- Outline logic with pseudocode first.
- Test edge cases (empty strings, maximum buffer sizes).
5. Cheat Sheet
Key Formulas & Algorithms
- CPU Utilization: [Formula].
- Banker’s Algorithm: Ensure system stays in a safe state.
Final Tips:
- Revise Linux system calls (
clone()
,fork()
from slides 42-49). - Practice past papers using frameworks above.
End of Revision Guide – Covers all 57 files & exam trends.
CS2850 Operating Systems Comprehensive Revision Guide
https://blog.pandayuyu.zone/2025/05/08/CS2850-Operating-Systems-Comprehensive-Revision-Guide/