adapted scheduler for multiarch
fix paging errors
make it all compilable