CS2850 Operating Systems Detailed Revision Guide
1. Memory Management
Key Concepts (From Lecture Slides 25–32)
Static vs. Dynamic Relocation:
- Static Relocation: Done at load time; physical addresses are fixed. Reference: 25.MemoryManagement_Intro.pdf.
- Dynamic Relocation: Uses base/limit registers (MMU) at runtime. Reference: 26.Address_Spaces.pdf.
Paging & Virtual Memory:
- Virtual Address Translation: Split into page number (for page table index) and offset. Reference: 28.Virtual_Memory.pdf.
- Two-Level Page Tables:
- Example: 32-bit address with 12-bit top-level index → 4096 second-level tables. Each entry covers 4KB pages. 2023 Q2c.
- Page Replacement Algorithms: NFU, LRU, FIFO. Reference: 30.Page_Replacement_Algorithms.pdf.
Sample Questions & Strategies
Q: “How many second-level page tables exist in a 32-bit system with 12-bit top-level index?”
Answer: (2^{12} = 4096) tables. Each second-level table has (256) entries.Q: “Compare contiguous vs. linked-list file allocation.”
Answer: Linked list avoids external fragmentation but increases access time. Ref: 35.Files_Directories_Implementation.pdf.
2. Process Scheduling
Key Concepts (From Slides 21–24)
- Batch Systems:
- Shortest Job First (SJF): Minimizes average waiting time. Reference: 22.Scheduling_Batch_Systems.pdf.
- Interactive Systems:
- Round Robin (RR): Uses time slices (e.g., 20ms quantum). Reference: 23.Scheduling_Interactive_Systems.pdf.
Sample Questions & Strategies
- Q: “Compare SJF and FCFS.”
Answer: SJF reduces average wait time but risks starvation; FCFS suffers from convoy effect. 2022 Q1b.
3. Concurrency & Synchronization
Key Concepts (Slides 10–20, 38–41)
- Mutual Exclusion:
- Peterson’s Algorithm: For two processes with
turn
andinterested
flags. Reference: 12.IPCBusyWaitingPeterson.pdf.
- Peterson’s Algorithm: For two processes with
- Semaphores: Use
up()
/down()
for synchronization (e.g., producer-consumer). Reference: 15.IPCWithoutBW_Semaphores.pdf.
Sample Questions & Strategies
- Q: “Apply Banker’s Algorithm to determine safe state.”
Steps: Check available resources ≥ max need → grant → repeat. Reference: 40.Avoiding_Deadlocks.pdf.
4. File Systems
Key Concepts (Slides 33–37)
- FAT vs. Linked List:
- FAT: Centralized table for pointers → faster random access. 2022 Q3a.
- UNIX File Systems: i-nodes, Ext4 features. Reference: 45.IO_Linux.pdf.
Sample Questions
- Q: “Explain FAT allocation.”
Answer: Avoids fragmentation with table-based block pointers. Ref: 36.Example_File_Systems.pdf.
5. Virtualization & Security
Key Concepts (Slides 49–51)
- Hypervisors:
- Type 1 (bare-metal, e.g., VMware ESX) vs. Type 2 (hosted). Reference: 51.Cloud_VMWare.pdf.
- Linux Security: UID/GID, file permissions. Reference: 46.Security_Linux.pdf.
6. C Programming & OS Concepts
Key Concepts (202425_CS2850_w1_slides.pdf, 43–48)
- Dynamic Memory:
malloc/free
for heap allocation. Forgettingfree
causes leaks. 2023 Q3a. - String Handling: Null-terminate strings to prevent overflows. Example: copyString in 2022 uses SIZE-1.
Sample Questions
- Q: “Why null-terminate before passing to merge?”
Answer: C strings require\0
for termination. Uninitializedchar c
risks UB. 2023 Q3a.
Exam Strategy
- Theory Questions: Use bullet points with slide references (e.g., “As per 28.Virtual_Memory.pdf…”).
- Coding Problems:
- For pointers/structs: Validate assignments (e.g.,
p->x = 1
vs.*p.x
). - Avoid Errors: Use
sizeof(struct)
and initialize variables. 2024 Q1a.
- For pointers/structs: Validate assignments (e.g.,
Adapted from Lecture Topics: Processes (fork(), exec()), I/O (DMA vs. Interrupts).
Good luck! 🖥️
CS2850 Operating Systems Detailed Revision Guide
https://blog.pandayuyu.zone/2025/05/08/CS2850-Operating-Systems-Detailed-Revision-Guide/