AngularJS app that simulates CPU scheduling
Just download or clone the repo. Everything is included.
Open the index.html file in the browser. As simple as that.
Theres 5 sections:
- Visualization: The most upper green one is it. The brownish-red boxes represent the CPU time given to specific processes. Every box contains it's id(i), starting place(s) and duration(d).
- Settings: Scale down the visualization if in need to fit the whole thing on screen and choose from different scheduling schemas.
- Manual: For manually manipulating the so-called todo list. When ready, Try it out by pressing
Run
. - Examples: First there is few premade patterns and then a box for you to insert one. Patterns are semicolon-separated(
;
) list of comma-separated(,
) pairs of starting time and duration of the request of CPU time. - Mean waiting time: The mean time a process was uselessly on halt waiting for it's CPU time. The time in which the CPU was busy calculating for the named process is not counted in here.
Input fields are submitted and actions are done using Enter
.
Complex schema is a combination of 3 queues:
- 8 ms timeslice
- 16 ms timeslice
- FCFS
The algoritm goes like this:
- New request is added added to the first queue,
- Each process gets one try to finish its job in 1. and 2. level,
- Failing to do so it gets pushed to the next queue,
-
- list is taken on only if there's nothing to process on the first two.