OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:18 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Why does the OSDev Wiki say it takes a year to finish an OS?
PostPosted: Sat Mar 25, 2017 5:32 am 
Offline

Joined: Sat Mar 18, 2017 4:52 am
Posts: 17
Sup guys.

Why does the OSDev Wiki say it takes a year to finish an OS? Many people can be fast at typing as well as knowing what to do.

The Linux kernel has more than 100k lines of code. Now it is 15 million lines of code. It doesn't mean other projects will take a year!

People can make a simple GUI in a month or so. I'm not being stupid but why would it take a year?
It's absolutely insane.

starmanz.

_________________
AX BX CX DX BP SP SI DI. The registers that never die. 16-bit... will always sit... in a book where people look. My signature is terrible! I think we all know that.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 6:41 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

starmanz wrote:
Why does the OSDev Wiki say it takes a year to finish an OS?


I have no idea. My normal estimate is about 10 years.

starmanz wrote:
Many people can be fast at typing as well as knowing what to do.

The Linux kernel has more than 100k lines of code. Now it is 15 million lines of code. It doesn't mean other projects will take a year!

People can make a simple GUI in a month or so. I'm not being stupid but why would it take a year?
It's absolutely insane.


Various things (code quality, performance, reliability, features) take time. You might be able to slap together a piece of trash (with extremely poor code, extremely bad performance, no concern for stability/reliability and no features) in less than 1 year; but nobody unfortunate enough to use it will consider it finished (or usable).

For more realistic estimates, sortie has been working on Sortix for at least 4 years (and doesn't consider it "finished"), and klange has been working on ToaruOS for at least 5 years (and doesn't consider it "finished"). Note that both of these projects use some ported code (and if they didn't they would've taken several years more to reach the stage they're at now).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 9:46 am 
Offline

Joined: Sat Mar 18, 2017 4:52 am
Posts: 17
Brendan wrote:
Hi,

starmanz wrote:
Why does the OSDev Wiki say it takes a year to finish an OS?


I have no idea. My normal estimate is about 10 years.

starmanz wrote:
Many people can be fast at typing as well as knowing what to do.

The Linux kernel has more than 100k lines of code. Now it is 15 million lines of code. It doesn't mean other projects will take a year!

People can make a simple GUI in a month or so. I'm not being stupid but why would it take a year?
It's absolutely insane.


Various things (code quality, performance, reliability, features) take time. You might be able to slap together a piece of trash (with extremely poor code, extremely bad performance, no concern for stability/reliability and no features) in less than 1 year; but nobody unfortunate enough to use it will consider it finished (or usable).

For more realistic estimates, sortie has been working on Sortix for at least 4 years (and doesn't consider it "finished"), and klange has been working on ToaruOS for at least 5 years (and doesn't consider it "finished"). Note that both of these projects use some ported code (and if they didn't they would've taken several years more to reach the stage they're at now).


Cheers,

Brendan


Well, guess what (don't take this harshly). Other people have wrote this code. In Assembly, I could probably make Hello World in 3 minutes. You can make a bootloader and kernel in like 10 minutes. It doesn't take years. Unless you have only a few minutes per day, you can make an OS in less than a year.

It depends on how active the project is. Do they have a 30 day code break? We shouldn't compare things to other things if you know what I mean.

The Linux Kernel might have only took 1 year but many OS projects take less than a few months. It depends on what you are gonna include.

Simple shell with commands written in Assembly that implements the filesystem (Mini version of DOS) - Less than a week (could even be 3 days).

Shell with drivers and lots of programs (painting software for example, compilers and assemblers) - Less than a month (something more).

Operating system with simple GUI - That should take a week or even a month depending on if you're gonna include the shell with drivers and lots of programs.

Operating system with a GUI, many programs, lots of drivers and things - Around 6 months possibly.
Operating system that is fully functional - Years and years.

_________________
AX BX CX DX BP SP SI DI. The registers that never die. 16-bit... will always sit... in a book where people look. My signature is terrible! I think we all know that.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 10:37 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
How long have you been writing your OS for? What is its current status? How much longer do you expect it to take before it is finished, with no known bugs?

I'd agree that 1 year is wrong; it is far too optimistic an estimate for most people.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 11:34 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

starmanz wrote:
Brendan wrote:
Various things (code quality, performance, reliability, features) take time. You might be able to slap together a piece of trash (with extremely poor code, extremely bad performance, no concern for stability/reliability and no features) in less than 1 year; but nobody unfortunate enough to use it will consider it finished (or usable).


Well, guess what (don't take this harshly). Other people have wrote this code. In Assembly, I could probably make Hello World in 3 minutes. You can make a bootloader and kernel in like 10 minutes. It doesn't take years. Unless you have only a few minutes per day, you can make an OS in less than a year.


For me specifically; I could write a boot loader in 10 minutes, but I'd be so disgusted by my incompetence that I'd probably delete it immediately and then end up playing games for a week to recover from my own self-hatred.

I actually started rewriting my boot code on the 4th of February (where half is just "copy & paste" from the previous version). So far I have about 15% of two boot loaders done; and I know from experience that the boot loaders are nothing compared to the next piece of boot code (or the "boot modules" it will use). I'll be extremely surprised if I'm able to begin working on a kernel this year. Of course I'm relatively extreme - my boot code has features that make the boot code in commercial OSs look like children's toys.

starmanz wrote:
The Linux Kernel might have only took 1 year but many OS projects take less than a few months. It depends on what you are gonna include.


So far Linux has taken about 26 years and it's still being worked on. However, Linux is/was mostly just clone of another OS (no time spent researching and designing things like APIs, advanced features, etc), and Linux is only a kernel (which is a small part of a whole OS), and the number of developers working on Linux alone (excluding GUIs, apps/utils, etc) is huge (and includes multiple large companies).

starmanz wrote:
Simple shell with commands written in Assembly that implements the filesystem (Mini version of DOS) - Less than a week (could even be 3 days).


That's not an OS; that's something you might write to get a little experience before you even start trying to writing an OS.

starmanz wrote:
Shell with drivers and lots of programs (painting software for example, compilers and assemblers) - Less than a month (something more).

Operating system with simple GUI - That should take a week or even a month depending on if you're gonna include the shell with drivers and lots of programs.

Operating system with a GUI, many programs, lots of drivers and things - Around 6 months possibly.
Operating system that is fully functional - Years and years.


Um, what? :?

Why do you think there's a difference between an OS that is "finished" and an OS that is "fully functional"?


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 11:50 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
I don't know of a single hobby OS that an average user would deem a solid OS after close inspection. An assembly program that prints "Hello World" is not an OS. If the wiki says that an OS can be written in a year (by a single person) that claim should be removed as it is overly optimistic. It's not even possible to design a solid system call API in a year if you don't have experience in OS design.

Likewise it is impossible to write drivers for even the most common hardware that is found in today's PCs in a year. Users expect OSes at least to support SMP, AHCI if not NVMe for storage, XHCI and the USB HID and bulk-only mass storage classes, HD Audio, a network stack including ethernet cards, IP and TCP/UDP and accelerated graphics (no, you won't be able to provide a modern desktop experience if you do all rendering in software). Many of those drivers require a huge amount of support code: For example almost every driver needs to do DMA and thus a memory allocator that is aware of different memory pools. XHCI and graphics drivers might need to allocate non-cached memory. Allocating non-cached memory requires cache shootdowns in SMP systems.

And at this point we're only talking about getting those things to work. Optimizing all this stuff to actually work smoothly is an entirely different story.

As a ballpark figure: My OS only provides a subset of those features. The accelerated graphics driver only handles mode setting and not shaders. I don't have an AHCI/NVMe driver. I don't have audio drivers. And my entire user space consists of already existing programs (bash, coreutils). Yet getting the rest to barely work took 900 commits consisting of 247k SLoC (added + removed) over 2.5 years. And this is not even my first try at writing a usable OS.

A kernel that provides the functionally of Linux 0.1 or DOS would not qualify as a (desktop) OS by today's standards.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 12:51 pm 
Offline
Member
Member

Joined: Fri May 20, 2016 2:29 pm
Posts: 77
Location: Paris, France
Hm.

I've been working on an OS for a little under a year, and I would not say it's anywhere near complete, though I work on it daily. Up to now, I've implemented a compositing window manager with alpha blending, user space ELF execution, a Newlib port, a 3D renderer, a hypervisor, PCI enumeration, and it is nowhere near finished. I doubt it ever will be, considering I'm 30 years behind the curve of other OS's!

It sounds dubious at best to claim that anyone who hasn't 'finished' an OS in a year is incompetent/slow at typing/not working on it much. It simply takes more time than you might expect.

Just thought I'd share my thoughts on this one

_________________
www.github.com/codyd51/axle.git


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 4:19 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
depends on what we call an os, and where we put the finish line.

-most people ,,develop'' they os by just using linux/bsd and a package manager to puzzle together packages. thats maybe 1-2 months to do.

-some people jump from x86 tutorial to tutorial to make some bootable 16 bit unix clone, if the person knows what he is doing, maybe 2-4 weeks for the monolithic kernel with file system, and 1-2 month for the terminal and commands. if he not knows what he doing, 1-2 years totally.

-and some maybe making an own os with own compiler and gui, thats a few years to be matured, + maybe one year to have some basic tools and games in it

-also somebody mentioned 3d graphics, well thats very irrelevant alreday since cpus are very powerfull, and the game developers alreday have to implement prety much the full rendering paths manually. new 3d apis will not give a traditional rendering pipeline, we are not in the 2000's any more, nobody cares if an os can run quake2 or not, its 2017, grow up!!!
but if you refuse to grow up, you can do glvertex3f and matrix management from a few 100 lines within a few weeks to have almost all opengl 1.1 related thing running. nobody will care. (the same applies for the 5626th unix/dos clone. i can type with a typewriter too, but i will not. move on with your life.)

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Sat Mar 25, 2017 4:29 pm 
Offline

Joined: Sun Feb 26, 2017 4:42 pm
Posts: 16
I have built and rebuilt my OS over the years replacing pieces, re-using pieces and re-architecting/re-imagining what I wanted from it. It's isn't fully functional in fact for the last 4 years it hasn't even gotten past the second stage boot loader. This is mostly because I've been too busy.

But to say you can write a boot loader in 10 minutes is very optimistic unless by 'write' you mean copy paste or by boot loader you mean it gets loaded at boot and then prints something out and halts.

Doing anything real like searching a file system for a later stage loader or the kernel + drivers etc. would take significantly longer. Not to mention writing a memory manager, etc.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 4:50 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
Geri wrote:
-also somebody mentioned 3d graphics, well thats very irrelevant alreday since cpus are very powerfull, and the game developers alreday have to implement prety much the full rendering paths manually. new 3d apis will not give a traditional rendering pipeline, we are not in the 2000's any more, nobody cares if an os can run quake2 or not, its 2017, grow up!!!
but if you refuse to grow up, you can do glvertex3f and matrix management from a few 100 lines within a few weeks to have almost all opengl 1.1 related thing running. nobody will care. (the same applies for the 5626th unix/dos clone. i can type with a typewriter too, but i will not. move on with your life.)

I don't get this point. Yes, today's GPUs do not rely as much on fixed function units as previous GPUs did. However you still need a GPU driver to submit command buffers to the hardware. You also need a shader compiler to turn shaders into GPU-specific instructions. Not to mention the graphics memory management and shader scheduler that is required to be able to implement this.

The claim that CPUs are powerful enough to provide a modern desktop experience via software rendering is ridiculous. If you want to prove me wrong then try decoding a UHD movie on the CPU. Hint: No CPU is powerful enough to do that and even if it was doing that would be a massive waste of memory and PCI bus bandwidth. Users expect to be able to start up their browser and play a YouTube video without all other programs and I/O crawling to a halt.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 5:35 am 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 640
Location: Ukraine, Bachmut
Geri just likes strong and nonsensical statements - "GPU are not needed", "modern computers can only boot A, B, C OSes and not my revolutional OS Ỡ ", "modern cpus need 100 000 000 lines of code to do cursor blinkin" etc.
Maybe modern CPU are powerful enough to do graphics, but this is not the question of the power, it's a question of suitabilty and correspondence. Modern computers have a dedicated piece of hw to do graphics in the most efficient way - because that hw specifically is designed for the graphics. Why one would not use this piece of hw instead doing the task less efficient way on a different part of hw, not as suited for the task? The only reason is documentation non availability, which is an absolutely different problem.

_________________
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 6:47 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 03, 2015 9:41 am
Posts: 492
1 year is too short amount of time; even 10 years is. Making an actual finished OS takes decades. I've been developing U365 over a year and it still lacks tons of features. It's impossible to create an OS in less than 1 year.

_________________
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 8:06 am 
Offline
Member
Member

Joined: Tue May 13, 2014 3:02 am
Posts: 280
Location: Private, UK
There's no such thing as a "finished" OS. There's always some feature to implement, some new hardware to support, improvement to make, bug to fix, API that could be improved, new idea to try out, etc. etc. That's what's makes it such a good hobby; it's completely open-ended.

You might be able to build a very simple OS in a year or so, sure, if you're technically competent, have a clear set of goals and don't have work or studying to "interfere". With all the tools around these days (easy to port/target compilers, easy to use VMs/emulators, etc.) it's not nearly as difficult to get started as it was, say, when Linux was first being developed. Building anything "serious" is going to take much longer.

Personally, my OS is nearly 3 years old and is still in the "0.1" "pre-Alpha" development stage. I expect at least another 5 years or so before it gets anywhere near "1.0". 10 years to reach "maturity" sounds about right.

That's for someone with 15+ years of programming experience, many years of interest and study of the subject of OS/systems software (I read Tanenbaum's book as a teenager, for "fun"!) and a Masters degree in Computer Science. My development style is best described as "API-first" and "try it and see what works; you can always rewrite it later" and I have no aversion to using third-party code (as long as it's under an acceptable licence) for things that I don't want to implement myself (the world doesn't need yet another inferior implementation of the C standard library, etc.), so I'd imagine my development is somewhat faster than someone who wants to build everything from scratch and doesn't write a line of code without months of planning.

Sure, I do have a full-time job, so the OS only gets worked on in my spare time and I've occasionally taken significant "breaks" so maybe if you're in a position to work full-time on your OS you might be able to do things more quickly.

However, the fact that you think typing speed has any relevance whatsoever in the time it takes to develop software strongly indicates that you have an awful lot to learn. If you're learning the basics of programming and software design as you go along, it's going to take a lot longer and will, in all likelihood, result in frustration and giving up before long. Don't take that as discouragement, every good programmer has a long list of failed projects/ideas behind them, if you keep trying, you'll get there eventually.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 8:11 am 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 595
Brendan wrote:
I have no idea. My normal estimate is about 10 years.


I somewhat agree with this estimate. Given that a dedicated team is working on the OS and it reaches production grade quality.

We have already examples of this. Haiku OS for example which has taken years and they are still not completely finished. Also Haiku OS just like Linux, already have an architecture outlined. People who make up their own architecture need to expect much more work. We all know Linux how long it took in order to become usable and in the 90s it was more or less a joke from a technological point of view (kernel lock anyone). Microsoft released their NT operating system in 1993 but first made popular in the 2000s. Before that Microsoft had about 13 years to build up the knowledge to create the NT operating system. QNX was created in the 80s, rewritten in the 2000s but from a company with long experience with operating systems. Just to give you an idea, for operating systems we are talking about decades of development and that from companies who hire entire departments.

Also, one thing that is worth mentioning is the rise of Linux in embedded systems. One of the reasons I Linux became so popular is that before a certain time it was enough to have simple operating system + file system for most devices which they could make for their own. Then came this connected boom, devices was supposed to be able to access the internet. Now suddenly it became too much for medium sized companies to create the own OS (with filesystem and full network stack) and they had to move to already available options.

If you are single a hobbyist working on your OS, don't expect to become finished anytime soon. Making an operating system isn't really a one man project but requires a lot of people. However, I don't want to discourage you because as much as it is a lot of work it is also very fun and satisfying hobby. Also you can decide to focus on certain areas more than on others. For example, if you want focus on the real-time aspect you can do that, or if you want to make the best file system you can do that (is really a separate field of computer science today). Most important is that you have fun.

I think the one year comment about 1 year in the wiki should be removed. It doesn't help and it completely depends on each person and how much time they spend and so on.


Top
 Profile  
 
 Post subject: Re: Why does the OSDev Wiki say it takes a year to finish an
PostPosted: Mon Mar 27, 2017 9:30 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
Korona wrote:
The claim that CPUs are powerful enough to provide a modern desktop experience via software rendering is ridiculous. If you want to prove me wrong then try decoding a UHD movie on the CPU.

my athlon2 x4 635 @ 3,3 ghz is capable to play 4k movies with mplayer in linux, no hardware decoding, and thats a 6 year old cpu, a modern i7 is almost 10x faster, you seriously have no idea what are you talking about

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 70 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group