Open Frankenween opened 1 year ago
Possible solution 1:
In this implementation when there is a lot of free space, rebuild the proc array. But every hart must wait, so this will be hart 0
task. Threre must be a syncronization, so every process will wait.
Solution 2: Implement a real vector with the same type of blocking. Ensure that every other hart in waiting, after this swap two elements. Prefferable, because harts are waiting less.
When there are a lot of processes running at once, they take a sequential part of the proc vector. But then there are free spaces and scheduler must go through many free elements.