The simulation will consist of two main communicating processes, a producer and a consumer.
This process will be required to run to create a series of child processes that will represent each of the printer jobs. The PID number of each child is to be inserted / spooled within a priority queue.
The queue will be made available to the second process to allow de-spooling.
The process should be configurable using command line arguments such that the size of the queue and the maximum number of jobs to be created during each cycle can be specified.
It should perform the following functionality
Create a number of print jobs.
Assign a priority value to each.
Insert their details into a suitable data structure.
This process will be separate from the first and running within a separate console window and will simulate the de-spooling process.
The process should be configurable using command line arguments such that the maximum number of jobs to be deleted during each cycle can be specified.
It should perform the following functions:
Find and delete a number of printer jobs by priority order.
Print a message to notify the user of the deletion.
Kill the corresponding process.
Remove the processís details from the data structure.