CPU scheduling simulator
Enter arrival & burst times, pick an algorithm, and get a Gantt chart with completion, turnaround, waiting and response times fully worked out.
Input
| PID | Arrival | Burst | Priority |
|---|
Priority convention: lower number = higher priority.
Disk scheduling simulator
Enter the request queue and starting head position to see the seek sequence, a head-movement diagram, and total / average seek time.
Input
Page replacement simulator
Enter a reference string and frame count to step through FIFO, LRU, or Optimal replacement, with page faults and hit ratio.
Input
Deadlock handling simulator
Check for deadlock avoidance and detection using the Banker's Algorithm for resource types with multiple instances, or the wait-for graph (resource-allocation graph collapsed over processes) for single-instance resource types.
Setup
- Compute Need = Max − Allocation for every process (how much more each one might still ask for).
- Set Work = Available, and mark every process "unfinished".
- Find any unfinished process whose Need ≤ Work (row by row, resource by resource).
- If found: pretend it runs to completion and releases everything backWork = Work + Allocation — mark it finished, add it to the safe sequence.
- Repeat step 3 and 4 until no more processes qualify.
- If all processes end up finished → the state is safe (the safe sequence is a valid run order). If some are stuck → the state is unsafe (deadlock is possible).
Setup
- Draw one node per process. Draw an edge Pi → Pj whenever Pi is waiting for a resource currently held by Pj.
- Walk the graph (depth first search) from each node, keeping track of which nodes are on the current path.
- If the walk ever reaches a node that is already on the current path, a cycle exists.
- A cycle means every process on it is waiting on the next one, and the last waits on the first : none of them can ever proceed, so they are deadlocked.
- No cycle anywhere in the graph → the system is not deadlocked right now.
Each single-instance resource is held by at most one process, so a wait relation Pi → Pj means Pi needs a resource currently held by Pj. A cycle in this graph means deadlock.