Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Single-Threaded CPU
Bookmark
Input
Example 1
Same Enqueue
Example 3
Custom
enqueueTimes
=
[1, 2, 3, 4]
,
processingTimes
=
[2, 4, 2, 1]
,
tasks
=
[[1,2], [2,4], [3,2], [4,1]]
T0
[1,2]
T1
[2,4]
T2
[3,2]
T3
[4,1]
0
2
4
6
8
10
always run the ready task with the shortest processing time
algo
master
.
io
Step:
Start: 4 tasks as [enqueueTime, processingTime]
0 / 9
Input
Example 1
Same Enqueue
Example 3
Custom
enqueueTimes
=
[1, 2, 3, 4]
,
processingTimes
=
[2, 4, 2, 1]
,
tasks
=
[[1,2], [2,4], [3,2], [4,1]]
0 / 9
T0
[1,2]
T1
[2,4]
T2
[3,2]
T3
[4,1]
0
2
4
6
8
10
always run the ready task with the shortest processing time
algo
master
.
io
Step:
Start: 4 tasks as [enqueueTime, processingTime]