lkml.org 
[lkml]   [2000]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: about time-slice
> > I have a question about the time-slice of linux, how do I know it, or how
> > can I test it?
>
> First look for the (platform-specific) definition of HZ in
> include/asm/param.h. This is how many timer interrups you get per second (eg
> on i386 it's 100). Then look at include/linux/sched.h for the definition of
> DEF_COUNTER. This is the number of timer interrupts between mandatory
> schedules. By default it's HZ/10, meaning that the time-slice is 100ms (10
> schedules/sec). (of course the interval could be longer if kernel code is
> hogging the CPU; the scheduler won't run until the process leaves the kernel
> or sleeps explicitly...)

I have examined my system and HZ is 100, but there is no DEF_COUNTER, but

#define DEF_PRIORITY (20*HZ/100) /* 210 ms time slices */

Is this mean the time-slice of Linux is about 210ms, it's so big. Is there
some way to reduce it and of course don't make the system unstable? If so,
it's great for my develop.

Regards.

Zhixu


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

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:5.502 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site