First effort towards the algorithms implementation.

This commit is a unfinished work, so things are broken. Currently I'm
working on processes preemption.