Slashdot Mirror


Want To Write Your Own OS?

DJSlakoR writes "Looks like the Nocturnal Network has a tutorial on how to get started coding your own operating system. A very interesting read!"

15 of 129 comments (clear)

  1. Want To Write Your Own OS? No. by Mensa+Babe · · Score: 5, Insightful

    As someone, who has some experience in this field, I can assure you, that the correct answer to the question "Want To Write Your Own OS?" is "No, you certainly do not." Of course, it looks great at the beginning when you code a first working bootloader, then it's a great joy when your first single-tasking kernel can run its first process, et cetera. But as soon as you start working on the multitasking, decent scheduling, threads, multiple processes, file system, networking, writing an optimizing compiler and assembler suited for your platform, while constantly keeping security in mind, it soon becomes more work than using mature systems, like Open BSD or Debian, or even Gentoo. Don't get me wrong, I think everyone should write few toy operating systems, that's the only way one can learn the craft, but don't expect that your OS will soon become better than the systems already available, because they are bloated, while yours wouldn't be. This is a myth, and quite misleading at that, to say the very least. Still, this is great news (even if not actually new to anyone experienced).

    --
    Karma: Positive (probably because of superiour intellect)
    1. Re:Want To Write Your Own OS? No. by Richard_at_work · · Score: 3, Interesting

      I have been considering doing this, not because i want a usable OS, but because I want to learn how the hell its actually done! Sure enough i can look at mature code, but from other peoples code you learn significantly less than breaking stuff yourself. By doing it yourself you can learn WHY certain things are done in a certain method, and what doesnt work etc.

    2. Re:Want To Write Your Own OS? No. by HeyLaughingBoy · · Score: 3, Interesting
      As someone, who has some experience in this field, I can assure you, that the correct answer to the question "Want To Write Your Own OS?" is "No, you certainly do not."

      I have to disagree. I wrote a real-time preemptive multitasking kernel for a class on RealTime systems and it was a fantastic experience. It was for a small microcontroller (AVR series) for which few such applications exist, so I wanted something that would be useful if I decided to make it a commercial product. I learned a tremendous amount from that project, and while I stopped short of my original goals (message passing, mutexes, etc) the system was certainly usable and I would recommend that someone interested in operating systems give it a try. It does depend on how far you want to take it.

      I'd agree that writing an operating system for a desktop/server is probably not wise unless you have an earth-shattering insight, but operating systems for small embedded processors that go beyond "toy systems" can be very useful and can readily be completed by a single person in reasonable time.
      Learn by doing!
  2. You are completely ignorant and clueless by Mensa+Babe · · Score: 3, Informative

    Did it already
    I just cheat, and recompile my linux or *bsd kernel, and then call it a day.

    Just like Linus. He took GNU and wrote the kernel and called it after his name.

    Linus Torvalds perfectly realised that the name Linux was much too egotistical and simply unacceptable. We all agree about it now, but there's no point in comlaining, because Torvalds had already known that at the time of publishing the 0.01 version. "Linux" was only meant to be his private, temporary name of the OS on his own PC, before it has ever been meant to be made public. When he finally got to publish the first alpha version, he named it Freax, but the FTP server administrator renamed it to Linux. I just cannot believe, that even after twelve years, you are still so ignorant and completely clueless about that matter. These are just basic facts. You might want to educate yourself before you speak up next time only to embarrass yourself.

    --
    Karma: Positive (probably because of superiour intellect)
  3. What would you like to see most in minix? by Traderdot · · Score: 5, Interesting
    Here's someone who wrote their own OS:

    Hello everybody out there using minix -

    I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things).

    I've currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them :-)

    Linus

    PS. Yes - it's free of any minix code, and it has a multi-threaded fs. It is NOT protable (uses 386 task switching etc), and it probably never will support anything other than AT-hard disks, as that's all I have :-(.


    Message dated 25 Aug 1991

  4. How to write your own OS: by 42forty-two42 · · Score: 5, Funny
    1. Copy SCO code
    2. ???
    3. Profit!
  5. an even better tutorial... by Horny+Smurf · · Score: 5, Informative
    ... is Tanenbaum's books. "Linux is obsolete" might not have been his finest hour (although some of his points were valid, and linux has since added module support to cut down on the monolithic nature), but minix is a learning OS (in the same way pascal is a learning language), and is much easier to understand (and better documented :) than the linux kernel is.

    1. Re:an even better tutorial... by BoomerSooner · · Score: 3, Interesting

      I've got both of these and they are great. Be prepared for some major in-depth subject matter.

      If my personal company ever takes off I'll probably hire a few (5-10) people to work on a linux derivitave that is similar to OS X. Not in look and feel but in the way they took a good existing OS and put a very user-friendly layer on top of it. After getting that working I'll try to get them to integrate a VM like VMWare into the OS so running Windows programs will be like running native programs (obviously we'll have to include a windows license).

  6. PseudOS by EvilTwinSkippy · · Score: 3, Interesting
    I've always wanted to finish my PsuedOS, its a phony operating system for simulated robots. The idea was to release the system wrapped with a virtual reality engine, and have folks develop robotic ships, tanks, and fighters to duke it out.

    And when they got bored of fighting, use it to model space stations, automated traffic systems, and domestic droids. The idea would by to write the system as a pile of scripts running pseudocode. The trick would be to get everyone to write using the same language, that was really only useful for real-time processing.

    My intent was also to develop "PPI" (Psuedo Programming Interfaces) that would act like device drivers, and translate a variable to, say, thrust on a rocket. Another PPI would translate position and orientation into an array. Still more would simulate the outputs from visual recoginitions systems, and so on.

    If anyone has visited my website, they would see it presently exists as a paragraph or 2 of "coming soon speak." The project is probably waiting for me to be laid up after being struck by a bus or something.

    Why go to the trouble of developing my own OS? Nothing really exists right now to comprehensively handle massive simulations. Yes you have protocols like HLA, but they are just message passing. Sure there is TCP/IP, but it's so neutral as to be of no help to someone starting out. I could develop a Java API, or a C++ library, but they are far too complex in some respects, and far too limited in others.

    Frankly every operating system we have now assumes that you are structuring everything around files, documents, and static devices. At some point we have to do better.

    --
    "Learning is not compulsory... neither is survival."
    --Dr.W.Edwards Deming
  7. Re:Question for the article by ggambett · · Score: 3, Informative

    N zeros followed by AA 55. AA55 is the boot record signature, without it the BIOS will comply about not finding a valid boot sector. N = (510 - current position). This is because AA 55 must be the last two bytes in the 512 byte sector.

  8. I originally read the subject... by metamatic · · Score: 3, Funny

    ...as "Write Your Own OS/2".

    That particular dead horse is still having a shallow pool of its putrid entrails beaten though.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  9. Re:Just like Linus. by Arandir · · Score: 4, Informative

    He didn't take GNU and write a kernel for it. The reason was that there was no GNU System at the time! There was a compiler, a shell, and some other stuff, but it wasn't anywhere to being close to an operating system.

    Quite the opposite happened in fact. GNU looked at the fledging Linux operating system and started porting their stuff to it. Glibc was written for Linux, not the other way around, for one example.

    GNU was not an operating system that merely lacked a kernel. When RMS says that Linus merely dropped in a kernel, he is lying. Otherwise it wouldn't have taken Debian years to get Debian HURD bootable. It wouldn't have taken them years to get a Debian BSD to boot. I don't know how anyone can consider Debian "The GNU System" when it took crowbars, sledgehammers and ripsaws to get it to use The GNU System's own kernel. Yet Debian is closer to what RMS means by "The GNU System" than anything else out there.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  10. much easier way by zaqattack911 · · Score: 3, Funny

    My friend and I are trying to develop a special C function library that will allow people to make their own customizable O/S. By using a single function... called the doOperatingSystem Function. Prototyped as follows:

    void doOperatingSystem(char *name,char *color);

    Pretty snazzy huh?!

  11. Why not? by Tablizer · · Score: 3, Funny

    Emacs did

    1. Re:Why not? by CTalkobt · · Score: 4, Funny

      >>Emacs would make a great operating system, now if only someone would write a decent text editor for it.

      They have. You simply have to invoke a shell from within Emacs and invoke vi.

      *ducks*

      --
      There's a gorilla from Manilla whose a fella that stinks of vanilla and has salmonella.