How to write code for round robin scheduling-scheduling-jpg