From mboxrd@z Thu Jan 1 00:00:00 1970 From: mobile.parmenides@gmail.com (Parmenides) Date: Mon, 26 Sep 2011 10:16:58 +0800 Subject: Why do processes with higher priority to be allocated more timeslice? Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, It seems that Linux's scheduler tends to allocate longer timeslice for processes with higher priority. Actually, the CFS scheduler which is a new scheduler in Linux kernel also does the same thing. But, I think this way does not fit with scheduler's principle. The goal chased by a scheduler is low latency and high thoughput. Normally, a I/O-bound process has higher priority, while a CPU-bound process has lower priority. So, a I/O-bound process (which has enough timeslice) can preempt a CPU-bound process easily. This way ensures lower latency. It is also necessary that CPU-bound processes are to be allocated longer timeslice to improve throughput owing to less process switch costs. That means lower priority processes (CPU-bound) should be allocated longer timeslice, whichs obviously conflicts with the actual practice taken by the Linux's scheduler. Any explanation? Thanks.