Now onto my problem. Ive implemented the queues through linked lists function and have a created constructors for objects(objects will act as processes in my model instead of actual process themselves). The objects contain within themselves a few values. One thing that I havent added yet to the values is the total execution time duration of the object which will taken as user input. Another input to be taken at the start of the program will be the time slice period which will be uniform for all. So lets say an object has a total time of 20s and the time slice is 2s so the object will require ten passes through the running state to completely execute.
For me to implement the time slicing, I needed to know about timers and timestamps - a subject on which I have zero info. So hence I ask you for help. If somebody can implement the time slicing function and add it is an option in the menu that would be great. For example 'To start multiprogramming press 6' this option would start moving the objects through the imaginary running state and once completed move it back into the ready queue and so on. My code on which I have worked uptil now is attached below. os2 is the main class, pcb is the object class and the linkedlist and queue classes are there to implement the queueing functions.
If any confusions dont hesitate to ask. Since I sort of need this in a hurry hence Ill be checking this forum almost every hour for the next 20 hours atleast. Thanks in advance guys.
