Operating System Questions for Placements: What to Revise

By the Codveri team ·

Processes, threads, scheduling, memory management, deadlocks and synchronisation: the OS topics that appear most often in campus interviews.

Processes and threads

A process is a running program with its own memory. A thread is a unit of execution inside a process that shares the process's memory. Threads are lighter to create and switch, but sharing memory means you must protect shared data.

CPU scheduling

Know first-come first-served, shortest job first, round robin and priority scheduling, and the trade-offs: round robin is fair for interactive systems, shortest job first minimises average waiting time but can starve long jobs.

Practise drawing a Gantt chart and computing average waiting time for a small example.

Memory management

Understand paging (fixed-size blocks), segmentation, virtual memory and page replacement such as FIFO and LRU. A page fault happens when the needed page is not in memory and must be loaded from disk.

Deadlocks

A deadlock needs four conditions together: mutual exclusion, hold and wait, no pre-emption and circular wait. Break any one to prevent it. Know the dining philosophers problem as the standard example.

Synchronisation

A mutex lets one thread at a time enter a critical section; a semaphore is a counter that allows a limited number. Race conditions happen when the result depends on timing.

Revision plan

Spend one day per topic, explain it aloud in your own words, solve five MCQs, then take a CS Fundamentals test to check yourself.

More guides