Bossa, a Framework for Scheduler Development 152
Eugenia writes "The recent activity in Linux kernel development caused by the introduction of a new scheduler by Ingo Molnar has emphasized for ordinary Linux users the importance of schedulers in modern operating systems. This article gives you a glimpse of what scheduling development is like by letting you implement your own Linux scheduler thanks to Bossa, a framework for scheduler development."
Always behind the times... (Score:4, Funny)
Most commodity computers can only run one process at a time
Ha, with Longhorn 2010XP+++ and Office 2012 I'll be able to have two Clippys simultaneously! Take that, hippy!
Re:Always behind the times... (Score:1, Troll)
Re:Always behind the times... (Score:2)
--
Evan
Let the scheduler algorithm flamewar begin.. (Score:5, Funny)
Re:Let the scheduler algorithm flamewar begin.. (Score:2)
Re:Let the scheduler algorithm flamewar begin.. (Score:2)
Moreover, the elevator algorithm just means cycling through a sequence completely in one direction before changing direction. It need not be confined to just disk drive head motion. I can imagine cycling through PIDs in non-decreasing order before reverting to a non-increasing order.
Re:Let the scheduler algorithm flamewar begin.. (Score:2)
Re:Let the scheduler algorithm flamewar begin.. (Score:2)
Ordinary users? (Score:4, Insightful)
I know some people will take this as flamebait, but I honestly don't mean it to be. However, as long as Linux is in a state where developers think that "ordinary Linux users" have to even care what a scheduler is, Linux will be a failure for mainstream desktop usage.
Users don't care about OS internals. Don't send them to a page explaining OS scheduling, just tell them "All new Linux makes your applications more responsive!". That's all they want to hear.
Seriously.
Re:Ordinary users? (Score:5, Funny)
Re:Ordinary users? (Score:1)
Re:Ordinary users? (Score:3, Funny)
Oh.
Re:Ordinary users? (Score:1, Insightful)
Re:Ordinary users? (Score:2, Informative)
However, for those that do, you'll Soon be able to drop in the latest IO, CPU or 'whatever' scheduler, now being developed independantly from the kernel.
MOD PARENT UP (Score:1, Insightful)
Re:MOD PARENT UP (Score:1, Funny)
Re:Ordinary users? (Score:3, Insightful)
I don't think the ordinary users (at least the ones you talk about) are readers of Slashdot or OSNews. This is not marketing material you are reading. It would be silly to judge it as such.
Re:Ordinary users? (Score:2)
However, as long as Linux is in a state where developers think that "ordinary Linux users" have to even care what a scheduler is, Linux will be a failure for mainstream desktop usage.
Are you suggesting the key to Linux's acceptance on the desktop is what CmdrTaco thinks is newsworthy on a geek website?
That's something of a misnomer, because Malda does not develop linux kernel code. And the developers were not banging his door down insisting that Malda report a story on Bossa. Developers don't give a
Re:Ordinary users? (Score:2)
(Okay, neither have I, but that's only because I'm married.)
Re:Ordinary users? (Score:3, Funny)
you: Honey, do you want to come home and see my new scheduler?
wife: Can you show it to me while I eat the leftover pizza, I'm hungry!
you: Sure, but please pay attention this time, it's really really cool and neat!
wife: That's what you said about your new Perl program, but it just looked like you banged on the keyboard for a couple of hours and held down the shift key.
Re:Ordinary users? (Score:2)
wife: Honey, do you remember you promised to get your new scheduler done this weekend?
you: Okay, but I was planning on mowing the lawn.
wife: You used that excuse last week. Now won't you please finish the scheduler? *Starts rubbing geek's shoulders.* You know how smooth-running software makes me feel...
Or:
you: How'r you doing, Honey?
wife: I'm almost done with my new Linux scheduler. It's really hot.
you: *drools*
Re:Ordinary users? (Score:2)
Its refreshing to see that people who get it can be modded up.
Linux is clever, Linux is powerful. Linux is not user friendly on a desktop. Users should not need to know the locations and contents of config files, and be familiar with dozens of command line commands just to do something simple.
Re:Ordinary users? (Score:2)
This is a geek site. We talk about geek stuff here, like OS schedulers. If you want to hear "new linux makes computer faster!", go read some RedHat marketing materials.
Just because your idea of the "average linux user" doesn't care about OS schedulers doesn't mean we're not allowed to talk about them.
Re:Ordinary users? (Score:2)
No, you meant it as a troll. And a good work too, +5 insightfull and plenty of replies.
Risin' up, straight to the top
Had the guts, got the glory...
Why is it that so many people have a problem understanding the difference between the expres
nanokernel: scheduler (Score:5, Interesting)
We're talking open-ended scalability. Security. Performance. Reliability. The OS is no longer just a privileged app, but a smaller, more focused critter, serving apps rather than being served by them. With this new scheduler framework, let a billion nanokernels bloom.
Re:nanokernel: scheduler (Score:2, Interesting)
Re:nanokernel: scheduler (Score:5, Informative)
The kernel is much smaller. The old kernel's functions are distributed in more, optional, dynamically (runtime) includable objects, so they might even be spread among a larger total object population. But that isn't necessary to specific operations, and that can be tuned at runtime, by some of the processes themselves. Just another step down the road away from the monolithic, single-task computer, for increased parallelism and manageability.
Re:nanokernel: scheduler (Score:1)
I'm a neophyte at kernel design, so be patient. :-)
How will this effect really high-end performance applications? Specifically, I'm thinking of music applications. The holy grail of desktop music production is a one-box solution. We want a single computing device with enough horsepower to do:
realisitic audio processing (Score:2)
True parallelism means the that clock rates don't have to be jacked up to millions of times the rate of the events being processed (eg. 100s of GHz for 10s of KHz audio), just to ensure that thousands of thou
HEY TACO "hold its beating heart in your hand" (Score:1)
(It would also be nice to be able to search comments by mod-type.)
I wish I could use it here:
"You haven't made the kernel smaller, you've just pulled a part of it out because you think it'd be cool to hold its beating heart in your hand while it still runs."
Re:nanokernel: scheduler (Score:5, Informative)
Re:nanokernel: scheduler (Score:2, Informative)
Re:nanokernel: scheduler (Score:1)
Re:nanokernel: scheduler (Score:1)
This is not about an exokernel. As the parent says:
The defining characteristic of an exokernel is that it provides no abstraction at all.
From http://www.pdos.lcs.mit.edu/exo.html:
An exokernel eliminates the notion that an operating system should provide abstractions on which applications are built.
Re:nanokernel: scheduler (Score:4, Informative)
No, a kernel doesn't even need to have a scheduler in it. It needs to be able to take instructions to transfer control to another cpu context, and be able to create the necessary page tables, and that's about it.
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:2)
Perhaps I'm not understanding the issues you're raising.
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:3, Funny)
Re:nanokernel: scheduler (Score:4, Interesting)
Re:nanokernel: scheduler (Score:2)
A really distributable system would include only the scheduler in the kernel, with an "outer" layer of secure (crypto signed, sealed and delivered) APIs for submitting process and data requests, and an "inner" core for hardware access, including CPU, data (storage/network such as ethernet, USB, IDE, RAM, BIOS ROM, etc) and presentation (monitors, keyboards, mice, soundcards, printers, etc). Such a nanokernel would be tiny, highly efficient, and mix/matchable with many other apps and OS'es. Privileges woul
Re:nanokernel: scheduler (Score:2)
Re:nanokernel: scheduler (Score:1)
I was under the impression that monolithic kernels, like micro-kernels, do the same job, which is simply to interface with hardware via assorted interfaces and their corresponding drivers (CPU, power management, peripheral buses, block device interfaces, networking, sound, video, etc.). The difference being that monolithic kernels can either have certain (non-critical) interfaces and drivers compiled into the kernel itself or externally as a module, whereas ie, Hurd has fixed modular interfaces to everythin
Re:nanokernel: scheduler (Score:1)
Man, where do you work? We need to scrounge focaccia sandwiches and chicken piccata from the marketing and HR leftovers!
Re:Linux has proven you wrong (Score:2)
Re:Linux has proven you wrong (Score:2)
OK so explain Windows NT.
Cheers
Stor
Scheduler Development? (Score:4, Funny)
Re:Scheduler Development? (Score:2)
I hope I'm not alone when I ask... (Score:1, Interesting)
Re:I hope I'm not alone when I ask... (Score:4, Funny)
Re:I hope I'm not alone when I ask... (Score:2)
American English is still left in the 17th centuary...which is why they missed out on the time when it became fashionable to spell everything as if it were french, even it it's not French - like favour, colour, etc...
But that's also why American pronounciations probably refelect the original origins of words more than British, Australian & New Zealand pronounciations...
Re:I hope I'm not alone when I ask... (Score:4, Informative)
Re:I hope I'm not alone when I ask... (Score:3, Informative)
Re:I hope I'm not alone when I ask... (Score:2, Funny)
The scheduler is the person on your project team who, after each week's schedule slips, tapes together the latest updated Gantt chart printouts into long banners and hangs them the walls.
Re:I hope I'm not alone when I ask... (Score:5, Informative)
The problem is this: You want to run tasks A, B, and C, and need to do it in the most optimal way possible.
The simplest way is FIFO, like say, DOS. If A starts first, then A runs until completion, then B starts. This is bad for many reasons, like that if A gets stuck for any reason nothing gets done, and that while A is waiting for input the free resources can't be used for anything else.
A simple way of multitasking would be simply alternating between A, B and C every fixed interval. But that's not very good either, perhaps B doesn't need to do any processing now, and only wastes time, while C could really use that.
A better way is to do it by priorities, but then you need to find a good way of calculating this priority.
One of the reasons there's so much talk about them is that most become slower when you have more tasks. Most of the simple ones need to examine every running task to determine what should run now, and if you want to launch 10000 processes at once, that's not good. O(1) schedulers are a solution for that, because they use algorithms that always take the same amount of time to execute, irregardless of whether there's 3 or 10000 tasks. That doesn't mean a simpler scheduler wouldn't work faster for 10 tasks, though.
The other problem is how to determine how to distribute CPU time. Say, for servers you mostly want fast and fair3o determine which processes are interactive, and which are on the background and won't mind some interruption.
Re:I hope I'm not alone when I ask... (Score:1)
Re:I hope I'm not alone when I ask... (Score:1)
eeek (OT) (Score:1)
My condolences to all who do work on this part of the OS.
Re:eeek (OT) (Score:1)
If one's job is to develop scheduling algorithms, then one shouldn't have to hack kernel code.
Exactly to bring back people like you
Re:eeek (OT) (Score:2, Interesting)
Just remember that it's those semaphores, mutexes, and locks that allow multi-threaded applications work. A class that is supposed to be "thread safe" but isn't will make your life rather... interesting.
Re:eeek (OT) (Score:1)
Reverting back (Score:2)
I hope ... (Score:3, Funny)
Re:I hope ... (Score:2)
--
Evan
Re:I hope ... (Score:2)
But that would have to be a rewrite from scratch.
Interrupts (Score:3, Interesting)
Even buffering the full song, it still skips. I've tried XMMS, moosic, mpg321. I've sought ever high priority trick i can. No matter what I try, start that file copy and WHAMO, instant pain and suffering.
Myren
Re:Interrupts (Score:3, Informative)
Re:Interrupts (Score:3, Informative)
Speeding up Linux Using hdparm [linuxdevcenter.com]
Re:Interrupts (Score:2)
If you had, you will see that in most Linux installations, the hdparm parameters are set to represent the lowest common denominator of PC installations. In other words, most distributions ship with the hard drive settings so that you can install it on a circa 1992 hardware, and it will work out of the box. You have to tweak it from there.
Generally, on a new install of Linux, your buffered disk reads will be around ~4 MB/sec - even if you have the latest motherb
Re:Interrupts (Score:2)
But for simple stuff (ie, MP3 playing on XMMS while copying a bunch of files in a terminal, perhaps), not having the parameters properly set (ie, leaving them at default) may be causing the problem (for the original poster) *now* - if he isn't aware of hdparm.
A lot of people still don't know about
Re:Interrupts (Score:3)
Imagine that hdparm HASN'T been set properly, your drive reads don't appear to be slow or hog the CPU, and you're happy. But when things get 'hairy' and your'e doing a full-blast copy and trying to play an MP3 (which only needs about 1MB/minute) things are getting all choked-up. I'll bet this wouldn't happen if...
hdparm -A1 -a64 -c1 -d1 -m16 -u1 -W1
(that reads:
enable hardware lookahead, enable 64-sector software p
while(1) loops (Score:3, Funny)
while(1);
(/me too is a newbie)
Re:while(1) loops (Score:2)
Doesn't the scheduler in Linux 2.6 already prefer IO bound applications over CPU bound ones ?
infinite loops (Score:1)
The part about infinite loops would be interesting as you can always shoot yourself in the foot in a zillion ways
For eg: a stupid like me might write something like
do blahblahblah while f(pid1) is less than f(pid2)
where f(x) isn't effected by blahblahblah() and f(x) is less than f(y) when x is less than y
Re:infinite loops (Score:1)
The Bossa DSL is more constrained than C or C++ in that, for example, pointers (known for being the cause of many bugs) are absent and infinite loops can't be defined.
The omega incomplete domain-specific language (DSL) is not a feature, its a bug. Turing machines have more smarts. The last thing I would want when writing a scheduler is some broken language that interferes with what I can do. If you can't be trusted with pointers and loops, you don't have any business writing a scheduler. Yes, you
Re:infinite loops (Score:2)
Like 15 years ago IBM had a language called FAPL which was cool at expressing FSMs -- totally useful for describing commmunications protocols or, in this case, scheduling protocols.
But FAPL would probably make you sh*t bricks after your palpitations over DSL.
PS -- I'll bet you're not really precluded by DSL from scheduling a task every 100 bogo
Re: locks &semaphores, "nothing I hated more" (Score:3, Insightful)
http://slashdot.org/comments.pl?sid=1138
Actually, it's quite interesting. It forces you to conceptualize with a certain kind of rigor, and to code with particular vigilance for potential deadlocks, race-conditions, and mis-serialization of resource-updates.
I can't tell you the number of times that I've read or listened to a description of a design or architecture, and immediately said "uh-oh", to the surprise and dismay of developers who really should know better.
In a time of increasing processor parallelism, this is a skill-set which must be mastered by anyone who truly aspires to become (or remain) a serious professional-level developer. It's not just for kernel-hackers.
Re: locks &semaphores, "nothing I hated more" (Score:1)
Re: locks &semaphores, "nothing I hated more" (Score:2)
In my exper
Re: locks &semaphores, "nothing I hated more" (Score:1)
schedulers as modules (Score:5, Interesting)
a performance impact in the scheduler? (as opposed to have the scheduler compiled
inside the kernel).
I AFAIK, the scheduler has to be as compact (optimized) as possicible to reside as long as possible
in the cpu's cache. This way it can check the memory pages map as fast as possible to [de]allocate,
switch process as fast as possible.
Using a module scheduler, wouldn't make it have to derreference each function address each time
each function is called?
And probably sometimes derreferencing derreferences few times to get the correct address?
Couldn't this hurt performance?
I agree that loading an efficient scheduler to handle a situation better than the defalt scheduller would
compensate for that, but still...
Re:schedulers as modules (Score:1)
Java has a different approach to scheduling (Score:1)
With Real Time Java [rtj.org] a programmer can request explicit timing guarantees, by direct interaction with the scheduler. Just derive your threads from javax.realtime.RealtimeThread (if it is implemented in your version of Java :)
Jar Jar Binks, the scheduler framework (Score:1)
Elove the scheduler naturally (Score:1)
Re:Elove the scheduler naturally (Score:2)
When this is new (Score:2)
Confused (Score:1)
The recent activity in Linux kernel development caused by the introduction of a new scheduler by Ingo Molnar has emphasized for ordinary Linux users the importance of schedulers in modern operating systems. This article gives you a glimpse of what scheduling development is like by letting you implement your own Linux scheduler thanks to Bossa, a framework for scheduler development.
I'm a bit confused... Is this about scheduling??
Impact of scheduling on threads (Score:3, Interesting)
Xavier Leroy is one of the authors of Ocaml, an efficient (within 2x of C) variant of the ML functional programming language. In the Caml-list mailing list recently, he had this to say about scheduling:
So at least one class of user is forced to be aware of the scheduler, to refer to another poster's assertion that users shouldn't even need to know...
Re:Impact of scheduling on threads (Score:2)
For some info on sched_yield:
Sched_yield is intended to allow a non-preemtive system to give other processes a go. You call it when you are using the cpu in a long running calculation. You *ought* to use it in every such case. A smart pre-emptive scheduler will ignore it, and a dumb non-pre-emptive one will round robin to another process.
While it shoul
Re:Impact of scheduling on threads (Score:2)
Actually, it's not self contradictory since I didn't claim that Linux does not now withdraw a CPU quantum... It was just wrong. However, the process will only lose its CPU slot if there is something else that needs the CPU, so the current Linux scheduler is not wholly crap, just a bit crap.
one question (Score:1)
Re:who cares (Score:1)
I hope you are trying to be funny
haven't read the article but am damn sure this isn't like the 'Schedule tasks' or the simple 'Prioritise Background services over Applications' option that you find in windows
Re:who cares (Score:2)
Re:who cares (Score:2)
Ummm, you *do* realize that we're not talking about scheduling like the Windows Task Scheduler right?
Re:who cares (Score:4, Insightful)
And Linux has been more responsive in the server-room. A server doesn't even need a desktop.
(What directX equivalent is there on Linux?)A desktop user like you might not care if your scheduler degrades after you have 800 processes running, but I can assure you people dealing with large server systems does.
Windows is in large part more responsive on the desktop since it is in part intergrated into the kernel - the downside being that what would be a application crash can bring down the whole OS. Also you have less privilege separation. (windows desktop is "unsafe" area, but that is another story).
OpenGL, SDL, OpenAL for starters. Guess what they all can do that DirectX can't?! Yepp, run on different systems and architectures, be it Linux, Windows or a Mac.
If Linux developers don't stop diddling around with something that was solved years ago, Linux will just go away.Linux developer base is quite large and the developers like to "diddle" around to find the best/most effective solution, not the one that takes the least amount of time to make, like it often tends to be when deadlines are pushed in companies.
Linux doesn't even have a program that can do half of what programs like dreamweaver can do.I admit that there is nothing quite like dreamweaver for Linux, but I'm convinced that Quanta can do more than half. :P Anyway, as Linux gets more acceptance, programs like Dreamweaver will eventually be ported.. what will you say then?
For the developer, what app is as integrated as Visual Studio? KDevelop? Pshaw.Are there any development tools that is more restricted to one platform and project management than VS?
I'm not flaming you---but the article. Users don't give a shit about schedulers if there's no applications with them.KDevelop and Anjuta might not be as integrated, but they can use CVS, SubVersion etc. and compile on Linux even for Windows (or the other way around). Oh, and they are free.
No, not at all :P
You know, there are alot of people that acctually are interested in kernel-schedulers, allthough they do not tend to be your average desktop user.
More over, one place where schedulers matter most, ie. in servers, there is absolutely no shortage of applications on Linux.. I'd more like to say there is a shortage of applications in this are for Windows, if anything.
Re:Pfffft! (Score:2)
Wake me up before you go, go......