Placement algorithms practice
Simulator plus graded practice problems.
Module 4
Session 4.2
Lesson 2 of 2
Placement algorithms practice
First, Best and Worst Fit on your own data — then test yourself.
Placement simulatorEdit the inputs, press Run, then Step or Play.
Practice
| # | Holes (KB) | Requests | Answer |
|---|---|---|---|
| 1 | 200 400 600 500 300 250 | 357 210 468 491 | First: 357→400, 210→600, 468→500, 491 waits. Best: 357→400, 210→250, 468→500, 491→600. Worst: 357→600, 210→500, 468 waits, 491 waits. |
| 2 | 50 150 300 350 600 | 300 25 125 50 | First: 300→300, 25→50, 125→150, 50→350. Best: 300→300, 25→50, 125→150, 50→350. Worst: 300→600, 25→350, 125→325 (left of 350), 50→300. |
Quick check
Which strategy must search the entire list of holes (if unsorted)?
First Fit can stop at the first hole that fits.
Total free memory is 500 KB in five holes but a 200 KB request fails. This is…
Free memory exists but is not contiguous.
Which strategy leaves the largest leftover holes?
That is its design goal.