Re: adjusting timeslice in sched.c of linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes I want to adjust the remaining time_slice from within a process. I agree its a bit agressive but if you want to do it for a specific amount, say 8 * BASE_TIMESLICE, Im not sure how easy it would be to adjust dynamic priority to get this exact figure. That is why I am implementing a system call to do it directly. 

As for disabling the interupt timer: is there a way to block it? rather than disable? or is that what you mean? Im not familiar with the timer softirq. where can i find it and how can i disable it and then re-enable it?

thanks for the advice =)



On Nov 6, 2005, at 7:37 AM, Mulyadi Santosa wrote:

Hello....

On 11/6/05, Filip Iliescu <djpriya@xxxxxxxxx> wrote:
I am trying to simple change the timeslice variable in the PCB block
of a process found in the typedef struct task_t by implementing a
system call.
Are there any race conditions or reasons I should synchronize this
variable before I alter this timeslice? Are there any reasons it
would fail?
 
You want to change how much timeslice is assigned to each process by creating a new syscall ? Do you mean, extending the timeslice left or simply increase/decrease the timeslice for the next epoch for a process?
 
 I haven't tried it by myself, but I think if you really want to create one, please consider to disable interrupt timer. As you might know, timer softirq is the one which decrements the timeslice variable by one on every timer tick. Therefore, there is a (big) chance that you introduce race with this timer softirq. Do this disabling action real quick unless you want to lengthen clock drift.
 
Personally, I think changing time slice directly via system call is too "agressive". I suggest to do it inside the scheduler related function itself to change the the timeslice based on certain condition. The common practice is just providing syscall to change nice level, and from this nice level, dynamic priority is calculated thus timeslice is finally determined.
 
Anyway, I don't want to discourage you. Just give it a try....
 
regards
 
Mulyadi
 
 
 

 


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux