Fix bug
This commit is contained in:
parent
0668095e82
commit
9a170e3334
@ -113,6 +113,7 @@ void fcfs(int start) {
|
||||
int position = start;
|
||||
for (int i = 0; i < queue->size; i++) {
|
||||
DiskRequest request = dequeue(queue);
|
||||
while (seekTime < request.time) { seekTime++; }
|
||||
seekTime += timeToProcessRequest(position, request.position);
|
||||
movement += abs(position - request.position);
|
||||
position = request.position;
|
||||
|
Loading…
Reference in New Issue
Block a user