Operating Systems questions and answers
Processes, scheduling, memory and deadlocks. Practise operating systems questions from the technical & programming section of placement tests, with a worked explanation after every answer. Practice is free and needs no sign-up.
Sample operating systems questions with worked answers
Question 1
Which CPU scheduling algorithm is most prone to the convoy effect, where short processes wait behind one long process?
- Round Robin
- First-Come, First-Served (FCFS)
- Shortest Remaining Time First
- Priority scheduling with aging
Answer: B. First-Come, First-Served (FCFS)
Explanation: In FCFS, one long CPU-bound process at the head of the queue makes every short process behind it wait. This is the convoy effect.
Question 2
Three processes arrive at time 0 in the order P1, P2, P3 with CPU burst times 6, 3 and 1 ms. With Round Robin scheduling and a time quantum of 2 ms, what is the average waiting time?
- 1.67 ms
- 5.00 ms
- 4.33 ms
- 3.67 ms
Answer: C. 4.33 ms
Explanation: The Gantt chart is P1 0-2, P2 2-4, P3 4-5, P1 5-7, P2 7-8, P1 8-10. Completion times are 10, 8 and 5, so the waiting times are 10-6 = 4, 8-3 = 5 and 5-1 = 4. The average is 13/3 ≈ 4.33 ms.
Question 3
A paged system has a page size of 4 KB, a logical address space of 64 pages and a physical memory of 32 frames. How many bits are in the logical and physical addresses, respectively?
- 16 and 17
- 18 and 17
- 18 and 15
- 17 and 18
Answer: B. 18 and 17
Explanation: The offset needs 12 bits (4 KB = 2^12). The logical address is 6 page bits (64 = 2^6) + 12 = 18 bits, and the physical address is 5 frame bits (32 = 2^5) + 12 = 17 bits.
All 30 operating systems questions with answers
- Which CPU scheduling algorithm is most prone to the convoy effect, where short…
- A process that has issued an I/O request and cannot continue until the I/O…
- What is thrashing in an operating system?
- Which of the following is NOT one of the four necessary conditions for a…
- Where does the operating system save a process's program counter, CPU…
- Three processes arrive at time 0 in the order P1, P2, P3 with CPU burst times…
- Process (arrival time, burst time) in ms: P1 (0, 8), P2 (1, 4), P3 (2, 2), P4…
- A system has 3 page frames, all initially empty. For the page reference string…
- A counting semaphore S is initialised to 8. Then 11 wait (P) operations and 5…
- How many times is "Hi" printed when this C program runs? Assume every fork()…
- In which memory-management scheme does internal fragmentation occur?
- A paged system has a page size of 4 KB, a logical address space of 64 pages…
- A system has 3 page frames, all initially empty. For the page reference string…
- A TLB lookup takes 20 ns and a main-memory access takes 100 ns. On a TLB miss…
- Two processes enforce mutual exclusion using only a shared variable turn…
- The Banker's algorithm is used for which deadlock-handling strategy?
- Which of the following is NOT shared between threads of the same process?
- Which page-replacement algorithm gives the lowest possible number of page…
- Belady's anomaly, where giving a process more page frames can increase its…
- In UNIX and Linux, which system call creates a new process that is a copy of…
- A system has 3 page frames, all initially empty. For the page reference string…
- Process (arrival time, burst time) in ms: P1 (0, 7), P2 (2, 4), P3 (4, 1), P4…
- How many times is "A" printed when this C program runs? Assume every fork()…
- A disk has cylinders 0 to 199 and the head is at cylinder 50. The request…
- A system uses 32-bit logical addresses, a page size of 4 KB and 4-byte…
- Process (arrival time, burst time, priority) in ms: P1 (0, 5, 3), P2 (1, 3…
- A system has three resource types. Available = (1, 2, 2). Process | Allocation…
- Memory access time is 200 ns, and servicing a page fault takes 8 ms. If 1 in…
- Three processes share identical units of one resource, and each process may…
- A disk has cylinders 0 to 199 and the head is at cylinder 50, moving towards…
Operating Systems: common questions
What are operating systems questions?
Processes, scheduling, memory and deadlocks. They appear in the technical & programming section of many placement tests.
Where can I practise operating systems questions with answers for free?
Right here on LogicWiz Exams. Every operating systems question has a worked explanation after you answer. Practice is free and needs no sign-up.
How should I practise operating systems?
Start with easy questions, then move to medium and hard. Read the explanation after each answer, and come back to the ones you missed.
Start practising
On this page you can start a fresh set of operating systems questions, choose easy, medium or hard, and time yourself if you want to. Or practise the whole subject: Technical & Programming practice.
More technical & programming topics
- Pseudo-code: Trace loops, recursion and bitwise logic.
- C Programming: Output prediction, pointers and operators.
- Java: OOP, strings, collections and exceptions.
- Python: Data types, comprehensions and mutability.
- Data Structures: Arrays, stacks, queues, trees, graphs and hashing.
- Algorithms: Complexity, sorting, searching, recursion and DP.
- Object-Oriented Programming: Encapsulation, inheritance, polymorphism, abstraction.
- DBMS: Keys, normalisation, transactions and indexing.
- SQL: Joins, grouping, subqueries and query output.
- Computer Networks: OSI/TCP-IP, protocols, addressing and ports.
- Software Engineering: SDLC, testing, agile and version control.
- Cloud & DevOps: Service models, containers, CI/CD and Linux.
- GenAI Basics: LLMs, tokens, prompting, embeddings and RAG.
Other subjects
- Quantitative Aptitude: Arithmetic, percentages, time and work, speed, probability and data interpretation: the numerical section of every fresher test.
- Logical Reasoning: Series, coding-decoding, arrangements, syllogisms and puzzles: the section that separates prepared candidates from the rest.
- Verbal Ability: Vocabulary, grammar, reading comprehension and sentence order: tested in nearly every IT services hiring exam.
- Python: Python quizzes by topic, from types and strings to classes and generators: output prediction and interview concepts.
- SQL: SQL quizzes by topic, from SELECT and joins to window functions: query output and concepts for analyst and developer roles.
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge · Test from a job description · LogicWiz Open: free team quiz · Free interview prep