Implemented FCFS algorithm.