I'm going to use this as an opportunity to champion C++ for systems programming despite the fact that it wasn't really your argument. I feel obligated to do this because I agreed with you for a long time on this but have changed my mind over the past year or two.
The argument against C++ as a systems programming language has always been that it gives you too much freedom to hide complexity, but I've written systems code in both C and C++ professionally and it's been my experience that the extra burden of having to write every damn thing over again in C (or use a relatively poorly tested container library, as compared to something like the STL) is not worth the "obvious performance characteristics."
I'd further contend that in non-trivial software all perf characteristics are non-trivial, so even though a + b might be doing all kinds of crazy things in C++, you're much more likely to run into problems invoking store_value() which might interact with a number of underlying libraries and system calls. At the end of the day you're hopelessly screwed without profiling and the utility perf works just as well on C++ programs as it does on C programs.
Finally, the majority of code in my experience is either slow path or at least not the bottleneck anyway. You can almost always optimize a systems program by making smarter system calls (or hardware invocations), while optimizing CPU is rarely worth it. Even if you're CPU bound, it's likely that it's in doing something like SSL, wherein you're almost definitely wrong to try to jump into a project like OpenSSL with micro-optimizations. With that in mind, why not allow yourself to move faster by creating a std::vector? When you use the proper conventions, it's generally as fast anyway.
Just because people can (and have, a lot) misused C++ and created way too much complexity with it doesn't mean that it's not the preferred language in the hands of someone who knows what they're doing. (And yes, it's much harder to learn how C++ works in a meaningful way to avoid these pitfalls, but if it's your job, learn it anyway).
For example, Linux's list.h has an intrusive list that is far better than the abysmal std::list from the STL.
I don't think the style of your code should change the name of the language you claim to use. If it doesn't pass through a C compiler, it's not C or "C/anything".
Now it is quite possible to use the subsets of C and C++ to write code that conforms to both language specifications and compiles with a compiler for either language. If some project deliberately does this, I don't have an issue with calling it C/C++ to hilight the fact. This however really is quite rare from what I've seen, even if I can name some projects that do make such code (the Opus audio codec is one example).
C/C++ still isn't a language though, so I would very much prefer to call it C in a case like this.
A different scenario entirely would be a project with parts clearly written in two (or more) different languages, which could happen to be C and C++...
Building an OS has been in my bucket list for long and it has been one heck of an experience so far.
Here are some good step-by-step OS-from-scratch programming guides
http://jamesmolloy.co.uk/tutorial_html/index.html
http://www.osdever.net/bkerndev/Docs/title.htm
http://www.brokenthorn.com/Resources/OSDevIndex.html
http://viralpatel.net/taj/operating-system-tutorial.php
and here's a good wiki for reference
[1]: http://developer.amd.com/resources/documentation-articles/de...
I haven't really looked at the code, but I guess the following at least contains a bit of example code:
http://www.returninfinity.com/baremetal.html
Menuetos also looks rather interesting, unfortunately, as I recall the license for the 64bit version puts the code in a bit of a limbo as far how it's actually useful. There's a fork, but not for amd64 afaik..
x86_64 bootup / structures
https://github.com/nwg/nanos/blob/master/src/boot.asm
https://github.com/nwg/nanos/blob/master/src/kernel_init.asm
I've built two so far which were (and I think still were until recently) used in production equipment. One Forth system (all 8k of it) that ran a PLC system and a tiny (16k) kernel for an M68k system that was a router for a modbus-like protocol over RS485.
Nothing x86_64 but nevertheless the most fun I've ever had with a computer.
(I'm curious as I know little of these kinds of things, and because citing sources or giving arguments is always a good thing)
There's so much legacy baggage inherent in the x86 architecture, all because of software compatibility. (ROM-BASIC will still run on a modern PC!)
ARM on the other hand has less to really worry about, sure there's some legacy infrastructure, such as the ARM vector table. Modern ARM architectures such as ARMv8-A remove old legacy baggage in favor of completely renovating it. (Look at the old coprocessor interface for instance. In A64 mode, it is completely gone. You must use 'mrs/msr' instructions compared to 'mrc/mcr'). There's also far less legacy software to worry about.
As a side note, when looking up [1] I also ran across [2].
[1] http://piumarta.com/software/cola/ [2] http://www.acm.uiuc.edu/sigops/roll_your_own/1.helloworld.ht...
You had to provide re-linked executables for every new version of BeOS that came out. It was exceedingly lame to go to an application download page and have to select the version of the application that corresponded to the version of BeOS you installed.
Then when you upgraded your OS, you had to upgrade ALL of your applications. Sure, there were some framework upgrades that didn't necessitate a re-linked application, but as a user you never really knew which those were so had to do a full upgrade of everything to be sure.
I'll definitely be keeping an eye on this. Do you intend on turning this into a book and perhaps publishing physical copies?
No I don't think so, I just want to an informative resource from what I've learned.
https://leanpub.com/authors
I actually assumed you were making a LeanPub book, and was considering buying the work in progress.https://en.wikipedia.org/wiki/Not_Another_Completely_Heurist...
3rd year OS class we had to use Nachos as our base OS and build your usual file management, pipes etc. functionality on top of it.
Really taught you how an OS works.
There are many like it but this one is mine: https://github.com/rikusalminen/danjeros
It's an x86_64 bare bones kernel project, doesn't do much except for boot and handle some interrupts. There's a little multitasking and some related stuff.
Unfortunately there's only a finite amount of time in the world, and not too much of it is available for me to dedicate to this project.
* http://www.jamesmolloy.co.uk/tutorial_html/index.html
* http://www.osdever.net/tutorials/view/brans-kernel-developme...
* https://github.com/klange/toaruos
...and just in case anyone is curious, my own project (about half way through James M's tutorial - working on virtual memory management):
https://github.com/slunk/Hobbyos
Oh, and btw, this looks AWESOME. I am looking through the finished chapters right now!
http://pdos.csail.mit.edu/6.828/2012/xv6.html
(Although if you want to run the original Unix v6, written in a now-archaic proto-C --- unsigned integer variables are declared as pointers because "unsigned" itself wasn't directly supported in the language yet --- PDP-11 emulators and system images are readily available.)