Thread: operating system programming

  1. #1
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533

    operating system programming

    Does anybody know of a good book on operating system programming.
    Design, source code etc. Something to build an operating system. There was this one book that was on POSIX but I can't find it anymore and its probably too old now anyway. If you can give me some good book titles to go hunt for I'd be very greatful.

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Go to www.flashdaddee.com and click on the Operating Systems Development board. Look at the sticky concerning the resources. Very good references.

    http://www.flashdaddee.com/forums/sh...=&threadid=180

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    A good book:

    Modern Operating Systems
    http://www.cs.vu.nl/~ast/books/mos2/

    There's also another book of Tanenbaum, called: "Operating Systems: Design and Implementation", I've not read that one, but I'm told that's also a good one.

    Here's a link to a FAQ which might be interesting:
    http://www.mega-tokyo.com/os/os-faq.html

  4. #4
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    one quick other programming question.

    I pray that it's not true...
    Is it possible to code an OS in Java?

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    What do you think??!

    Java apps require an environment to run in, so...
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by Hammer
    What do you think??!

    Java apps require an environment to run in, so...
    Well theoreticly you could, depending on your definition of an OS. If you had an embedded Java VM, you could probably have it run the "OS".

    Similar to the way the BIOS loads the first boot record.

    You could theoreticly build an embedded Java VM to load "Boot.java" which was the "kernel". Then have all of your 'apps' or what not load and handled by it.

    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Well, yeah, I s'pose anything's possible.. practicle and feasable on the other hand are another issue.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  8. #8
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    Yes, Java apps require an environment to run in, but then again, so do C apps - it's normally quite difficult to get a C application to run directly from the boot sector of a drive as it requires it's environment (run time library, os calls into DLLs, etc). The only language excluded is ASM.

    However, with a ASM loader, you can run your C-based OS, just as you can your Java-based os.

  9. #9
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    yeah but Java would be HORRIBLE for writing an OS.
    (Forgive me if your a fan of Java, but I }{ate it! )
    You can ONLY use the libraries given to you (it seems). I am an average Java user and I despise everything about it. It is such a wannabe C language. Anyway.
    I pray that no one makes an OS with Java.

    I am looking into making an OS, I might want to make one, someday.

    I made a Linux Distro but thats really not that special, just time-consuming. And besides the Distro's out there today are far far better. On my distro the only way to install is was boot off a disk, run fdisk, set up the partitions, make the filesystem layout etc. by hand and by copying the files from the disk to the harddrive. The only real challenge was the Kernel and the Loader, but the Loader was done by using some Norton kit thingy and then I got LILO on it afterward and the Kernel, I just had to change a few things. I think anyone could do it. I think the real skill is making a self-automated installer.

    Anyway, thanks for all your input.
    Salem, Bubba, Shiro, Hammer, quzah, _Elixia_

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  10. #10
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    pray that no one makes an OS with Java.
    Sorry to brake this to you.

    There was JOS and there also JNODE now. Theres a couple other too.

    I think its kind of evil too, but maybe java has a use after all(I was thinking just like you Lynux-Penguin). I have to learn it anyway(AP).

  11. #11
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Java is in my opinion not a wannabe C language, since those languages have different fields of application.

    In a lot of systems in consumer electronics lower layer software is written in C/C++ and assembly. Often on the OS a JVM is laid on which Java applications are running. Mostly because such applications can than be run on other products on which the same or a compatible JVM is installed. For example, for a family of cellphones, you can use the same family of Java applications, even if the hardware architecture changes, those applications can stay the same. Software adaptations are then only required in the lower layers, the layers below the JVM. This is one use of Java.

    Anyway, if you're interested in developing your own OS. You could take a look at Minix, a small OS developed for teaching how an OS works.
    http://www.cs.vu.nl/~ast/minix.html
    Last edited by Shiro; 08-02-2003 at 05:30 AM.

  12. #12
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    Java does seem to be good at that, but is cross compiling that bad? It would be faster and should work if you write decent code.

    I just dont like how they simplified some things. It just annoys me.
    I havnt gotten to far in the book but it does seem like they just try to make c more basic like.

    I wish some one would just make c script and a c shell(i know of csh and tsch, no one seems to like it. Something about its scriping).

  13. #13
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    <edit>
    Minix does seem like a good thing to learn from. I found a book that goes threw it and has the printed source. I was thinking of looking up a old Dos to learn from.

    I also heard that the really old Linux kernel are good to learn from(like starting with what he posted and moving up alittle).

    I still need to buy a concepts book and the Intel manual(just for fun).

  14. #14
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    > Java does seem to be good at that, but is cross compiling that
    > bad? It would be faster and should work if you write decent
    > code.

    Cross compiling is always required when your software needs to run on several software and/or hardware platforms. The problem is that it is usually a bit more work than just recompile on the other platform. It usually involves using specific drivers, libraries and frameworks used on the other platform. Also the architecture might differ which may lead to (partial) redesign of your software.

    Well layered software only requires such adaptations as described above in the lower layers.

    When there is no need for fast and small software, but the software should only be easy to develop and maintain, then I think Java does a good job. Also when using Java, it seems that things like remote updating of software is much easier.

    Java is good at specific applications, C is better at other applications, I'd say use the tool with fits best.

    > I still need to buy a concepts book and the Intel manual(just for fun).

    The Intel manuals can be downloaded from the Intel developer site, I thought it was for free. Those manuals are quite big.

  15. #15
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    " It is such a wannabe C language" >> referring to java
    this is true, java was first, modeled after c. Can't remember the whole story but it was supposed to replace c or something. I read it in c step-by-step.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL and my operating system
    By hauzer in forum C Programming
    Replies: 5
    Last Post: 10-31-2008, 12:16 PM
  2. Operating System Project
    By Pete in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 07-15-2004, 09:33 AM
  3. What is a Microsoft Operating System Like?
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 10-21-2002, 07:36 AM
  4. Operating system
    By sopranosomega in forum C Programming
    Replies: 6
    Last Post: 10-07-2002, 06:12 AM
  5. Microsoft = The Best Operating System
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 92
    Last Post: 02-08-2002, 01:32 PM