Re: 2.6 Scheduler of O(1)
From: Nix (nix-razor-pit_at_esperi.org.uk)
Date: 02/09/05
- Previous message: Harald Pollak: "Override Functions in linedisclimer"
- In reply to: Milind Dumbare: "Re: 2.6 Scheduler of O(1)"
- Next in thread: Fabiano: "Re: 2.6 Scheduler of O(1)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 09 Feb 2005 15:57:04 +0000
On 9 Feb 2005, Milind Dumbare uttered the following:
> fabiano.ramos@gmail.com (Fabiano) wrote in message news:<5afb2c65.0502081517.60b96d12@posting.google.com>...
>> - each runqueue has 2 priority arrays, the active and the expired.
>> The active array stores the processes that still have some time slice.
>> Once this time finished, they go to the expired array.
>> Each array has 140 entries (queues), one for each privilege level.
>are they sorted if yes who sort them ( it can (must )not be scheduler()
>because it would cause one more overhead
Each entry in the array corresponds directly to a single priority, and
the task's priority is already known. Within the task, tasks are
added to the end of the list and removed from the beginning.
There is a bitmap showing which arrays have anything in them at all:
most CPUs (notably the Intel ones) have CPU instructions to search
bitmaps for first-set-bit very fast, and it's bounded in any case
as the number of priority levels is fixed. All O(1).
>>> So, picking a process to run is as simple as picking the first
>> process of the first non-empty queue. As the number of queue
>> is fixed (140) and independent of the number of processes running,
>> the scheduler is O(1).
> if its that much easy then what was the problem to not to implemented in earlier
> versions
Er, because nobody thought of it? It's one of those designs that's only
obvious in hindsight; it's like an ordinary scheduler's data structures
turned inside out. :)
>> Why don't you try Love's Linux Kernel Development?
> please give me some URL or should I search on gooooooogle for above line
It's a book.
Ingo's original post is pretty informative, and the scheduler still
works in pretty much the same way it did back then:
<http://www.uwsg.iu.edu/hypermail/linux/kernel/0201.0/0810.html>.
-- Synapsids unite! You have nothing to lose but your eggshells!
- Previous message: Harald Pollak: "Override Functions in linedisclimer"
- In reply to: Milind Dumbare: "Re: 2.6 Scheduler of O(1)"
- Next in thread: Fabiano: "Re: 2.6 Scheduler of O(1)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|