Posted
by
Zonk
on Friday October 27, 2006 @02:12PM
from the hey-somebody-thought-of-the-children dept.

Don Marti writes "A loose network of developers representing many commonly used open source projects are working to develop a new generation of low-memory, efficient code. This targeted code is being designed for a system, of which only 500 prototype boards now exist:
the 'Children's Machine 1' from the One Laptop Per Child project." From the article: "Gettys says measuring existing performance has to come before trying those changes. 'We've been pulling in every decent performance tool Linux has so we can optimize when and where it really matters,' he says. A key automated testing tool is Tinderbox, a build and test management tool originally developed for Mozilla, that new OLPC developer Chris Ball has installed, to build and test OLPC software. And, after Red Hat kernel developer Dave Jones gave a standing-room-only talk at the 2006 Linux Symposium titled, Why Userspace Sucks (Or, 101 Really Dumb Things Your App Shouldn't Do), his reports of suckiness, which include kernel-based measurements of wasteful behavior, are helpful, Blizzard says."

I can already see people deleting their wikipedia content on their OLPC to make space for their 1st world outsourced coding/testing projects. Still, if people get to that point maybe it is not so bad and wikipedia has done its job to a point. So long as someone in the area still has all the information available for reference and copying?

It's nice to see the suggestions to actually use available tools to see what your code is actually doing and where it might be going wrong. There are many available, and some are remarkably good. Splint [splint.org], for instance, has a talent for turning up unlooked for errors, and if you're willing to add a few annotations here and there it can do even better. I'm constantly surprised such tools don't see much wider use.

OK, now I've even searched the referenced (but not linked) article [linuxsymposium.org], which someone helpfully linked to above, and I've STILL been unable to locate this Blizzard. Does that quote have ANYTHING to do with the story? If I were to throw-up in the Story Submission box, would a Slashdot editor clean it up, or submit the story as-is?

Programmers don't waste memory gratuitously; they do it because resource usage is only one concern of many that compete for their attention. They do their best to allocate effort where it is needed and will benefit people, and it sounds like they are responding enthusiastically to the demand for thrifty resource usage raised by the OLPC project. This is not just a stupid excuse that developers make. (Or if it is, they have good company in Blaise Pascal: "I have only made this letter rather long because

I do hope that the one laptop per child project will succeed in setting benchmarks for what a laptop should be and also how the applications which run on that laptop should behave (efficiently using memory being one of them).

Agreed. It's obscene to write a simple "Hello, world" and look at the memory usage. I used to fret about a few dozen bytes... now I allocate megs and don't even thing about it. Such is progress. Some people (such as Steve Gibson at GRC.com) are still coding Windows apps in assembly. I know people here aren't too impressed with Gibson (for all his showboating) but I've gotta say it's damned impressive seeing a real honest full-featured Windows app that's smaller than the Slashdot.gif picture in the upper left corner of this page. That's just cool.

Also, look at the Demo world. There are some absolutely stunning apps being written that use procedural rendering to accomplish stunning skeletal character animation with inverse kinematics, with soundtracks and advanced effects, in just a few hundred K bytes. Amazing stuff.

So coding for efficiency is happening, but it's rare -- a case of someone showing off. Or is it?

This brings up an interesting point: due to changes in architecture and hardware, coding for efficiency (usually performance) is already resulting in smaller code size. Let me explain.

In the early days of microcomputers (C64, Apple ][, TRS80), where system resources were extremely limited and cpu power was slight (e.g. 6502/8088, 8bit, 1mhz, 32k RAM, 40k floppies, no HDD or only tape for storage) and programmers had no choice but to code for efficient 1) performance within the boundaries of storage limitations.

Then around the days of the M68000 Macintosh and the 386, with its extended memory addressing, coding for performance meant pre-computing tables and looking up values as needed. Memory was cheaper than CPU.

This trend reversed in the early 90s when storage became cheap and bus speed increased, but couldn't keep pace with CPU speed advances. Suddenly, it was "cheaper" to compute values at the time they were needed b/c bus speeds imposed a huge penalty on looking up values. Breaking the on-chip ram cache could make-or-break a tight graphics rendering loop, so that was priority. (remember, at this point, software rendering was still common).

Introduce the extremely high-power GPU video cards we have today and the situation changes again. Offloading huge computational loads onto a deidcated graphics engine, the system CPU is somewhat of a traffic cop, ensuring subsystems have a steady flow of sound, textures, geometry, and network packets, oh... and occasionally performing game logic.

So it appears we've come full circle.

The bad news is now you guys have to listen to dinosaurs like me who cut their teeth coding in 6502 assembly ramble on about "well, sonny, back in MY day..."

"In the early days of microcomputers (C64, Apple ][, TRS80), where system resources were extremely limited and cpu power was slight (e.g. 6502/8088, 8bit, 1mhz, 32k RAM, 40k floppies,"The 8088 was the cpu of the PC.The 8-bit cpus where the 6502 family (Apple II, III, Commodore Pet, Vic, C64, C128...) Z80 (TRS-80, Adam, Timex/Sinclairs) 6809 CoCo family.And my goodness people 128 megs of ram and 500 megs of storage IS A LOT of space.I know we have gotten spoiled but that is potently a lot of resources. Take

I'm reminded of theprodukkt [theprodukkt.com], a coding group that released a first-person shooter that takes up about 96 kilobytes. If this is possible, it's amazing that comparable games tend to take up gigabytes.

Towards the end of the article they imply the final keyboard will not have the caps lock key. WHICH MAY SOUND LIKE A GOOD THING. But then remember these laptops are for kids, and who knows if in the future they will be faced with KEYBOARDS THAT HAVE CAPS LOCK. And that may be confusing for a couple of hours until they get used to it and learn to live with it. LIKE WE HAVE.

I know that this theme has been beaten to death but I want to keep it fresh in people's minds, perhaps if we ask enough we'll finally get these. I want to be able to buy myself one or more! They could sell them for $200 and put the profits into the program. Save the children, buy a OLPC! It would also be nice if independent schools here in the US that are willing to employ some alternative education resources (like open source textbooks) could buy them.

Yes, but [I think] that answer is stupid. I will quote it here for critique: "The idea is that a commercial subsidiary could manufacture and sell a variation of the OLPC in the developed world. These units would be marked up so that there would be a significant profit which can be plowed into providing more units in countries who cannot afford the full cost of one million machines."

Basically, if they design these devices and mark them up excessively in order to make money, then they will sell few of the

The difference between what you are asking for and what they want to offer is about $100. Considering that the retail version can cut out things like the generator, it could cost less to produce. Selling that at 3x the cost would still be very cheap by Western standards.

No no no, you can't cut out the generator. That's a key feature of this unit. Because it has USB you can use external peripherals like a GPS. I would absolutely adore having one of these with Linux, a good set of maps, and a GPS Mouse or a bluetooth GPS (I actually have one [hyperlogos.org]) [ObDisclaimer: amazon referrer link, no other ads] to go with. The bluetooth GPS is an acceptable situation but actually not the best option in this case because it has to charge via USB, and since there's no bluetooth (at least, IIRC)

AFAIK, the userspace app framework for OLPC is Sugar, which is Python based.On what is basically an embedded computing platform with 128MB RAM, ~500MB permanent storage, and a CPU that doesn't have a L2 cache (last I checked), how much of these performance tuning would actually matter if all of these userspace apps depends on a language with an interpreter that you couldn't even fit 1/10 into the 16K of L1 instruction cache?

Don't get me wrong, me and my fellow students at the university are working on performance tuning, but as I look in to the Geode chip more and more, I believe that Sugar is poison for OLPC.

Well, yes, OLPC inspires Open Content as well. We are already working on a dictionary for Children on WiktionaryZ [wiktionaryz.org], the OLPC Children's Dictionary [wiktionaryz.org]. What you can do for us? You can contribute to the translations of the defined meanings - just ten words + definition to translate in any of the many languages of the worls. No... it's not a joke... we need your help and if you cannot help us, please tell other people. Thank you!!!

It is very simple: there will be swearwords in WiktionaryZ as well, but they will not be part of the OPLC Children's Dictionary since we will have that one as a collection and as such the dump used for OLPC will include only the contents we want in there.

Why do they emphazise so much, that this laptop is for kids? The machine will be able to read books, communicate, and record writing, and these features are also useful for grown-ups. Also, it will be targetted towards education, but there is no need to wait a generation to have more knowledgeable people? I mean, if a adult farmer can learn about solar power now, then that leads to more solar power in general.

There are some reasons to have mostly kids use the laptops; 1) limited supply/access, if a town on

If your project is "for the children", then any time you do anything anyone dislikes, you can deflect the criticism by claiming they hate the poor little children.Person with common sense: "Why are you pushing a dependance on undocumented, unmaintainable hardware from user-hostile corporations on these people when you claim to be open?"One Laptop Per Customer: "Why do you hate the children?"Person with common sense: "Why are you trying to sell starving people laptops? Maybe selling them wells so they have

A selections or responses
Well when you have no experience with wells how do you help.
What happens when everyone focus on wells and everyone has a well.
This is not for people who need water but have water,food and shelter but not much more.(This provides education)

Forth is relatively quick (slower than C but probably faster than Java), but insanely compact. I would bet most forth code compiles to less than 10% the size of similar projects in C.

I'm not exactly sure where you get that impression from - certainly Forth can be pleasantly efficient when it comes to memory use, but I would suggest "roughly on par with C" is about the best you can claim. Now, while the Debian Computer Language Shootout benchmarks are hardly ideal, particularly since they are all very small

It seems to fall nearly into the category of an appliance. It will come with all the software which the thing is intended for, presumably.

Hmmm... These guys in Boston have thought of everything kids of all ages, in all these countries and cultures, in all academic subjects, will need, then implemented it effectively and fit it all on the OLPC?

"[I]s this a platform without applications?.... And yes, I know about all the Linux apps, but look at its market share."

Ummm... Not sure how to break it to you, but I'm sure that at least some of the thousands of applications written for Linux might still be able to run on OLPC, which runs on, uh... let me check.... Ah, yes: Linux!

P.S. What the ever-loving heck does market share have to do with the number of apps that run on Linux?

Especially since market share of a good is the proportion of gross currency taken in sales of that good in a given period. Not surprisingly Linux market share, and Linux application market share are both quite low, what with the sales times cost factor.

***They poll I/O ports?! Have these people never heard of hardware interrupts? I knew that a lot of lore had been lost in the PC revolution, but I had no idea the situation was this bad.***

I don't think that the PS/2 Auxiliary Device Port is designed to generate an interrupt when something is hot plugged into it..

BTW -- notwithstanding what your computer science teachers taught you, polling is quite efficient if loads are predictable. Polling is usually much less resource intensive than interrupts... if the polls have a high hit rate. And it's much less subject to wierd, difficult to reproduce problems and to race conditions. Across the broad spectrum of computing, there are probably far more cases where interrupts are used when polling would work better than vice versa.

That said, 20 polls per second seems excessive for a detecting a new device on a port that is rarely used except for mice. Once every 5 seconds would seem more appropriate.

I'll have to take it on faith that some idiot designed an I/O port without an interrupt. As to the rest:

What amazing nonsense!

I was designing I/O devices and writing real-time I/O code before there were computer science teachers or courses. Assuming competent code, polling is always more resource-intensive than interrupts (all of the polling code is a net add—there is no interrupt code that it replaces). If race conditions exist in the environment, neither polling nor interrupts will fix them. Po

They didn't design the PS/2 port without an Interrupt. It's (usually) on IRQ12 on ISA buses. But I think that they did design it without a hot plug notification -- because it never crossed their mind that anyone would try. PS/2 ports are almost always used for mice. I don't think I've ever seen or heard of one used for anything else, although I'm sure it must happen. Windows 9 at least doesn't even support hot-plugging a PS/2 mouse (It does support hot plugging serial mice). Linux apparently does, but

What vtcodger describes is a situation where the whole machine is, at least temporarily, dedicated to processing a single I/O set. This isn't relevant to the topic. In any case, the usual logic in this case is that the polling loop is initiated as a response to the first I/O interrupt and the interrupt is masked until the loop is exhausted—a mixed strategy. I recall having to do that to read satellite telemetry, and to read paper tape from a reader that, at full speed, couldn't stop between characters

That's an oversimplification: if memory serves, when the frequency of Ethernet packets interrupts becomes high, the kernel switch from an interrupt driven mode to a polling mode: this increase performance.

If you speed up a computer's boot time by one second. And every PC in the world (aprox a billion) starts up every day. You would save ~12000 human years every year. Every year you would save ~150 lifes!

Every millisecond speed increase a day of software everybody uses every day would save 12 lives!

You would save ~12000 human years every year. Every year you would save ~150 lifes!

Only if every one of these people are sitting in-front of their computers, doing NOTHING at all while it boots up...

No looking over at the TV. No listening to music, news, etc. No thought processes of any kind... Otherwise, that time isn't really wasted, just deferred to things you would spend that much more time doing later.

Personally, I hit the power button, and walk away, both for boot-up and shutdown, and I suspect MAN

There are quite a few open source apps that are full of code that no one ever runs at all but it rarely gets yanked out because no one is certain that the code isn't used.I would like to see a library that can be linked in like the profiler libraries that will record what functions get called in such a way that the data can be shared with others in a massively distributed profiling system so the data can get back to the developers so they can look at the data say "we have 3 million people using this code and not one of them ever used this feature...time to purge it"

HAve you checked how big standard programs are dynamically linked compared to linking them staticly? More and more programs are now larger using dynamic libs than if they were staticly linked due to the overheard of linking in 20 libraries and their entire tables of unused functions compared to just linking in a few hundred bytes of code. As an example Solaris 10 init now links in 800 times more code than solaris 7's init. That means if there is any problem in any of those libraries there is a risk to th

I'm sure I'm in the minority here on slashdot, but I'd rather have the engineers/coders developing the software that I use to spend their time making the software correct (solving the correct problem, getting the correct answer, reliably handling failure cases, good error messages, solid documentation) than "efficient" (i.e. 5-10% speed gain for gentoo ricers or whatever). Sure software's no good if it won't run on your machine, but it's also no good if it gives you the wrong answers or breaks at a critica

Not quite a laptop, but indeed a low-power, Geode-based, small, Web-oriented product, the Linutop [linutop.com] seems like a nice platform. Heck, they even mention that it's based on Free Software and that they invite Free Software developers to invent new usages for the platform. I'll take one of those over Negroponte's crankshaft toy any day!

Get a used $169 Fujistu Stylistic 3400 (P3 400, 192 MB RAM, 6 GB HDD) or a $299 3500 (P3 500, 256 Mb RAM, 15 GB HDD) tablet computer. Either way, it comes with Windows 2000, or you can install Linux. The 6 GB HDD is plenty big enough for a copy of the Knoppix image, plus some storage space.If you must have a full install of every windows, mac, and linux app known to man, then Travelstar hard disks will work as upgrades to at least 40 gigs.