MyInternships.in

Operating Systems — Questions and Answers

Operating Systems questions test whether you understand what happens beneath your code: how processes are scheduled, how memory is virtualised, and how concurrent access is made safe. Process versus thread, deadlock conditions, paging versus segmentation and the scheduling algorithms are the four areas that appear in almost every technical round.

8 solved questionsComputer Science EngineeringFree · no signup

Operating Systems— Concepts, Formulas & Shortcuts

  • A process has its own address space; threads within a process share memory but have separate stacks.
  • Deadlock needs all four conditions: mutual exclusion, hold-and-wait, no preemption and circular wait.
  • Scheduling: FCFS, SJF (optimal average waiting time), Round Robin (time-sliced, fair), Priority.
  • Paging divides memory into fixed-size frames and removes external fragmentation; segmentation uses variable logical units.
  • Thrashing occurs when a process spends more time swapping pages than executing.
  • A semaphore is a signalling counter; a mutex enforces exclusive ownership by one thread.

Operating Systems Practice Questions with Answers

Attempt each question first, then open the explanation. All 8 questions below are free to read and require no signup.

  1. Q1.Which scheduling algorithm gives the minimum average waiting time?

    Moderate
    • AFCFS
    • BShortest Job First
    • CRound Robin
    • DPriority
    +Show Answer & Explanation

    Answer: B. Shortest Job First

    Explanation: SJF is provably optimal for average waiting time, though it needs knowledge of burst times and can starve long jobs.

    Operating Systems question 1 of 8
  2. Q2.Which of these is NOT a necessary condition for deadlock?

    Moderate
    • AMutual exclusion
    • BHold and wait
    • CPreemption
    • DCircular wait
    +Show Answer & Explanation

    Answer: C. Preemption

    Explanation: The four conditions require NO preemption. Allowing preemption is one way to prevent deadlock.

    Operating Systems question 2 of 8
  3. Q3.Threads within the same process share:

    Moderate
    • AStack and registers
    • BCode and data segments
    • CProgram counter
    • DNothing
    +Show Answer & Explanation

    Answer: B. Code and data segments

    Explanation: Threads share the code, data and heap of their process, but each has its own stack, registers and program counter.

    Operating Systems question 3 of 8
  4. Q4.Paging primarily eliminates:

    Moderate
    • AInternal fragmentation
    • BExternal fragmentation
    • CPage faults
    • DContext switches
    +Show Answer & Explanation

    Answer: B. External fragmentation

    Explanation: Fixed-size frames mean memory is never left in unusable variable-sized holes, though some internal fragmentation remains in the last page.

    Operating Systems question 4 of 8
  5. Q5.Thrashing in an operating system refers to:

    Moderate
    • AExcessive page swapping with little useful work
    • BCPU overheating
    • CDeadlocked processes
    • DDisk fragmentation
    +Show Answer & Explanation

    Answer: A. Excessive page swapping with little useful work

    Explanation: When too many processes compete for too few frames, the system spends most of its time servicing page faults.

    Operating Systems question 5 of 8
  6. Q6.Which memory is used to speed up access to frequently used pages in virtual memory?

    Difficult
    • ACache
    • BTLB
    • CRegister
    • DSwap space
    +Show Answer & Explanation

    Answer: B. TLB

    Explanation: The Translation Lookaside Buffer caches recent virtual-to-physical page translations, avoiding repeated page-table walks.

    Operating Systems question 6 of 8
  7. Q7.A mutex differs from a binary semaphore because:

    Difficult
    • AIt can count above 1
    • BIt has ownership — only the locking thread may unlock it
    • CIt cannot block
    • DIt works only across processes
    +Show Answer & Explanation

    Answer: B. It has ownership — only the locking thread may unlock it

    Explanation: A mutex is owned by the thread that locked it and must be released by that thread; a semaphore can be signalled by any thread.

    Operating Systems question 7 of 8
  8. Q8.Round Robin scheduling is characterised by:

    Easy
    • APriority levels
    • BA fixed time quantum per process
    • CRunning the shortest job first
    • DNon-preemptive execution
    +Show Answer & Explanation

    Answer: B. A fixed time quantum per process

    Explanation: Round Robin gives each process a fixed time slice in turn, making it preemptive and fair for interactive systems.

    Operating Systems question 8 of 8

Operating Systems — Frequently Asked Questions

What is the difference between a process and a thread?+

A process is an independent program with its own memory space; a thread is a lightweight unit of execution inside a process that shares the process's memory but has its own stack and registers. Context switching between threads is cheaper.

What are the four necessary conditions for deadlock?+

Mutual exclusion, hold and wait, no preemption, and circular wait. Breaking any single one of them prevents deadlock, which is the basis of every deadlock-prevention strategy.

Cleared the aptitude round? Now grab the role.

Preparation only pays off when you apply. Thousands of internships and fresher jobs across India are live on MyInternships.in right now — free to apply, no consultancy fees.