Operating Systems โ€” Study Plan Priority-ordered by exam payoff ยท every topic linked to your downloaded slides, quizzes & cheat sheets

๐ŸŽฏ The 50% rule. Four task types โ€” semaphore code, bash scripts, fork-trace, scheduling โ€” are worth roughly half of every exam and are completely formulaic. Master these first; they convert more marks per hour than anything else. Everything below is ordered by that payoff.
Tier 1
~16 pts/exam ยท do these first
Tier 2
~9 pts ยท guaranteed + mechanical
Tier 3
~6 pts ยท cheap MCQ points

Priority tiers

TIER 1 ยท DO FIRST

The four big recurring tasks

โ‰ˆ16 pts / exam

โ‘  Concurrent programming with semaphores โ€” 4.8 pts/exam, in 23/25

  • Translate a precedence graph into semaphores (the single most common code task)
  • Implement primitives: counting semaphore from mutexes, barrier, two-thread rendezvous
  • Reader-writer & producer-consumer from scratch with POSIX semaphores
  • Drill the C example code, then re-solve u07s06-Esercises by hand

โ‘ก Bash scripting โ€” 4.7 pts/exam, in 24/25

  • Parse ls -l / ps aux output; extract fields with cut/awk
  • Count words & lines per line; loop over files; check arg count
  • find + filter + rename/delete; merge or split .txt files

โ‘ข fork / exec / system output tracing โ€” 3.5 pts/exam, in 22/25

  • "Count how many times char X prints" under nested fork()
  • Know exactly what fork, execlp, system, wait do to the process tree
  • Watch setbuf(stdout,0) โ€” it changes the output ordering

โ‘ฃ CPU scheduling (Gantt charts) โ€” 3.3 pts/exam, in 23/25

  • Draw Gantt for SRTF & Round Robin (most frequent), plus FCFS / SJF / Priority
  • Compute average waiting and turnaround time โ€” know the formulas cold
  • Explain the convoy effect (FCFS) and how SJF fixes it
TIER 2 ยท GUARANTEED & MECHANICAL

One of each shows up every exam

โ‰ˆ9 pts / exam

โ‘ค Deadlock โ€” Banker's algorithm & resource graphs

  • Banker's: compute Need = Max โˆ’ Allocation, test if a request keeps a safe state, output the safe sequence (or NO)
  • Resource-allocation graph: detect the cycle, identify which edge to remove to break deadlock

โ‘ฅ Regex & filters tracing

  • Predict output of egrep "โ€ฆ" | tr -s | cut -d" " -f1 pipelines
  • find -regex / -perm / -writable file selection
  • Anchors, character classes, \> word boundaries

โ‘ฆ Signals & IPC pipes

  • Signals: handlers, kill/pause/alarm, SIGCHLD + wait race
  • Pipes: blocking, atomicity to PIPE_BUF, SIGPIPE; occasionally a write-code pipe task
TIER 3 ยท CHEAP MCQ POINTS

Memorize the concept pool

โ‰ˆ6 pts / exam
  • Process theory โ€” zombie vs orphan, what the PCB stores, context switch, exec family
  • Threads theory โ€” join/exit/return, user vs kernel threads, shared-pointer race
  • File system โ€” hard vs symbolic links after rm, ASCII/UTF-8/binary, file allocation (contiguous/linked/indexed, best/first-fit)
  • Sync theory โ€” TestAndSet / ticket lock properties, critical-section requirements
โš ๏ธ Negative marking. On MCQs, wrong answers lose points. Tick only what you're sure of โ€” leave doubtful options blank.

A 2-week schedule

Adjust to your timeline; the order matters more than the exact days. Front-load Tier 1.

Days 1โ€“3Tier 1 core
Semaphores + scheduling. Read the sync & scheduling slides, work the C examples, hand-solve every precedence-graph and Gantt question you can find. Do quiz_synchronization and quiz_schedulingCPU.
Days 4โ€“5Tier 1 core
Bash + fork tracing. Write 6โ€“8 scripts from u06s03-script-exercises by hand. Trace every fork/exec/system program in the process examples until output prediction is automatic.
Days 6โ€“7Tier 2
Deadlock + regex/filters. Drill Banker's safe-sequence and resource-graph cycle removal. Practice egrep | tr | cut and find traces.
Days 8โ€“9Tier 2 + 3
Signals, pipes, theory MCQs. Read signals/IPC slides; blast through quiz_processes, quiz_threads, quiz_filesystem. Note every wrong answer.
Days 10โ€“12Mock exams
Timed full papers. Sit 20240207, 20240620, 20250217, 20250612 under exam conditions (no notes, ~90 min). Mark yourself against the _sol files.
Days 13โ€“14Patch & polish
Fix weak spots. Re-do the question types you lost marks on. Re-sit 20250612 & 20250917. Skim all four cheat sheets the night before.
โœ… Mock exams to use (current format, with solutions): the 2024 and 2025 papers in 02_exams/. Also see 02_exams/exercises_exams.pdf โ€” the instructor's own worked examples.

Night-before checklist

  • I can convert any precedence graph to semaphores without hesitating
  • I can draw SRTF & Round Robin Gantt charts and compute avg waiting/turnaround
  • I can write a bash script that parses ls -l and reports size + permissions
  • I can predict the char-count output of a nested fork/exec/system program
  • I can run Banker's algorithm and produce a safe sequence (or prove NO)
  • I can find the cycle in a resource-allocation graph and break it
  • I can trace an egrep | tr -s | cut pipeline line by line
  • I know zombie vs orphan, PCB contents, and the exec family cold
  • I remember: MCQs have negative marking โ€” don't guess