I am writing a code to schedule processes on different cores of a multicore computer. I am using linux sched_setaffinity to schedule a job. However, I don’t know if there is a way that the scheduler program can instantaneously/after-a-delay know whether a scheduled job has finished. Can you please tell me, how to do this? My scheduler is a C++ program, so I cannot manually see. Since scheduler is itself assigning (scheduling) the job, it may have some extra information such as PID etc.
Share
Perhaps you should handle SIGCHLD in your scheduler. Your signal handler function will then be called whenever a child process exits.