Study guides
Operating Systems
2 guides for this subject — how to prepare, what to practise, and how to know it has gone in.
A practice question
Choose an answer and it is marked, with the explanation. From Operating Systems Practice Questions: 10 Worked MCQs.
Three processes arrive at time 0 with CPU burst times P1 = 6 ms, P2 = 2 ms, and P3 = 4 ms. Under non-preemptive shortest-job-first scheduling, what is the average waiting time?
The order is P2, P3, P1. Their waiting times are 0, 2, and 6 ms, so the average is 8/3 = 2.67 ms. The 6.67 ms distractor is the average turnaround time: it includes each process's own burst, which waiting time does not.
A spoken answer, marked
An examiner's question, answered out loud and marked criterion by criterion. From Operating Systems Viva Questions: Oral Practice Guide.
Examiner
Compare a process and a thread, then explain what happens when a thread blocks on input.
You correctly identified separate process address spaces and shared resources between threads.
ImproveState explicitly that each thread has its own stack, registers and program counter.
You explained that another thread can run when one blocks, but did not distinguish single-core from multicore execution.
ImproveSay that on a single core another runnable thread is scheduled; on multiple cores it may run concurrently on another core.
You mentioned cheaper thread switching and weaker isolation, but did not connect shared memory to synchronisation risk.
ImproveAdd that shared data enables communication but introduces races and the need for locks or other synchronisation.
The answer was understandable and direct, but the blocking case needed a more exact sequence.
ImproveDescribe the blocking thread leaving the runnable queue and the scheduler selecting another runnable thread.
A strong answerA process is a protected execution environment with its own virtual address space and operating-system resources, whereas a thread is an execution path within that process. Threads in one process share code, data and usually open files, but each has its own stack, registers and program counter. If one thread blocks for input, the operating system marks that thread blocked and can schedule another runnable thread; on a multicore system, another thread may run on a different core at the same time. Threads are cheaper to create and communicate through shared memory, but that sharing creates race conditions and reduces fault isolation compared with separate processes.
Yours are written from your own notes, and the free plan needs no payment details.
Guides
- Operating Systems Practice Questions: 10 Worked MCQsWork through 10 operating systems practice questions on scheduling, processes, synchronisation, memory, and file systems, with explanations.
- Operating Systems Viva Questions: Oral Practice GuidePractise operating systems viva questions with structured stations on processes, virtual memory and deadlocks, plus model answers and feedback.
Studying operating systems? Build your operating systems board from your own notes — the cards, papers and lectures are written from it. Free plan: 20 cards, a paper, a lecture and a viva to try.
Start on MySummaries