Abnormal keyboard accessing problem of my desktop pc

I have a P-IV desktop PC. When I start my Desktop PC sometimes the keyboard which is PS-2 is not working. But at this point when I shut down the PC and start it again then it works. What is the problem? Anybody give me a solution.
