Live data from Hacker News

My real-time operating system

ericw.ca

21–27 of 27 posts

Re: My real-time operating system

#21
post #17

Earlier quoted context omitted.

Thanks for the analysis. The webcam idea may make it viral. Perhaps you can even implement controlling the trains via the net, so that you get a kind of train simulation. Though you would have to be in touch with customers to see if this is an idea that sells.

We're thinking along the same lines. Would I want to surf home from work and play with my train set? Both as a switchboard operator and as a virtual engineer/passenger? Would I want my friends to share in this experience with me? Running other trains, or coming along for the ride? Making movies of the experiences? Heck yes. I'd even want a link into FaceBook where people could tell what's going on in my model world i…

My kid might even put an obstacle on the real model railroad and you'd have to brake the train via the web to avoid a crash.

Re: My real-time operating system

#22

Earlier quoted context omitted.

Demonstrating that the OS was real-ish time consisted of showing that (1) it never dynamically allocates memory, (2) it uses constant-time algorithms. More practically I did a bunch of timing to show that, under real loads, it generated responses under certain (arbitrary) thresholds. In conclusion: a process lacking even the smoke and mirrors of rigor.

Sorry, I didn't mean to imply your measuring process was fluff. When I did 452 we had to do something on-screen, to demonstrate responsiveness. I did the "water demo effect" (similar to http://www.derschmale.com/demo/pixelbender-water/PixelBender... ). It had to animate without hitching under load, which I guess correlates with your response timing tests (the arbitrary threshold being 60 or 30 Hz in this case). Anyho…

Ah, I guess the course requirements have changed in the intervening years. We got somewhat less time to work on the OS "thanks" to renovations in the lab; none of us had time to get a full, graphical VGA display running.

That said, I think your display better demonstrates real-time-ness than my somewhat-less-than-rigorous measurements. By the time you account for all the assumptions I made to get semi-complete numbers, a working demonstration of a real-time process is far more convincing!

Re: My real-time operating system

#23

I wrote a toy operating system for school that I recently(ish) released to the world. It comes with source code and design documents so I thought it might be interesting for people to poke around in.

CS452 for the :P I hear rumours they are moving away from x86 for that course, have you heard anything about it?

Re: My real-time operating system

#24
post #12

Earlier quoted context omitted.

Also, for the record, there is this: http://creativecommons.org/licenses/publicdomain/ It's not really a license, it just lets you certify that you are putting your work in the public domain.

Ah, thanks for clarifying things. Now I have the code licensed under an MIT license. Out of curiosity, what are the implications of changing the license on software you've already released?

As far as I know, there is no problem at all issuing code under a new license provided that everything in the code is yours. The only tricky issue I can think of is that you can't really revoke an earlier license, so if you are moving to a less permissive license you can't stop people from redistributing under the previous license. So if you decided to relicense from something like BSD to GPL, you couldn't stop people from releasing the earlier version under the BSD, but there is nothing keeping you from only hosting and working on the GPL branch.

Re: My real-time operating system

#25
post #11

Earlier quoted context omitted.

Aha, well I'm an only child! Either way, I added some text saying everything is licensed under a Creative Commons Attribution 2.5 Canada License; thanks for the advice. I'll plead ignorance with your second sentence. AVRs? And why should it depress you that it took me three months? (Keeping in mind that I was taking other classes at the time, and that there was a ton of competition for lab space.)

Great! That's awesome! (Although it's true that CC-BY isn't really intended for software, it's open-source and IIRC GPL-compatible, so it's plenty good enough for me. The 4-clause BSD license recommended by the other poster is not GPL-compatible.) AVRs are these fun little cheap microcontrollers; the Arduinos and Chalkroaches, among other things, use them. Writing enough code to drive a couple of on-board UARTs and s…

be a thing to do in an evening or a week, not three months. As someone who wrote an AVR RTOS kernel for a class in Realtime systems I agree, but you're comparing apples to oranges. I can write, and have written, a real-time control system (RTCS) for a set of peripherals in an evening or a few days, but that's not the same thing as an RTOS. The RTCS is a specific case, the RTOS is the general one and as a result it's much more complex because it has a more open-ended specification. My RTOS took me about 4 weeks or so before it was usable.

Re: My real-time operating system

#26
post #11

Earlier quoted context omitted.

Great! That's awesome! (Although it's true that CC-BY isn't really intended for software, it's open-source and IIRC GPL-compatible, so it's plenty good enough for me. The 4-clause BSD license recommended by the other poster is not GPL-compatible.) AVRs are these fun little cheap microcontrollers; the Arduinos and Chalkroaches, among other things, use them. Writing enough code to drive a couple of on-board UARTs and s…

You're right, targeting the x86 architecture added a lot of complexity without any tangible benefit. Poring over the subpar Intel documentation consumed an inordinate amount of time. That said, it only took a little over a month to build the OS itself, while the other two months I spent working on the train control program. All the equipment is notoriously flaky so coping with real-world brokenness was probably the b…

Oh, well, a month part-time doesn't sound so bad. And I already have a lot of the subpar Intel documentation in my head.

Re: My real-time operating system

#27
post #23

I wrote a toy operating system for school that I recently(ish) released to the world. It comes with source code and design documents so I thought it might be interesting for people to poke around in.

CS452 for the :P I hear rumours they are moving away from x86 for that course, have you heard anything about it?

Yes, Cowan wants to buy ARM processors. I believe he is planning on soliciting funding from the Mathematics Endowment Fund this term. (disclosure: I'm the MEF Director)
Post reply on HN