Process scheduler for an operating system in C++