Two questions about scheduler

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

 



Dear all,

Recently, I have read the book <<Understanding the Linux Kernel>>

And I have two points not clearly about scheduler, hope someone here can
help me. Thank you in advance.

1. At book, there are below formula:
base time quantum = (140-static priority)*20  if static priority < 120
                    (140-static priority)*20  if static priority >=120

it is for i386/686, and this value should be HZ related. But I can't
find related code at sched.c, can anyone point it to me?

2. For the preemptive kernel, I know below situation may will happen
preempt implicitly(if i am error, please point out), are there any
situation will happen preempt?

1. The situation for each timer interrupt occurs:
	i: If process time quantum expires, it will be replaced
        ii: If process A(who owns CPU)'s priority is lower than process
B who is also at running queue. The process A will be replaced for
process B.
2. At IRQ handler, it wakes up process B. then, after IRQ exiting, the 
higher priority process B will preempt process A who is interrupted by
above IRQ.

-- 
Best Regards
Peter Chen


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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