Frankenween / xv6-riscv

Xv6 for RISC-V
Other
0 stars 0 forks source link

Free space in process list #9

Open Frankenween opened 1 year ago

Frankenween commented 1 year ago

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.

Frankenween commented 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.