The runs, however, can be run in parallel. It seems the fsl jobs are depending on eachother, so the 4 jobs cannot be run in parallel. By pushing the return code of the executed tasks, we can abort if something went wrong. We use file descriptor 3 as a semaphore by pushing (= printf) and poping (= read) tokens ( '000'). # push the return code of the command to the semaphore # this read waits until there is something to read # run the given command asynchronously and pop/push tokens N processes with a FIFO-based semaphore: # initialize a semaphore with a given number of tokens It's also possible to use FIFOs as semaphores and use them to ensure that new processes are spawned as soon as possible and that no more than N processes runs at the same time. Parallel runs for thing in a b c d e f g do Sequential runs for thing in a b c d e f g do
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |