Skip to content
December Code

Operating Systems · 8 topic pages · 100 questions in the bank

Operating systems for placements: interview questions by topic

Operating systems is one of the core CS subjects that product and service companies test in placement interviews, alongside DBMS, computer networks and OOP. Candidates are rarely asked to write an operating system; they are asked to explain how one manages processes, memory and storage, and to work out small problems of the kind that appear in written tests: a scheduling table, a page reference string, a banker's algorithm state or a queue of disk requests.

Interviewers look for definitions that hold up under a follow-up question: what a process owns and what threads share, why a race condition happens and how a semaphore prevents it, which four conditions a deadlock needs, how an address is translated through a page table, and what the operating system does on a page fault. Numerical questions test whether you can apply an algorithm step by step without skipping a case.

The pages below take one topic each, with answers and worked examples whose figures were recomputed independently, and one question exactly as the diagnostic asks it. The diagnostic draws from every operating-systems topic in the bank and names the ones to read first.

New to this? How to prepare for placements — the method — and what the readiness test measures.

On this page3 sections

Operating Systems topics, one page each

One question, exactly as the diagnostic asks it

From the Operating Systems bank — 100 questions across 8 topics. The answer is marked because this one is public; in a sitting you choose first, then see why each option is right or wrong.

Deadlocks · easyOS-012

Which of these is NOT one of the four conditions that must all hold for a deadlock to occur?

  1. 1

    A resource can be held by only one process at a time

  2. 2

    A process holds some resources while waiting for others

  3. 3

    Processes wait for one another in a closed cycle

  4. 4

    Resources can be taken away from the processes holding them

    correct

A deadlock needs mutual exclusion (a resource is held by one process at a time), hold and wait (processes hold some resources while waiting for others), no preemption (resources cannot be forcibly taken back) and circular wait (a cycle of processes each waiting for the next). Resources that can be taken away is the opposite of no preemption, so it is not a condition; in fact, allowing preemption is one way to prevent deadlock. The other three options are conditions.

More on this topic: Deadlock interview questions

Measure it

Reading the answers tells you what’s true. A diagnostic tells you what you get wrong.

10 Operating Systems questions across its topics, easy to hard, about fifteen minutes. You get a readiness figure with the arithmetic shown, the topics you missed named, and a practice set sized for today. Free: a diagnostic in every subject, a retake a week and 15 problems a day. No card.

By Harshit · updated