(Note: This is part of the early draft for the documentation of ALExSIM-USAS, to give the basic idea and understanding about ALExSIM-USAS and its components/sections. This draft may go through more updates. Latest update - 4 Feb 2020)
Select Scheduling Algorithms
The section will allow the user to select the scheduling algorithm for the simulation. User not only allowed to select one algorithm but can even combine with any of the available algorithms. Figure 1 below shows the section:
|
Figure 1: Select Scheduling Algorithms section |
The following are the scheduling algorithms that are currently available:
- First-Come-First-Serve (FCFS) - this is the simplest algorithm where the earliest process arrived will be the first to be given the CPU time.
- Shortest-Job-First (SJF) - also known as the Shortest Process Next (SPN), this algorithm schedule any of the processes that has the most minimum burst time to use the CPU first. Process that comes later will be added to the ready queue regardless of its burst time.
- Shortest-Job-First (Preemptive) - (SJF-P) - will schedule the process which has the shortest remaining burst time. This is a preemptive algorithm, and a new arrival may preempt (stop) the running process if it has shorter burst time compared to the remaining burst time of the running process.
- High-Priority-First (HPF)- the process that has the highest priority will be scheduled to use to CPU first. Priority value may be given based on various criteria. For this algorithm, USAS applies the use of priority number, and smaller priority number indicates the higher priority. (SJF is also priority-based algorithm which uses shortest burst time as its priority)
- High-Priority-First (Preemptive) - (HPF-P) - this algorithm is similar to HPF, except that the newly arrived process may preempt (stop) the running process if the new process has higher priority (lower priority number) compared to the one running.
- Round-Robin - the running process from the ready queue will be assigned a burst time name time quantum, where it can only runs up to the given time quantum. If the process still not finish, the process will be preempted (stopped) and sent to the back of the ready queue. Another process will receive the same time quantum and runs in CPU. Each process in the ready will take turns to use the CPU based on this rotation.
User can choose one or more of the available algorithms. (More algorithms will be available in the future version, such as the multilevel queue and multilevel feedback queue.) Later all the results for the selected algorithms will be shown simultaneously, which allows user to compare the results from all the algorithms.
After the user completes the selection of algorithm (and completed generating and modifying the process details), user may click the Run Simulation button to run the simulation and produce the simulation result.