You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a mistake when boosting jobs to high priority queue:
for j in range(numJobs):
# print('-> Boost %d (timeLeft %d)' % (j, job[j]['timeLeft']))
if job[j]['timeLeft'] > 0:
# print('-> FinalBoost %d (timeLeft %d)' % (j, job[j]['timeLeft']))
job[j]['currPri'] = hiQueue
job[j]['ticksLeft'] = allotment[hiQueue]
To my limited understanding, allotment[i] represents number of quantum you have in queue i, so here is a 'type mismatch' bug.
To make it right: job[j]['ticksLeft'] = quantum[hiQueue]
Or maybe I failed to fully understand the program... In that case, any insight/correction is welcomed.
If I'm right, hope it get fixed so everyone doing ex5 in ch8 has no need to come through it again.
The text was updated successfully, but these errors were encountered:
There seems to be a mistake when boosting jobs to high priority queue:
for j in range(numJobs):
# print('-> Boost %d (timeLeft %d)' % (j, job[j]['timeLeft']))
if job[j]['timeLeft'] > 0:
# print('-> FinalBoost %d (timeLeft %d)' % (j, job[j]['timeLeft']))
job[j]['currPri'] = hiQueue
job[j]['ticksLeft'] = allotment[hiQueue]
To my limited understanding, allotment[i] represents number of quantum you have in queue i, so here is a 'type mismatch' bug.
To make it right: job[j]['ticksLeft'] = quantum[hiQueue]
Or maybe I failed to fully understand the program... In that case, any insight/correction is welcomed.
If I'm right, hope it get fixed so everyone doing ex5 in ch8 has no need to come through it again.
The text was updated successfully, but these errors were encountered: