Skip to contentSkip to conversation

Linux scheduler Implementation details

DISCUSSION Sonika Sachdeva 3 participants 7 messages Feb 27, 2004

lore
Share & tools
lore
#0 lore raw

Hello List,

I want to simulate the Linux Scheduler, ie Calculate the priorities, counters and define to some extent how much time a given process will take to execute on the system. Can anyone suggest some pointers?

Thank you
Sonika

#1 lore raw
Quoted 6 lines · Sonika Sachdeva

Hello List,

I want to simulate the Linux Scheduler, ie Calculate the priorities, counters and define to some extent how much time a given process will take to execute on the system. Can anyone suggest some pointers?

Quoted 11 lines

Thank you
Sonika

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Documentation/sched-design.txt
Documentation/sched-coding.txt

and oh ofcourse, kernel/sched.c :-)

/Raj

#2 lore raw
In reply to Sonika Sachdeva
Quoted 7 lines · Sonika Sachdeva

Hello List,

I want to simulate the Linux Scheduler, ie Calculate the priorities, counters and define to some extent how much time a given process will take to execute on the system. Can anyone suggest some pointers?

It is all in kernel/sched.c, so you can just make a simulator and plug that code in.

This will perfectly model the scheduler behaviour given some input from your simulator, which is what you asked for. This has nothing to do with maximum realtime scheduling latency, of course.

#3 lore raw

Hi,

I want to give the loaded system metrics(loadavg, io details etc) as the input to the simulator program so that it is able to calculate the priority for any new job that will be submitted.

Then knowing the execution time of that job in a no-load system, I am able to compute the latency encountered becoz of the load on the system.

How can I reuse the sched.c code to do this?

Thank you
Regards
Sonika

Quoted 16 lines · Nick Piggin
Quoted 7 lines · Sonika Sachdeva

Hello List,

I want to simulate the Linux Scheduler, ie Calculate the priorities, counters and define to some extent how much time a given process will take to execute on the system. Can anyone suggest some pointers?

It is all in kernel/sched.c, so you can just make a simulator and plug that code in.

This will perfectly model the scheduler behaviour given some input from your simulator, which is what you asked for. This has nothing to do with maximum realtime scheduling latency, of course.

#4 lore raw
Quoted 12 lines · Sonika Sachdeva

Hi,

I want to give the loaded system metrics(loadavg, io details etc) as the input to the simulator program so that it is able to calculate the priority for any new job that will be submitted.

Then knowing the execution time of that job in a no-load system, I am able to compute the latency encountered becoz of the load on the system.

How can I reuse the sched.c code to do this?

You can use it to tell your simulator how the Linux kernel will schedule tasks. I'm not sure exactly what you want, execution time? latency?

#5 lore raw

I wonder if you could give me some hints to do fair approximations (to calculate execution time) for scheduling process?

Regards
Sonika

Quoted 18 lines · Nick Piggin
Quoted 12 lines · Sonika Sachdeva

Hi,

I want to give the loaded system metrics(loadavg, io details etc) as the input to the simulator program so that it is able to calculate the priority for any new job that will be submitted.

Then knowing the execution time of that job in a no-load system, I am able to compute the latency encountered becoz of the load on the system.

How can I reuse the sched.c code to do this?

You can use it to tell your simulator how the Linux kernel will schedule tasks. I'm not sure exactly what you want, execution time? latency?

#6 lore raw
Quoted 4 lines · Sonika Sachdeva

I wonder if you could give me some hints to do fair approximations (to calculate execution time) for scheduling process?

Use a very simple model? Assume each runnable process gets equal amount of the CPU.

I have no idea what you are trying to do or why, but I suspect that the "simulator" you should be using is testing a running kernel on a real machine. Very simple, very accurate.