The startup and shutdown scripts are part of the workspace, and are therefore executed on the same engine and in the same context as the workspace itself.
If you have more than one engine and run the same workspace in parallel, it is entirely possible that one engine executes a startup script while another engine executes a shutdown script, but of course within the context of each, separate workspace execution.