mirror of
https://github.com/zach-sb/COMP2240-Assignment1.git
synced 2024-07-02 12:04:00 +10:00
48 lines
1.0 KiB
Markdown
48 lines
1.0 KiB
Markdown
# COMP2240-Assignment1
|
|
|
|
The assignment task is to write a program that simulates the scheduling algorithms
|
|
|
|
* First Come First Serve (FCFS)
|
|
* Standard FCFS scheduling algorithm. Process tickets are ignored in scheduling.
|
|
* Shortest Remaining Time (SRT)
|
|
* Standard SRT scheduling algorithm. Process tickets are ignored in scheduling.
|
|
* Multi-level Feedback (Variable) (FBV)
|
|
* Lottery (LTR)
|
|
|
|
For each algorithm, the program should list the `order and time` of the jobs being loaded in the CPU, and compute the `turnaround time` and `waiting time` for every job as well as the `average turnaround time` and `average waiting time` for the set of processes.
|
|
|
|
The values should be put into a table in an output.
|
|
|
|
## Pseudocode
|
|
|
|
### Import File
|
|
|
|
Open File
|
|
|
|
#### Import Objects from file
|
|
|
|
```
|
|
IF line == BEGIN
|
|
go to next line
|
|
Set Dispatcher to value after DISP: #
|
|
go to next line
|
|
if end move on
|
|
```
|
|
|
|
```
|
|
if line == ID
|
|
create new proccess object
|
|
Save:
|
|
ID
|
|
Arrive
|
|
Exec Size
|
|
Tickets
|
|
if end move on
|
|
```
|
|
|
|
```
|
|
if line == begin random
|
|
import one number per line
|
|
```
|
|
|