Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
is it C or C++ programming is used to create the whole linux?
i also wonder, what microsoft used to create windows?
i learned C and C++,
how can that language create something so great?
C and lots, and lots of time with plenty of help from the community. No one person created Linux, Windows is broken creating a broken OS isn't too hard
just wonder how can C created so powerful OS?
the C we learn in school of course is not able to do it, right?
Even knowing the whole book of C written by Deitel, can u do it?
Is it Advanced Learner's C? OR something else not in the book ?
the C we learn in school of course is not able to do it, right?
Of course. C is C.
I don't know what you learned in school, but probably they did not spend too much time on advanced memory management or low-level hardware control, or any of the other thousands of issues you must master to develop a usable OS.
If you want to see how it is done, well, the kernel source is out there for you to read at your leisure.
It should also be noted that the linux kernel is not strictly C, some of the architecture specific details are actually written in assembly, see for example /usr/src/linux/arch/i386/boot/setup.S which grabs info from the BIOS...
Well. I know how to cut my hand using a scalpel, but don't really excell in brain surgery
Basic understanding of tools is just the very beginning of it.
I would that there is really a very practical reason why C++ is not used in kernel space. These are powerful and convenient languages, but they require a lot of "runtime library" support to do what they do. These languages are designed to run in an operating-system environment, with a slew of lower level routines, exception-handling support, and so on. Since the kernel is in the business of providing these niceities to its clients, it doesn't have many of them for itself. The environment in which the kernel runs is much more austere.
There are a lot of "object-style" implementations to be found throughout the kernel, such as (for example) the device-driver interface and filesystem-driver interfaces; they are simply implemented "by hand." And they are stripped-down, minimal, as is all of the kernel. It is critical for any kernel coder to always know exactly what will happen when her code is executed on the machine.
In a lot of ways, the kernel consists of a bunch of over-glorified subroutines, responding endlessly to system-calls and other interrupts. It's not a huge program by any means, although it is complicated. It's designed to be small and fast, and sturdy, "no matter what." But it is, always, only the nucleus of what's going on. It is only "the system control program," master of the hardware and thus inextricably tied to it. Most of what you think of as "the Linux system/environment" is actually found in sharedlibraries which are wrapped-around the kernel, so to speak. And you are quite free to use C++ or anything-else-you-like there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.