Operating systems, translation and concurrency
Core concepts
Understand the OS as a resource manager and extended machine: process management, CPU scheduling (FCFS, SJF, priority, round robin), process states and the PCB, context switching, threads versus processes, and inter-process communication. Study synchronization: critical sections, mutexes, semaphores, and deadlock's four necessary conditions (mutual exclusion, hold and wait, no preemption, circular wait). Know memory management: paging, segmentation, virtual memory, page replacement (FIFO, LRU, optimal), and thrashing. Cover file systems, disk scheduling, I/O handling, and the distinction between kernel and user mode. Mention types of systems software: compilers, loaders, linkers, assemblers, and utility programs.
Traps
Questions often ask for the average waiting time under a scheduling policy - always build the timeline before computing. For simultaneously ready independent jobs with known bursts, no preemption and the stated classroom objective, shortest-job-first minimizes average waiting time. Actual arrivals, priorities and unknown future bursts change scheduling decisions. Do not confuse deadlock prevention (break a necessary condition) with avoidance (e.g., Banker's algorithm) or detection. LRU is a stack algorithm and does not exhibit Belady’s anomaly under the usual page-replacement model; FIFO can exhibit it. No algorithm wins every workload comparison.
Worked example
Processes P 1 (burst 6), P 2 (burst 2), P 3 (burst 8) arrive together under FCFS. Completion times are 6, 8, 16; waiting times are 0, 6, 8; average waiting time = 14/3 ≈ 4.67. Under SJF the order is P 2, P 1, P 3, giving waiting times 0, 2, 8 and average 10/3 ≈ 3.33. Rule of thumb: draw a Gantt chart first, then sum.
Address translation and concurrency evidence
In a supplied paging exercise, an address is divided into a virtual page number and an offset. With a 4096-byte page, virtual address 12293 has page number 3 and offset 5. If the supplied page table maps page 3 to frame 9, the physical byte address is 9 ×4096 +5 =36869. This arithmetic assumes byte addressing, the stated page size and a valid resident page. A translation lookaside buffer caches translations; a TLB miss need not mean the page is absent from memory. A page fault needs operating-system handling according to the mapping and protection condition, not necessarily a disk read in every case.
For synchronization, identify the shared invariant rather than merely adding a lock around one line. A mutex protects a critical section; a semaphore represents an explicitly initialized count and waiting discipline. Holding a lock while waiting for another resource can contribute to deadlock, but a long delay alone does not prove a deadlock cycle. User-mode code requests privileged services through defined interfaces; neither kernel privilege nor faster hardware repairs a race in the application’s logic. Linkers combine object symbols and relocation information, whereas loaders establish the executable process image under the platform’s model.