I Just Wrote An Operating System From Scratch
moultano
Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts

<div class="IPBDescription">in 48 hours</div> There is no feeling quite like rising to the occasion.
As a disclaimer, I didn't have to deal with the boot process, and they gave us a malloc package to use, and we didn't have to write a file system, but everything else my partner and I wrote. (Although last semester I did have to write a malloc package <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->)
We hadn't intended to do it in 48 hours. This was a 6 week project. But we discovered thursday night that there was a bug in our code. To be specific we discovered that the method we were using to context switch between processes would fail whenever the context switch transitioned between two processes in the middle of system calls. This meant rewriting virtually all of our code.
Between Thursday night and Saturday night we coded, with one eight hour break to sleep and a few for food. We wrote the entire frikin' thing. There are no memory leaks. It has not crashed no matter what we do to it, and it disables interrupts only on asynchronous interrupts. In short, it rocks.
This is without question the biggest accomplishment of my life. And I'm feelin like I can walk on air. Just thought I'd share.
As a disclaimer, I didn't have to deal with the boot process, and they gave us a malloc package to use, and we didn't have to write a file system, but everything else my partner and I wrote. (Although last semester I did have to write a malloc package <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->)
We hadn't intended to do it in 48 hours. This was a 6 week project. But we discovered thursday night that there was a bug in our code. To be specific we discovered that the method we were using to context switch between processes would fail whenever the context switch transitioned between two processes in the middle of system calls. This meant rewriting virtually all of our code.
Between Thursday night and Saturday night we coded, with one eight hour break to sleep and a few for food. We wrote the entire frikin' thing. There are no memory leaks. It has not crashed no matter what we do to it, and it disables interrupts only on asynchronous interrupts. In short, it rocks.
This is without question the biggest accomplishment of my life. And I'm feelin like I can walk on air. Just thought I'd share.
Comments
Seriously though, great job.
is it any good?
Congrats man.
------------------------------------------
**EDIT**
Okay after reading XeroSlayer's reply I can't help but be angry. I mean w.t.h. man, this guy just put his soul into his work (obviously for a class or a job, so you can't argue the point) and is feeling good...
Don't burst his bubble....
<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Actually that's the nice thing about going to carnegie mellon is that there is no sun in pittsburgh. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> My OS professor refers to sunny days as "big yellow ball days" because all the native pittsburgers are walking around in a daze wondering what that bright thing in the sky is.
Seriously though, next weekend there's going to be some seeeerious frisbee playing. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
neato, though
and xeroslayer, that "joke" has been done to death and back
and its STILL not funny
oh well, maybe if you stay on the internet more [hyopcrite] then you might come across someone you can steal funny jokes from
jeez
At the moment the kernel supports wait, fork, exec, thread_fork, sleep, readline, exit, yield, deschedule, make_runnable, new_pages, remove_pages, and a whole lot of screen console commands that I'm not going to list. If anyone is interested, <a href='http://www-2.cs.cmu.edu/~410/p2/kspec.pdf' target='_blank'>here</a> is the spec for it.
Our previous project in the course was to write a full thread library given a kernel that met the spec of the one we just wrote, and that thread library came pretty close to implementing posix threads, so theoretically we could link the two, but I didn't really get a chance to try it out before we had to submit it, and I'm not going to touch that code again for at least a week. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Nicely done, I wrote one last semester but it was crap cause I never wanted to do any work for that class. I was too busy spending time on my graphics class writing my ray tracer.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Yeah, that will be next semester for me. I'm really looking forward to it.
it was just a small applet that changed
100 -> one hundred
345 -> three hundred and fourty five
667 -> six hundred and suxty six
felt good <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
it was just a small applet that changed
100 -> one hundred
345 -> three hundred and fourty five
667 -> six hundred and suxty six
felt good <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
I hope it got the counting and spelling right though <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
Seriously though, great job. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
^^
Very good job
nice hardcore coding!
Our OS class is C++ afaik.