You are to write an application that will allow us to simulate various scheduling algorithms. In order to test our simulation the data file "Simulation-Data-1.txt" has been prepared. The file contains a number of lines of data. Each line contains information about a process and has the following format:

processID Process-Arrival-Time Process-Service-Time

For this assignment we will assume that our system contains one processor and that we are using a Round-Robin scheduler.

Your program should allow the user to enter the length of the time quantum that will be used for the round robin scheduler.

Each process should be represented by a process control block (PCB). The PCB should be initialized when the process enters the system and updated as the process moves through the system.

The simulator should maintain:

  • 1. a list of PCBs for the processes that are in the ready state.
  • 2. a list of PCBs for the processes that have completed.
  • 3. a list of the process(es) that are currently running.
  • 4. a clock to keep track of the current time.

Your simulator should use separate threads to manage the clock, entry of jobs into the system, the scheduling of processes, and moving finished jobs to the finished queue.

Your simulation should produce a file that contains:

  • 1. the time when each process finishes
  • 2. the amount of time that each process spent on the ready list
  • 3. the total time and average time that all processes spent on the ready list.
  • 4. the time when all processes finished.

You should be using C/C++and Posix threads.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.