You are basically talking about finding out that every rewrite is much more tedious than the previous one.
It took me a lot of time (my first 8 OS development years, from 2005 to this now ending year 2012) to find out how to solve that problem:
- It is usually an error trying to write any program (including a kernel) with features I currently don't need. It will lead to a very poor implementation. It is better to leave pride aside a little bit and start on things I truly need to learn and implement. For instance, right now I still have to learn a lot from the programs at Programmer's Heaven (things like graphics, math, and other miscellaneous things), and I also just need to load small programs from floppy and at most, from hard disks with FAT32. I also need PS/2 support for keyboard and mouse, and basic VGA modes, and VESA modes as well. I need mainly 32-bit code support.
If I currently don't REALLY need multi-core, 64-bit support, network, paging/virtual memory or GPUs because I just haven't spontaneously experienced those problems and because I haven't implemented an easy-to-understand and easy-to-scalate code along with its very well defined and documented logistics, I will not only lose my time, but I won't understand what I am doing because they aren't real problems for me currently. And then an unnecessary rewrite will take place, when I could have just made a simple applications as a test for a future subsystem, instead of rewriting everything and using more effort than was really required.
It is better to first come up with an excellent implemented solution for the problems I really know, understand or can relate to very well and are part of my life (if I'm an individual developer instead of a developer group), and find a way to get to understand and get to know the problems I want also being able to handle.
At least as for me, the fact that practicing all of the above allowed me to create a minimal, yet extensible kernel, and more importantly, reusable explanations for the fundamental algorithms and the methodologies and tricks used for future code implementations (no matter how different) shows that it is more important to concentrate exclusively in solving my real problems.
It is either that, or trying to leave those things abandoned while trying to achieve things I'm just not experiencing.
- To break the pressure and the tedious situation of rewriting everything year after year, it is necessary to read and do things I haven't done or did poorly in the past.
It is important to give very small steps, and these steps must be reusable.
One must be careful to not allow that the ratio of productivity/implemented stuff drops too much after studying; nor allowing the ratio of newly-learned things drop too much after implementing things to the point where they are starting to become sketchy and a bare attempt that barely works, if it even does well. And so on.
It's also important to do things that are currently interesting, have numerous applications and allow me to process other things in the background. When returning to those, the mind will usually be refreshed an much more lucid than not allowing it to take a rest from such things. I have left many or all aspects of OS development for several weeks or months many times, and when I return, I find to my surprise that they have suddenly become much easier to understand before taking such a break. It might be counter-intuitive but it is true (allowing the mind to physically recover after a heavy cycle makes sense).
- I find that it is always good to talk about these things with programmers who aren't specifically in it. It's good from the point of view to psychologically regard past topics as "mastered" and "done", as if now everyone understand them; although it very probably will upset some of them, in which case it is better not to pay them too much attention, to avoid losing time.
- Things get much more interesting when combining OS-development-grade techniques in other types of programming. For instance, I managed to write a kernel that only has a console, FAT12 reading and simple program loading. Not very interesting. But to make it more educative, I am also building a PC emulator (or at least trying). It is allowing me to know much better the x86 architecture, and implement it myself, so I can know if what I am supposing is right or not (I study the manuals, then implement and then I see if things are coherent).
______________________________________
______________________________________
______________________________________
______________________________________
Antti wrote:There surely is a huge gap between your knowledge level and mine. However, I am climbing up everyday. I started programming (in general) in early 2010 and I started my OS project ten months ago. I already have a simple basic system that is not anyhow based on any "tutorial operating systems." Here is a brief list of "keywords" (just to give some idea):
My interest in OS development started in November 2004, seemingly the right time, when general interest in it was at its peak point. And I've always had computers around and certain "ease" to program. Although I might not have the best of all educations in Computer Science unlike many people here. I learned assembly in 6 months, and I learned a lot of things that I couldn't connect to create a kernel, but I had a lot of fun (keyboard, handling CD-ROMs, hard disks, timers, the screen...), but now, after 8 years of being mainly focused in OS development, I'm in a much better position to start building a minimal kernel (
which I have done: a basic text console with basic built-in commands, floppy support for standard FAT12, timers, and ability to run programs with minimal structure).
Antti wrote:My current programs are using system calls directly and there is no any concept of shared libraries or dynamic library loading. I have not yet reached "the level" of porting the C library and start building a "POSIX-system-like user space". I mean the system that resembles Linux-Unix-bash-shell-something system (although this is not an accurate description nor technical, I hope you understand what I mean). Actually I am wondering whether or not I want to do this at all. Nevertheless, then I would notice how inefficient my system is when compared to the real ones.
To give an idea, I can currently run programs in physical space (no paging, no virtual addresses). You could easily have some sort of table of system calls with many empty slots, and you could, instead of loading a program, reserve a physical block of memory and the system call slot, to have very basic "dynamic loading". It might not be useable in a "final" system, but it will allow and will actually make it possible to have a starting point to create a true dynamic loading, specially if you have absolutely no previous experience on that.
Antti wrote:Three years for the kernel/s and basics does not sound very bad at all. It is quite plausible. Is the kernel meant to be highly portable? I am just questioning the long gap (5 + 7 years) before the first public release. Of course there must be non-public releases for testing purposes? If it took so long to release the system publicly, I think the kernel should be considered being "just an extremely good design and stable API." I am not sure whether the kernel implementation details are very important when looking at the whole big picture. Of course it is quite difficult to forecast the future. It may be that the current hardware is still current in the future.
The language/toolchain/IDE would probably be the most interesting part of the project. It may be the way to do the next big thing. It could "live forever" if it were successful. The hardware evolution does not affect to it.
Three years for an useable kernel would mean that it was a team work or a full time activity for a very experienced individual. In either case, if it has all the basics (booting, memory, processes, GUI, mass storage, network), it almost always means that libraries were used; or if not, it means that the team or individual is truly top-notch and has exceptional abilities and/or complete knowledge.
Antti wrote:Last few days have been terrible. I started rewriting the system from scratch. There is not much code yet. Mainly just stubs that are used for testing the build system. At first there are two targets: x86-32 and x86-64. I try to do things so that it would be easy to add more targets in the future. Portability and simplicity are design goals. Efficiency is not the primary concern.
I will set up a website for this project. I want to own all the rights to the system but I prefer to show the code. Are there any legal problems if I just put "Copyright [...] All Rights Reserved." and just show the code? Is it still proprietary so that I can do whatever I want with it? It goes without saying that I do not use any GPL (or similar) code in it.
In my first 8 years of attempts at OS development, I have tried almost everything you have said that you are doing: Trying to modularize the code and make it automatically portable, many full rewrites (
10 major but that actually represent very little new knowledge that I could have acquired in less than a year if somebody had given me a structured and formal approach of learning and implementing).
Antti wrote:Brendan wrote:For me, it's really about "intent" - e.g. if you intend for the OS to become a usable product that millions of people will use daily (regardless of whether anyone ever does use it).
That is the right attitude. These kind of projects are interesting to watch. In contrast to "just a hobby project that is discouraged (by the author) not to (even accidentally) gain attention."
In my case, my attitude is that of trying to make possible that understanding currently difficult things, becomes considerably easier to understand. Many things are difficult because they aren't publicly explained in a complete way. I don't know how far I can get, but I'm not worried.
Among other things, not even the fact of being essentially currently alone in my projects, having a deficient education on Programming/Computer Science (which I'm working with the best of my abilities to overturn), or seeing how small the general interest in such advanced topics is even among other "good" programmers, are even near enough to discourage me.
These 8 years of trying without stopping, and rewriting things, or for instance, just not returning ever again to this forum (among other things), demonstrate that when I say that I won't give up, I'm serious. I'm here after all, and I'm happy to see that I've been able to help people around here once or twice, at least in very small things.
I've had many chances to get discouraged and stop trying to learn more about OS development, but I haven't and don't even imagine suspend my attempts.
Of course I want to have my OS done in as short time as possible, but I also want to leave something that goes beyond it, so it can be used globally in anything other than OS development, and make it beneficial for others (that's why just like the OSDev Wiki, everything I program and document, that in in the Internet, is in the Public Domain / Creative Commons 0 1.0 Universal, so it has no limitations and can survive as long as it is something really valuable for even a small group of productive people).
I want that what I do can be free from all copyrights (but that can be reused in an individual basis even in copyrighted works). I want being able to help people who understand less than I.
+++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++
Now for me to also be productive and trying to demonstrate what I'm talking about, please allow me to gradually open new threads over time to post what I have managed to do and answer whatever I can (correctly). In this way I will do what I said, of not allowing my theoretical work level make drop too much my ratio of implemented achievements.
I hope it helps. If you have been iterating since 2010, then what I have done should be useful since I have been in that situation since 2004/2005 and still going, somehow as "bored" as you for rewriting things, but being much less bored because of remembering and now knowing that it's not a waste of time; just a demonstration of how many steps (iterations) are required to achieve the desired goals given their complexity, and learning and producing reusable documentation, code snippets, and algorithm descriptions constantly.
In this way, everything I achieve will be the new starting point; it will no longer be from scratch but every time the starting point will be higher, and will have more quality.
It should probably serve as some sort of example as to what to expect to get done in the near future.
Keep in mind that you probably are twice or three times above my ability and knowledge if you have mastered things like the GNU toolchain, C and C++, memory management, USB, multicore support, parsers, text consoles, GUIs even if basic, data compression, sorting, image coding/decoding, Base64 et al, audio formats, and miscellaneous yet applied computer math, and all of the things that are in the Wiki (as well as indirectly related subjects such as full hardware, software and protocol specifications), to the point that you have implemented in applications or in your kernel.