Page 1 of 1

How long will it take to complete an OS????

Posted: Mon Nov 12, 2007 8:13 am
by mahesh
This is not about a "COMPLETE" OS, but a basic OS with hard disk access, keyboard drivers, CUI interface etc...

Posted: Mon Nov 12, 2007 8:17 am
by Craze Frog
More!

Posted: Mon Nov 12, 2007 8:18 am
by AndrewAPrice
It depends.

Starting off (i.e. writing your first operating system kernel) then 3 months to a year.

An programmer writing their 5th kernel could probably whip up something in around half a week (reusing a lot of their previous code).

What exactly do you mean by "hard disk access"? Reading individual clusters? Or loading programs off a disk (file system drivers, ELF parsing, page management?)

Posted: Mon Nov 12, 2007 8:56 am
by JamesM
I've been working on mine (3rd reincarnation from scratch) since the beginning of July and ignoring my recent shakeup of syscall and IPC interfaces have:

GNU bash ported (so that counts as your CLI)
newlib ported (c library)
keyboard driver etc (comes as standard with the TTY server)
hard disk access is done. I have work to do on the sector cache and also some bugs to fix in the ext2 implementation (read only atm).

I have a shedload of other less obvious things as well, including (NEW!!!) an almost capabilities based syscall and IPC interface. To make (most) syscalls a process requests a resource and performs a call on it. The resource maps in kernel space to a C++ class. Processes can now also create resources (and can be named, if required) so other processes can call functions on them remotely (my primary method of IPC). Ph33r.

I have been coding OSs as my main project (talking an average of ~1h per day every day, ~3 h per day I actually worked on them!) since October of last year. So if you have that sort of commitment you can make an OS in just < 6 months if you really want to.

Your timescales are waaaay too short though, writing an OS is possibly the hardest project you can embark upon.

Re: How long will it take to complete an OS????

Posted: Mon Nov 12, 2007 9:16 am
by jal
A real-mode 16 bit OS can be done quite quickly, using INT13h for disk access. Otherwise > 3 month unless it's your full time job. It helps if you have everything planned on forehand, but totally from scratch, this is a very unrealistic time table.


JAL

Posted: Mon Nov 12, 2007 9:40 am
by os64dev
* none of the above

You cannot write an OS in three months and have it fully tested.

Posted: Mon Nov 12, 2007 10:13 am
by Combuster
4 years and counting :wink:

Posted: Mon Nov 12, 2007 2:14 pm
by bewing
It certainly depends on what language you choose, and what you mean by "scratch", too.
I wrote my own MBR, my own bootloader, made up my own filesystem, and made up my own executable format. I wrote it all in assembler, and singlestep debugged the whole thing. It's taken me a bit over a year so far, probably working 6 hours a day at it -- and I'm about at the stage that you specified.

Posted: Mon Nov 12, 2007 2:40 pm
by frank
1-2 years if you work on it all the time

Posted: Mon Nov 12, 2007 5:45 pm
by JackScott
3 years and counting... most of that time has been spent reading manuals and debugging code. New features are few and far between.

Posted: Tue Nov 13, 2007 2:50 am
by JoeKayzA
For me it's also around 3 years now (on this project), 90% of the time was only design theory and gaining knowledge, not active coding work.

Posted: Tue Nov 13, 2007 3:33 am
by Solar
The question is unfair at best, because those who have the experience and up-front knowledge to do it in a relatively short time usually also have full-time jobs and can spare only a couple of hours per week on OS development.

I had been a pretty good C/C++ coder at the time I started my OS project, so I did lose little if any time wrapping my mind around the concept of a freestanding programming environment.

But it took me over three months just reading, getting up to speed with what could be done and whether it would be wise to do so. When it's your first OS project, you usually don't know about stuff like memory allocation algorithms, SYSCALL vs. SYSENTER, or the intricacies of CPUID. You could simply start hacking away in trial & error fashion, but if you got into this because you want to put your design ideas into reality (instead of the hacking / show-off value), that's not the right way to do it. So I read the Intel Manual Book 1 cover-to-cover, and pondered over several chapters of Book 2 to nail down various concepts I had in mind for memory management and IPC.

Then I did spend quite some time in setting up version control software, a communication forum etc. - things that were only auxiliary to the OS effort itself, and ultimately a factor in the failure of the project (because the forum became a time-sink that bogged everything down eventually); but an experience in itself which I did put to use numerous times in a professional context. (For example, I learned about Wikis that way, about the futility of design-by-committee, about pro's and con's of various VCS packages, about versioning / packaging schemes etc. etc.)

All in all, I did invest the spare time of over a year in that project, with only a simple "hello world" "kernel" to show for it. Do I consider that time wasted? Certainly not. Two spinoffs from that project are the GCC Cross-Compiler tutorial and the PDCLib project, plus numerous postings at MT and edits in the OS FAQ.

Posted: Tue Nov 13, 2007 4:33 am
by AndrewAPrice
Solar wrote:The question is unfair at best, because those who have the experience and up-front knowledge to do it in a relatively short time usually also have full-time jobs and can spare only a couple of hours per week on OS development.
I agree - I have too many college assignments to work on my OS every day/week.

I tend to go jump between a week of doing of getting a lot done, and then 3-4 months and only change about 10 lines of code.

Posted: Tue Nov 13, 2007 9:46 pm
by piranha
1.5 years......1 since I started using Linux......

-JL