fixed kill function. handles active process and in ready queue, deallocates memory