4 ms·
There are some numbers available on Wikipedia[0]. Comparing with Windows is especially difficult though, because there is no differentiation between the kernel
by ch0wn 15y ago
There are some numbers available on Wikipedia[0]. Comparing with Windows is especially difficult though, because there is no differentiation between the kernel and graphical systems or system tools.
[0] http://en.wikipedia.org/wiki/Source_lines_of_code#Example http://en.wikipedia.org/wiki/Source_lines_of_code#Example
- obtu 15y agoOn the other end of the scale, the Debian lenny archive (released in 2009, superseded by squeeze) totals about 324M lines of non-comment code: http://gsyc.es/~frivas/paper.pdf http://gsyc.es/~frivas/paper.pdf
- 4ad 15y agoI've worked on Windows. I never really did a thorough analysis, but I'd say kernel mode components total around 3MLOC (out of ~50MLOC total). Definitely smaller than Linux.
- __alexs 15y agoPresumably there aren't all that many device drivers in there though? I'd imagine that mostly lived off in a WHQL repo or something in a different department.
- 4ad 15y agoDrivers made by Microsoft are in the tree. WHQL'ed 3rd party drivers offered by Windows Update are somewhere else, but there's no source for those so it's hard to count lines of code. On a typical computer more than half of the drivers loaded are made by Microsoft, you can check easily with sysinternals' autoruns.
- rplnt 15y agoAnd they are in the kernel? What are dozens of .sys files in drivers folder then?
- sciurus 15y agoI've got a lot of .ko files in /lib/modules; that doesn't mean they aren't part of the kernel.
- Someone 15y agoThere are at least three different definitions of "in the kernel": - code that compiles to the single executable file that runs the OS (this can be limited to a mechanism for booting the system, a thread scheduler, basic memory allocator, but this may also contain some device drivers, file systems, etc) - any code that compiles to anything that will run in kernel mode (many file systems and device drivers) - the code that someone (say the people distributing what they call "the Linux kernel") call the kernel. This count is about the third. I do not think it contains a kitchen sink, but it is close :-)
- easp 15y agoLinux supports a wider range of hardware than Windows.
- dhughes 15y agoThanks, I was just going to ask what is considered a line it sounds silly but I couldn't understand if a "line" was the full length of a screen at a certain resolution no matter if it was filled with characters. I know a space (spacebar) is a character too but not the blank space before you enter space character. I'm not a programmer but I know you can cram certain methods, functions onto one line instead of arranging it on separate lines for easier comprehension by other programmers. As well comments and blank lines would add a lot depending on the style of the programmers doing it and if a blank line is considered a line. Logical SLOC and physical SLOC make sense.