unable to control a servo with Arduino

Your code looks ok, assuming you use a standard Hobby-rc Servo with 3 cables - power, ground and control attached to your Arduino pin. The laptop crash would indicate, that your Servo draws too much power from the USB-connector. Could you please provide more information about that servo?

Korman