Alfresco 4.2 is an old release. Both Alfresco and the 3rd party software components it uses have evolved since then. It may be worth updating them, since some issues may have already been addressed.
GhostScript may not just be used for document previews, but also for thumbnails, depending on the document mimetype. You'd need to identify which specific document within Alfresco is being processed at this time to potentially check its contents and identify the reason it triggers this 100% CPU utilisation behaviour. For the time being, I would simply kill the GhostScript process when it pops up again, and try to update those 3rd party components or Alfresco as a whole (i.e. if you opted for the monolithic install via the default installer when setting up your system).
There is no way to disable GhostScript individually in Alfresco. It is being called indirectlyas part of an ImageMagick conversion (you can see that from the temporary file name). So you'd have to disable ImageMagick by simply not configuring it correctly in alfresco-global.properties (i.e. incorrect path) for GhostScript to no longer be triggered.
Thank you both for your ideas. In the last days I had the chance to restart alfresco, so I manually killed the gs process, and now it does not appear again. I have also added in alfresco-global.properties the option suggested.
In the next few weeks we will perform an Alfresco upgrade, too...since we also had some issues with the old MySQL installation we had on that server.