operating system
Objectives: Linked list manipulation without standard library support, representation of a PCB using a struct, implementation of a basic scheduler and practice withC/C++ coding.
Code Requirements: You must implement your own linked list, if you use C++.
Write a program in C/C++ that will simulate the scheduling of processes/jobs. You will need to simulate FIFO (non-preemptive), Priority (preemptive) and ShortestProcess Next (preemptive).
Input
Your program should read input from a text file that has the following format Comments
1 3 4 0 Process 1 with priority 3, run time of 4 and arrival time 0
2 5 2 2 Process 2 with priority 5, run time of 2 and arrival time 2
3 2 1 3
4 4 1 4
5 2 3 5
Output
The output will show the order in which the processes run by their process ID.
Sample output
FIFO Order (Non-preemptive) 1 1 1 1 2 2 3 4 5 5 5
Priority Order (Preemptive) 1 1 2 2 4 1 1 3 5 5 5
Shortest Process Next (Preemptive)1 1 1 1 3 4 2 2 5 5 5
The output should be printed directly to the console.