How can I add parameters to the Linux Kernel scheduler?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am learning to work with Linux kernel. Currently I am using 4.15.0-36-generic.



I understood that the schedulers after version 2.6 use a completely fair scheduler. I also came to know that, the implementation uses virtual runtime(v_runtime) for priority updation of a process.



Theoretically, after the the process has a virtual runtime of t, the update is done as



v_runtime += t * (w).



This weight w is said to be a function of the NICE value of the process. It is here, that I want to add one more parameter. I want this w to be a function of NICE value, and another parameter for a given process. The rest of the scheduling algorithm can remain same for the moment.



I cloned the Linux code, and checked out the scheduler code and documentation. I could not locate the point where I could make the change.










share|improve this question















migrated from unix.stackexchange.com yesterday


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
    – ctrl-alt-delor
    yesterday










  • What is the other parameter?
    – ctrl-alt-delor
    yesterday










  • @ctrl-alt-delor It could be a value depending on the type of program
    – Nikhilesh Singh
    yesterday










  • Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
    – ctrl-alt-delor
    18 hours ago














up vote
0
down vote

favorite












I am learning to work with Linux kernel. Currently I am using 4.15.0-36-generic.



I understood that the schedulers after version 2.6 use a completely fair scheduler. I also came to know that, the implementation uses virtual runtime(v_runtime) for priority updation of a process.



Theoretically, after the the process has a virtual runtime of t, the update is done as



v_runtime += t * (w).



This weight w is said to be a function of the NICE value of the process. It is here, that I want to add one more parameter. I want this w to be a function of NICE value, and another parameter for a given process. The rest of the scheduling algorithm can remain same for the moment.



I cloned the Linux code, and checked out the scheduler code and documentation. I could not locate the point where I could make the change.










share|improve this question















migrated from unix.stackexchange.com yesterday


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
    – ctrl-alt-delor
    yesterday










  • What is the other parameter?
    – ctrl-alt-delor
    yesterday










  • @ctrl-alt-delor It could be a value depending on the type of program
    – Nikhilesh Singh
    yesterday










  • Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
    – ctrl-alt-delor
    18 hours ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am learning to work with Linux kernel. Currently I am using 4.15.0-36-generic.



I understood that the schedulers after version 2.6 use a completely fair scheduler. I also came to know that, the implementation uses virtual runtime(v_runtime) for priority updation of a process.



Theoretically, after the the process has a virtual runtime of t, the update is done as



v_runtime += t * (w).



This weight w is said to be a function of the NICE value of the process. It is here, that I want to add one more parameter. I want this w to be a function of NICE value, and another parameter for a given process. The rest of the scheduling algorithm can remain same for the moment.



I cloned the Linux code, and checked out the scheduler code and documentation. I could not locate the point where I could make the change.










share|improve this question















I am learning to work with Linux kernel. Currently I am using 4.15.0-36-generic.



I understood that the schedulers after version 2.6 use a completely fair scheduler. I also came to know that, the implementation uses virtual runtime(v_runtime) for priority updation of a process.



Theoretically, after the the process has a virtual runtime of t, the update is done as



v_runtime += t * (w).



This weight w is said to be a function of the NICE value of the process. It is here, that I want to add one more parameter. I want this w to be a function of NICE value, and another parameter for a given process. The rest of the scheduling algorithm can remain same for the moment.



I cloned the Linux code, and checked out the scheduler code and documentation. I could not locate the point where I could make the change.







linux linux-kernel scheduling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









ctrl-alt-delor

4,12032242




4,12032242










asked yesterday









Nikhilesh Singh

114




114




migrated from unix.stackexchange.com yesterday


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.






migrated from unix.stackexchange.com yesterday


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.













  • I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
    – ctrl-alt-delor
    yesterday










  • What is the other parameter?
    – ctrl-alt-delor
    yesterday










  • @ctrl-alt-delor It could be a value depending on the type of program
    – Nikhilesh Singh
    yesterday










  • Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
    – ctrl-alt-delor
    18 hours ago
















  • I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
    – ctrl-alt-delor
    yesterday










  • What is the other parameter?
    – ctrl-alt-delor
    yesterday










  • @ctrl-alt-delor It could be a value depending on the type of program
    – Nikhilesh Singh
    yesterday










  • Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
    – ctrl-alt-delor
    18 hours ago















I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
– ctrl-alt-delor
yesterday




I have edited to fix grammar and some ambiguity. It I have interpreted the wrong way, then please edit again.
– ctrl-alt-delor
yesterday












What is the other parameter?
– ctrl-alt-delor
yesterday




What is the other parameter?
– ctrl-alt-delor
yesterday












@ctrl-alt-delor It could be a value depending on the type of program
– Nikhilesh Singh
yesterday




@ctrl-alt-delor It could be a value depending on the type of program
– Nikhilesh Singh
yesterday












Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
– ctrl-alt-delor
18 hours ago




Yes what else could it be?: A parameter has a value, and program ≈ process. More insight may help us to find another solution.
– ctrl-alt-delor
18 hours ago

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53304868%2fhow-can-i-add-parameters-to-the-linux-kernel-scheduler%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53304868%2fhow-can-i-add-parameters-to-the-linux-kernel-scheduler%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?