call cpu scheduler on each clock pulse and check if context swtich is needed