Objectives
To implement a simple job scheduler that executes non-interactive jobs (e.g., jobs that do not have direct user interaction, jobs that can run in the background).
Description
In this project we will implement a simple job scheduler that will execute non-interactive jobs (for example, jobs that do not have direct user interaction, jobs that can run in the background).
At any given time, only P jobs should be executing, and P is provided as an argument to your program.
If you have more than P jobs submitted, then these additional jobs must wait until one of the P executing jobs are completed.
You can assume that P is typically the number of cores that are available on a system and you are executing one process per core and if there are more jobs than the available number of cores these jobs must wait for one of the processes to complete.
When you launch the program with P as the command-line argument, the program should print a prompt and wait for the user to enter commands.
As the jobs are non-interactive, the output and error streams from the job must be written to separate files -
Fig: 1