This is a neat book. I read the first six chapters a while ago and it seemed interesting.
Roll Your Own UNIX Clone
11–20 of 44 posts
Re: Roll Your Own UNIX Clone
#12I'll just leave these here... http://www.intel.com/products/processor/manuals/index.htm [disclaimer: I'm an OS/kernel dev]
I gotta ask...if I go do this sort of thing on my own, I might produce something that won't segfault or oops()...if I were to walk into a job interview for an os/kernel dev job (the kind that rand say I did write a crappy primitive kernel would that look good or bad? I've been working for almost 3 years now and this is an area that I would like to move into.
If you like, a much simpler version of the Linux kernel, Kitten OS[1], is used to run at Sandia and in sequence with the Palacios academic virtual machine[2], which is what I'm working on. It may be worth looking at, although I still highly recommend that you look into actual production code.
Re: Roll Your Own UNIX Clone
#13I'll just leave these here... http://www.intel.com/products/processor/manuals/index.htm [disclaimer: I'm an OS/kernel dev]
But you can bootstrap a cheap Unix with chapters 5-10 of this: http://www.logix.cz/michal/doc/i386/ Getting into protected mode and exec'ing processes in their on private space has been done with ~4 pages of asm.
Also, while devs have to write portable code -- don't bother. It'll save you a bunch of time if you just write the IA32e specific asm code.
If anyone has any interest, I can also post my adaptation of an asmx86 vim syntax file I hacked up from something I found on Stack Overflow. It's not that great, but it does at least fix some of the register highlighting.
Re: Roll Your Own UNIX Clone
#14Re: Roll Your Own UNIX Clone
#15Any ideas?
Re: Roll Your Own UNIX Clone
#16Whenever I think about doing something like this, I always get stuck up on x86 ASM. There don't seem to be many books on ASM out there, and the ones I could find in the bookstores were all written around MASM which, of course, does not work on Mac OS X. Any ideas?
[1]http://www.ibm.com/developerworks/linux/library/l-gas-nasm.h...
Re: Roll Your Own UNIX Clone
#17Whenever I think about doing something like this, I always get stuck up on x86 ASM. There don't seem to be many books on ASM out there, and the ones I could find in the bookstores were all written around MASM which, of course, does not work on Mac OS X. Any ideas?
Write a relatively simple C program that does something useful that you understand thoroughly, then generate intermediate assembly code from your C compiler, with optimization turned off.
That way you get a problem that you already know how to solve in a .s listing that you can inspect and modify to your hearts content.
Then try to optimize it, make it run quicker by rearranging stuff.
You'll learn lots that way and the barrier to entry is low.
Re: Roll Your Own UNIX Clone
#18Ok, hes not building a real OS, but rather a toy OS (presumably for the learning experience), so these things are not so much of an issue. Its actually a good article, IMHO, and I wish it had been available a few years back when I tinkered with writing my own toy kernel. The "Roll your own unix clone" title given here is pretty misleading though.
Re: Roll Your Own UNIX Clone
#19I'll just leave these here... http://www.intel.com/products/processor/manuals/index.htm [disclaimer: I'm an OS/kernel dev]
Re: Roll Your Own UNIX Clone
#20Once you've built a UNIX clone, you have polluted your mind as an OS designer. I did so (as a standard college homework assignment) and it took me years to shake the crud out of my head.
As for the tutorial, it is very well written, but x86-32-centric and therefore worthless. There are nontrivial differences between x86-32 and x86-64 from the standpoint of an OS author who wants to make full use of the latter's capabilities.