تفاصيل العمل

A scheduler template to ease dealing with all schedulers in GUI in same manner Where all Schedulers implement the abstract Class Schedulers. each Scheduler has a:

● queue for processes, some has Priority queue and others have Queue(linked list)

● ArrayList for Completed Process and method to return it

● ArrayList for ganttChart and method to return it

● enqueue method to add Process to the queue

GUI has main Priority queue that sorts the processes according to their arrival times and starts adding these processes to the scheduler's queue. Each scheduler calls fetchNextTask where this method differs from one scheduler to another but also have main tasks like:

● On first time serving the process,Set Starting time

● If Remaining time=0 ,Set Completion time to (time+1) to include this additional 1 unit of serving the process and add process to CompletedProcesses

● returns true on serving a process

● returns false indicating empty queue(Idle state) and set PID to -1 in Gantt Chart

● It serves the processes by calling runnung.decrement(1) which runs the process for only 1 unit time.

● It updates Gantt Chart

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
تاريخ الإضافة