Yes, you can quit the Dock as often as you wish. You can also force it to quit and rerun by opening the Terminal application in your Utilities folder and entering: killall Dock then press RETURN. Or you can use the force quit options within Activity Monitor.
The windowserver is the process that performs all the screen drawing such as open windows and window content. I can suggest something you might try: Download and install a utility called AppleJack -
VersionTracker or
MacUpdate. Carefully read the documentation then follow the instructions on running the utility. This requires booting into
single-user mode. Just run AppleJack in Auto mode. AppleJack will perform several maintenance chores that may clear up the problem with WindowServer.
Additionally, I would suggest the following:
Delete caches to resolve some problems:
Boot into
single-user mode. After startup is completed you will be in command line mode and should see a prompt with a cursor positioned after it. At the prompt enter the following then press RETURN after each commandline:
/sbin/fsck -fy
If you receive a message that says "
*** FILE SYSTEM WAS MODIFIED
***" then re-run the command until you receive a message that says "** The volume (name
ofvolume) appears to be OK." If you re-run the command more than seven times and do not get the OK message, then the drive cannot be repaired this way.
If you were successful then enter:
/sbin/mount -uw /
rm -rf /System/Library/Caches/*
rm -rf /System/Library/Extensions.kextcache
rm -rf /System/Library/Extensions.mkext
rm -rf /Library/Caches/*
reboot
I suggest you print out the above to be sure you do not make any errors when entering the commands. When in single-user mode you have 'root' access, so it's important that you not make any mistakes.