Why would the headlights flash 3 times then the service light come on for a 2001 Chevy cavalier?

TRY CHECKING TO SEE IF YOU HAVE A HIGH BEAM HEADLIGHT OUT. tHIS WILL CAUSE THE PROBLEM YOU HAVE.