Tag Info

Hot answers tagged

58

According to cloc run against 3.13, Linux is about 12 million lines of code. 7 million LOC in drivers/ 2 million LOC in arch/ only 139 thousand LOC in kernel/ lsmod | wc on my Debian laptop shows 158 modules loaded at runtime, so dynamically loading modules is a well-used way of supporting hardware. The robust configuration system (e.g. make menuconfig) ...


38

For anyone curious, here's the linecount breakdown for the GitHub mirror: ============================================= Item Lines % ============================================= ./usr 845 0.0042 ./init 5,739 0.0283 ./samples 8,758 0.0432 ./ipc 8,926 ...


37

The answers so far seem to be "yes there is lots of code" and nobody is tackling the question with the most logical answer: 15M+? SO WHAT? What does 15M lines of source code have to do with the price of fish? What makes this so unimaginable? Linux clearly does lots. Lots more than anything else... But some of your points show you don't respect what's ...


16

The "Everything is a file" phrase defines the architecture of the operating system. It means that everything in the system from processes, files, directories, sockets, pipes, ... is represented by a file descriptor abstracted over the virtual filesystem layer in the kernel. The virtual filesytem is an interface provided by the kernel. Hence the phrase was ...


15

Drivers are maintained in-kernel so when a kernel change requires a global search-and-replace (or search-and-hand-modify) for all users of a function, it gets done by the person making the change. Having your driver updated by people making API changes is a very nice advantage, instead of having to do it yourself when it doesn't compile on a more recent ...


13

tinyconfig bubble graph svg (fiddle) shell script to create the json from the kernel build, use with http://bl.ocks.org/mbostock/4063269 Edit: turned out unifdef have some limitation (-I is ignored and -include unsupported, the latter is used to include the generated configuration header) at this point using cat doesn't change much: 274692 total # ...


6

There is no original GNU/Linux operating system. Linux is the kernel and GNU is the operating system. A Linux distribution is created when users combine the Linux kernel with the essential tools that run an operating system. Some History in a Nutshell GNU set out to make a free UNIX-like operating system in 1983. By the early 1990's, GNU had all of the ...


6

The tradeoffs of monolithic kernels were debated between Tananbaum and Torvalds in public from the very beginning. If you don't need to cross into userspace for everything, then the interface to the kernel can be simpler. If the kernel is monolithic, then it can be more optimized (and more messy!) internally. We have had modules as a compromise for ...


4

The nice value will not tell you anything about the actual cpu load, a process produces. Nice-ness is just what you would think: the way, a process behaves under certain work loads. To be more exact: if a process with a high nice-value (==lower scheduling propability) is scheduled, it WILL hold the cpu, until a process with lower nice-value and/or ...


4

You might also be interested in looking at what is called 'Free GNU/Linux distributions', the distributions that are endorsed by GNU community and that completely follow the GNU Public License. http://www.gnu.org/distros/free-distros.html


3

Your shell is smart enough to know that cd will not work with file parameters. So when you hit tab it only shows things in that directory that will work with cd.


3

Regarding user names, the kernel don't need (and don't care about) them, since it is dealing only with numerical user ids (the uid 0, a.k.a. root, may have special status). See credentials(7) & capabilities(7) Conversion from user names to user ids is done by libc functions like getpwnam(3). The libc may access files (notably /etc/passwd) for that, see ...


3

In general, a Linux kernel doesn't open files on its own behalf (rather than on behalf of processes). Even /sbin/init (or the 'init' program specified on the kernel command line) is exec()ed by a process (process 1 is constructed directly from an image inside the kernel, IIRC). At one time, kernel modules requiring firmware would directly open the firmware ...


2

A lot of processes in your system are just sitting and waiting for something to happen. This is what most server processors or daemons do (e.g. ssh, mail, X). If you are working in a word processor, it just sits and waits until you click somewhere or type something. Most of the time the process is not scheduled and uses a very low amount of CPU time. You ...


2

Linux is the kernel. This connects you to the hardware of your system. GNU (GNU is Not Unix). Here are the essential libre tools you're interested in. After combining the two parts one gets a "distribution" or "flavor" of Linux, aka GNU/Linux to some. Perhaps one approximation of what you seek is the GNU/Hurd. https://www.gnu.org/software/hurd/hurd.html ...


1

Most laptops require pressing Fn to get the SysRq key. Pressing Fn usually doesn't affect the Alt key (at least the left one) but may affect the letter that you press after SysRq. Fortunately, you don't need to press SysRq and the third key together, it's enough to hold Alt down. The following sequence works on all the laptops I've seen: Press and hold ...


1

Downgrades are a lot more dangerous than upgrades. You would probably have to switch repository to older version, remove some packages and run dist-upgrade. However, from my limited experience of downgrading on Debian, I'd say it's a lot easier to just backup your data, and then install your programs again - especially if you don't know how to fix things. ...


1

cd is a builtin of bash. TAB completion is a controlled by bash options, you can find various completion script in /usr/share/bash-completion/bash_completion and /etc/bash_completion.d. cd's completion method is defined in the former one. As cd only works on directory, it's natural to only list available directory. Everything is file in linux.


1

Probably it depends on the video mode and zero page (struct bootparam, documented here, it also includes struct screen_info) setup prepared by a bootloader (GRUB) and BIOS. bootparam is passed to decompress_kernel() as the first argument. The actual function of debug_putstr() is __putstr() (Note that it's enabled only when CONFIG_X86_VERBOSE_BOOTUP is ...


1

You need to use the "old-releases" archive for Natty Narwhal; replace archive.linux.duke.edu with old-releases.ubuntu.com in your sources.list file, then run sudo apt-get update, and you should be able to install the packages. As Huygens suggests though, you should really upgrade to a supported version of Ubuntu.


1

Natty Narwhal is no longer supported by Ubuntu. So you can't use apt-get to install ncurses. You have the following choices: upgrade to a supported version of Ununtu. But as your version is no longer supported, you can't easily upgrade in-place but would rather need to install over. So backup!!! install ncurses from sources. Get the source and compile ...


1

Taken from GNU's website:     "The GNU system contains all of the official GNU software packages, and also includes non-GNU free software, notably TeX and the X Window System. Also, the GNU system is not a single static set of programs; users and distributors may select different packages according to their needs and desires. The result ...


1

wait4 is a syscall indicating the process is waiting for one of his child termination. This may points some issue with the signal handling. A bit brutal, but you may try to kill the hierarchy of the app : kill -15 -$YourRedisPID. The - before the PID means "the PID and its children". As it seems to be waiting for a child termination, it may unlock it. If ...


1

The 80386 supports paging in addition to memory segmentation while the 286 supports only memory segmentation. Linux heavily depends on paging support i.e., uses a flat memory scheme which basically sets all the segment registers to 0 and uses paging to manage applications. In order to port Linux to the 286, the fundamental memory manager needs a complete ...



Only top voted, non community-wiki answers of a minimum length are eligible