views:

263

answers:

2

In linux kenel process scheduler there is a priority type SCHED_FIFO. I want to change the scheduling policy. I have two questions:

1- Where, in the kernel source code, is it mentioned that after a tick the cpu should belong to the interrupted process(Because in FIFO the process should remain until it finishes)?

2- In SCHED_RR where the interrupted process is inserted at the end of the waiting queue again?

I use 2.6.31 kernel

Thank you.

+1  A: 

Read the function do_sched_rt_period_timer in kernel/sched_rt.c about line 530.

Andrew McGregor
A: 

It seems that scheduler_tick function calls appropriate function of each class and inside it the appropriate function for reinserting the process (enqueue for Real-time) is called.

Shayan