05.12.09, 08:58, "André Braga" <meianoite@xxxxxxxxx>: > Em 05/12/2009, às 08:29, Mikhail Panasyuk escreveu: > > While experimenting with scheduler I create additional structures > > which require additional memory. Is there any limits for the memory > > size I can utilize? > > Welcome to the kernel (debugging) land! ;) > [skiped] Thanks! > > But if I combine all stuctures in one big structure it would panic > > on system boot. Or it would sometimes panic, sometimes not. > It would be rather more helpful if you posted the code that doesn't > work rather than the part that does ;) Will do next time. Not working code didn't survive this time. > > 2) I'd like to use some functions in scheduler, at least pow > > (). What changes should make in Jamfiles? > > Forget about math.h, been there, done that, gave up. You'll have > interrupts off, and while I believe that Haiku saves the FPU context > on switch (Axel?), I tried (and documented having tried) that approach > of using an exponential to calculate skipping, and and it was not only > the wrong approach, but complete overkill. > > If you want to improve the skipping situation (or should I say > starvation situation) you don't need a more complex algorithm to > implement some really smart skipping criteria; you need better data > structures to ensure fairness thus avoiding starvation. > > I'm only saying this because I tried exactly the same approach before > (check my [rather old at this point] blog posts): your model is > probably wrong at this point. Try another approach. I need pow() for so-called 'adaptive' fair algorithm. pow() used rarely and only in one place... OK, if not possible I'll try other approaches. > I really should resume posting articles (and, well, code) about my > scheduler design. So much has changed since those blog posts. Sorry, I've not read your articles but will do :) Thanks, Mikhail.