linux - Credit-Based Process Scheduling algorithm -


i've been trying implement in java simulation of the credit based scheduler algorithm not understand logic of algorithm

i referring :

credit-based algorithm – each task has # of credits associated – on each timer interrupt: • each timer interrupt: running task loses 1 credit • if credits task == 0, task suspended • if tasks have 0 credits: – re-credit: every task gets credits = credits/2 + priority choose next task run: pick 1 credits

my question :

when credits = 0 :====> use formula recredits processes credits = credits/2 +priority how can use credits since equals 0 ?, should use self-defined table of credits ? or misunderstanding help, please?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -