Text & documents
Numbers & maths
Data & formats
Security
Development & DevOps
Artificial Intelligence
Finance
Health & Wellness
Productivity
Games & Entertainment
Multimedia & design
Business
How to use
What it is

The process scheduling and page replacement exercises of Operating Systems, solved step by step: at every instant you see the queue, who runs and why. It is not just the solution: it is the trace an exam asks you to write.

The conventions, with their source

Each course breaks ties its own way. Only conventions used by a textbook are applied here, and it says which: in Round Robin, if a process uses up its quantum just as another arrives, the arriving one goes first (Stallings; Univ. of Seville). Page faults are counted all of them (Silberschatz) or only after the frames fill up (Stallings): pick your course's. The menu examples are the textbooks' own, with their reference.

Check my answer

Write your solution and the tool tells you where it diverges from the right one and why (a tie, a preemption, the quantum…). If your chart is the one of the other convention, it says so, not as an error.

Operating systemsScheduling and page replacement, step by step and with sources

Problem

If a process uses up its quantum just as another arrives, the arriving one joins the queue first.Stallings 9e, table 9.5 · Univ. of Seville

ProcessArrivalBurst

Trace

A0
A1
B2
A3
B4
C5
B6
D7
C8
B9
E10
D11
C12
B13
E14
D15
C16
B17
D18
D19
20
Queue after choosing:empty

t=0: the CPU is free. A starts (the first in the queue).

Step 1 of 20 t=0: the CPU is free. A starts (the first in the queue).

Results

ProcessFinishTurnaroundWaitingResponse
A4410
B1816100
C171391
D201491
E15752
Average10.806.800.80

Turnaround = finish − arrival · Waiting = turnaround − burst · Response = first time on CPU − arrival.

Check my answer

Write your Gantt chart as “process start-end” slices, for example A 0-3, B 3-7 (and - for an idle CPU). You can merge consecutive slices of the same process.

The whole thread:the CMOS inverterthe logic gatethe assembly programthe operating system (you are here)the automata