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.
Q1.Which scheduling algorithm gives the minimum average waiting time?
Moderate- AFCFS
- BShortest Job First
- CRound Robin
- DPriority
Operating Systems question 1 of 8+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.
Q2.Which of these is NOT a necessary condition for deadlock?
Moderate- AMutual exclusion
- BHold and wait
- CPreemption
- DCircular wait
Operating Systems question 2 of 8+Show Answer & Explanation
Answer: C. Preemption
Explanation: The four conditions require NO preemption. Allowing preemption is one way to prevent deadlock.
Q3.Threads within the same process share:
Moderate- AStack and registers
- BCode and data segments
- CProgram counter
- DNothing
Operating Systems question 3 of 8+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.
Q4.Paging primarily eliminates:
Moderate- AInternal fragmentation
- BExternal fragmentation
- CPage faults
- DContext switches
Operating Systems question 4 of 8+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.
Q5.Thrashing in an operating system refers to:
Moderate- AExcessive page swapping with little useful work
- BCPU overheating
- CDeadlocked processes
- DDisk fragmentation
Operating Systems question 5 of 8+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.
Q6.Which memory is used to speed up access to frequently used pages in virtual memory?
Difficult- ACache
- BTLB
- CRegister
- DSwap space
Operating Systems question 6 of 8+Show Answer & Explanation
Answer: B. TLB
Explanation: The Translation Lookaside Buffer caches recent virtual-to-physical page translations, avoiding repeated page-table walks.
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
Operating Systems question 7 of 8+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.
Q8.Round Robin scheduling is characterised by:
Easy- APriority levels
- BA fixed time quantum per process
- CRunning the shortest job first
- DNon-preemptive execution
Operating Systems question 8 of 8+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 — 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.
