scheduler

Going back to the basics... kinda.

(Or: what you finally learn to do after a number of false starts)

But first, the obligatory disclaimer, in case you missed it. Thanks.

After I admitted the basic flaws of my previous attempts, I decided to go back to the basics and use a "bottom-up" approach to come up with a solution that suited the needs of the Haiku scheduler: fairness, responsiveness, responsive, scalability, succinctness and efficiency.

Right. So let's keep in mind that the BeBook already hints at what the priority numbers should roughly mean: frequency of scheduling. We have 120 priority levels; the higher 20 are reserved to real-time threads.

This post is not going to address these directly. Instead, today I'll be telling the background story of how quite a number of pieces are being woven together to fulfill those specific needs and constraints. OK, enough metablogging ;)

After letting go of the previous approach, I decided to study the subject on the very traditional literature about it. And while I was studying classic scheduler approaches on the Minix book, I noticed that the description of lottery-based scheduling was very compatible with that description of priorities meaning approximate frequency of being chosen by the scheduler. Lottery scheduling was proposed by Carl Waldspurger in 1994, and it works roughly like this[1]:

The first (or nth, even) attempt: a cautionary tale

(Or: rose-coloured glasses are both the blessing and the curse of being in love)

But first, the obligatory disclaimer, in case you missed it. Thanks.

Remember where I left on the previous post? Now, with greater confidence, I set myself to improve my original algorithm's performance even further. But that's just because I knew it sucked. It was extremely inefficient as far as implementation goes; it looked great in the benchmarks because it was being compared to O(n) (n being the number of threads in the system) algorithms, while it had O(1) complexity, so I already had a head-start, so to speak. Still, I knew the algorithm very well and understood that there were plenty of bottlenecks to fix. I wrote it, after all.

[/pride mode=off]

Introduction to the new Haiku scheduler, and other tidbits

Hi, folks!

For those who don't know me (or my GSoC assignment) already, I'm the one assigned to ticket #1069, namely:

Create an O(1) thread scheduler with CPU affinity and soft real-time support which targets desktop responsiveness.

I'd like to dedicate my next few blog entries to introducing myself and discussing how I got here, why I wanted to tackle this specific task, what background I have regarding the subject of thread scheduling, how I failed miserably to realise that my first attempt at designing an algorithm suitable for Haiku's needs had fundamental flaws, how far I am at my second attempt, and the obligatory comparison to Ingo Molnár's Completely Fair Scheduler that has been making the news in the Linux world.

Haiku SVN: Kernel, Kernel, Kernel.

Blog post by eNGIMa on Mon, 2007-03-05 20:50

Quick Updates

r19700-r19800

  • Addition of fortunes, including Haiku specific texts.
  • Tweaked thread scheduler.
  • Many VM enhancements and fixes
  • Addition of resource editing tool, resedit.
  • Addition of VMware graphics driver.
Syndicate content