Fix display wrong task prority in ps command
Separate task functions out of kernel.c