Your task is to replace the round robin CPU scheduling scheme you developed in Practical 6 with a priority-based scheduling algorithm. To simplify matters, you can maintain the original linked list, but must now calculate a value for the priority field in the pcb structure (within insert_ready()), and modify dispatch() to take this value into account when selecting the next process to run.
When calculating a priority value, some possible inputs are:
1. the age of the process;
2. the amount of time a process has been waiting since its last cpu burst;
3. the total accumulated cpu time for the process;
4. anything else in the PCB;
5. the system time.