File Systems
The mechanisms, the calculations and the concurrency questions exams ask
Computer Science | Undergraduate (Level 5) | December 2026
WHAT IS INSIDE
1. Processes, threads and system calls
2. Scheduling and its metrics
3. Concurrency, synchronisation and deadlock
4. Memory management and file systems
Exam question patterns
Glossary of exam-ready definitions
1. Processes, threads and system calls
A process is a program in execution with its own address space, and a thread is a schedulable execution
stream sharing that address space with its siblings. The trade-off is exactly the sharing: threads communicate
cheaply through shared memory but need synchronisation, while processes are isolated and pay for
communication through IPC. Context switching saves and restores register state and, on a switch between
processes, changes the address space, which is why a thread switch is cheaper than a process switch.
The process state model - new, ready, running, waiting, terminated - is what an exam traces through a fork,
a blocking read and a signal. System calls are the controlled entry into kernel mode: the trap switches
privilege level, the kernel validates arguments and returns a result, and the cost of that transition is what
makes a tight read loop slower than buffered I/O. fork duplicates the address space lazily by copy-on-write
and returns twice, which is why the child must check the returned value.
• PCB - state, registers, scheduling information, memory and open-file tables.
• fork/exec/wait - create, replace image, reap; misordering produces zombies or orphans.
• User versus kernel mode - mode bit enforced by hardware; the trap is the only legitimate crossing.
• Threads - user-level threads are fast but block the process on a blocking call unless the kernel sees them.
2. Scheduling and its metrics
Scheduling questions are marked on the numbers. FCFS is simple and suffers the convoy effect; SJF
minimises average waiting time but needs burst prediction and starves long jobs; round robin bounds
response time with a quantum that trades context-switch overhead against responsiveness; priority and
multilevel feedback queue approximate SJF without knowing the future by penalising jobs that use the
CPU heavily.
Always compute the same four measures so answers are comparable: waiting time (time in the ready
queue), turnaround (completion minus arrival), response (first dispatch minus arrival) and throughput.
Then argue with the numbers: SJF's lower average waiting time is paid for by variance, and a real-time
system cares about the deadline miss rate rather than the average, which is why EDF and rate-monotonic
scheduling appear in embedded cases.
• Convoy effect - one long job ahead of many short ones inflates average waiting time.
• Round-robin quantum - too small wastes switches, too large degenerates to FCFS.
• Starvation and ageing - priority schemes need ageing to guarantee progress.
Operating Systems: Processes, Scheduling, Memory and File Sy Page 1 of 3