Linux About changing linux scheduler / task struct
#1
I am doing a uni assignment about modifying the linux scheduler.

The general idea is adding an integer on the struct of each task, that would be initialized as zero.

When the scheduler is called for any of those tasks, if that integer is zero, the normal linux scheduler applies. If it is one, then the scheduler wouldn't choose another task, instead giving the control back to that task.

So the problems i have are:
  • Need to add an integer on task_struct
  • Need to create a terminal command that can change the value of said integer
  • Need to make that modification on linux scheduler
  • And i am completely lost on how to do that, can't even find the task_struct definition on kernel code. Any tips, answers or guides would be appreciated Smile
  • Tried to download all the kernel code (version 6.0.8) from kernel.org. Searched for useful resources and didn't find them.
Reply
#2
this has nothing to do with Kodi, so wrong place here.

Just to give you a bit help,
 
Code:
cd linux-6.0.8
grep -R "struct task_struct {" .

would reveal that the file you are looking for is
Code:
./include/linux/sched.h
Reply
#3
Moved to off-topic.
Always read the Wiki, FAQ and search the forum before posting.
Read/follow the forum rules.
Reply

Logout Mark Read Team Forum Stats Members Help
About changing linux scheduler / task struct0