18 ms·
My real-time operating system
- eworoshow 18y agoI 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.
- kragen 18y agoLooks like fun! What kind of drivers does it have? And what license?
- eworoshow 18y agoIt was fun! Well, fun modulo writing and debugging all the code in three months. As for drivers, the OS really only interfaces with 8250 UARTs; both the VT100 terminal and the Marklin digital interface for the trains were connected via RS-232 serial ports. There is also, embedded in the kernel, a micro VGA driver for displaying debug messages. I don't exactly have a specific open source license in mind. Right now I suppose you could say it's public domain. I'd be happy for it to stay that way, unless somebody would like to convince me otherwise?
- kragen 18y agoIf you want it to be public domain, you could use the Creative Commons Public Domain Deed to clarify that. Right now, if I were to download your code, decide not to use it, write something similar, make a successful commercial open-source product from it, and then you got hit by a bus and your sister inherited your copyright, she could sue me on the theory that you didn't really know what it meant when you said, "I suppose you could say it's public domain." It's a little depressing to hear you say it took you three months working really hard, because it means it would probably take me about the same time. (I have no reason to think I'm any smarter than you are.) Maybe I should stick to AVRs for real-time stuff...
- eworoshow 18y agoAha, 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.)
- blasdel 18y agoCreative Commons Attribution is not the Public Domain, and it's not a good idea to use the CC licenses for source code. If what you want is for the code to always have your name on it, you should use a 4-clause BSD license (the original one with the advertising clause).
- Jebdm 18y agoAlso, for the record, there is this: http://creativecommons.org/licenses/publicdomain/ 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.
- eworoshow 18y agoAh, 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?
- ricree 18y agoAs 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.
- holdenk 18y agoCS452 for the :P I hear rumours they are moving away from x86 for that course, have you heard anything about it?
- eworoshow 18y agoYes, 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)
- s3graham 18y agoAh, that video brings back nice memories of bleary-eyed nights in the Real-Time lab. :) ... That and rage at the crappy, broken, unreliable sensors we had at the time. Damn hardware always messing with pretty software abstractions. What was your gratuitous fluff process to "prove" that the OS was mostly real-time-ish?
- eworoshow 18y agoDemonstrating 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.
- s3graham 18y agoSorry, 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.html 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). Anyhoo, I meant "process" in terms of OS-level process, and "fluff", because mine was just lame graphical fluff. :) btw, planning any more co-op terms before you graduate? Drop me a line.
- eworoshow 18y agoAh, 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!
- tlrobinson 18y agoWow, model trains have gotten fancy! (http://www.marklin.com/CentralStation08.pdf http://www.marklin.com/CentralStation08.pdf) The one I had as a kid looked like this: http://www.rubylane.com/shops/seniormovingspecialists/item/TCTrain17 http://www.rubylane.com/shops/seniormovingspecialists/item/T... (though it was previously my dad's)
- DanielBMarkham 18y agoWow! The only thing I can think of as a next step is to install micro-webcams in the engines and have that virtual-world headgear to see the scenery from the model's viewpoint. Amazing!
- eru 18y agoStartup oppurtunity? By the way: Why are model railroads still expensive? Shouldn't the Japanese or Koreans (etc) have invaded the market by now with affordable, high-quality goods?
- DanielBMarkham 18y agoIt definitely has all the initial attributes: clear market niche, mature market with room for innovation, users willing to trade value for money. You could do some really cool stuff, like a hardware box for train control that has wi-fi, OLED, and a web server. Combined with some custom equipment, like the engine/webcam idea or others and it could be a killer app/platform. On the down-side, you need to be really close to the customers, you need to know what sells and what doesn't, and you need tight and immediate feedback as you try new ideas. You also need a way to communicate to lots of them at the same time -- repeatedly. I think it's a great startup idea. I'd be concerned about those challenges though. The best situation would be to launch as part of a partnership with well-trafficked, locally-run hobby stores. Perhaps with the cooperation/endorsement of a large hobbiest club and good press from the model train magazines. I don't think any of that is cheap or easy, but there's always obstacles.
- 18y ago