Questions tagged [kernel]

In computing, the kernel is a computer program that manages input/output requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system. This tag is for general questions regarding code that runs in the context of an operating system kernel.

This tag is for general questions regarding code that runs in the context of an operating system kernel (kernelspace, as opposed to userspace), including writing custom kernels. Questions about specific kernels should use a relevant tag (eg. , , ).

This tag is not about other uses of the word "kernel" - for example, questions about CUDA kernels should use the tag.

SOURCE

Wikipedia

9344 questions
55
votes
4 answers

How do I configure modprobe to find my module?

I'm trying to get a kernel module to load at boot. If I run insmod /path/to/module.ko, it works fine. But this has to be repeated every time I reboot. If I run modprobe /path/to/module.ko, it can't find the module. I know modprobe uses a…
sep332
  • 1,039
  • 2
  • 13
  • 24
54
votes
4 answers

How does Linux determine the next PID?

How does Linux determine the next PID it will use for a process? The purpose of this question is to better understand the Linux kernel. Don't be afraid to post kernel source code. If PIDs are allocated sequentially how does Linux fill in the…
rook
  • 66,304
  • 38
  • 162
  • 239
52
votes
5 answers

How does the linux kernel manage less than 1GB physical memory?

I'm learning the linux kernel internals and while reading "Understanding Linux Kernel", quite a few memory related questions struck me. One of them is, how the Linux kernel handles the memory mapping if the physical memory of say only 512 MB is…
TheLoneJoker
  • 1,589
  • 1
  • 23
  • 36
50
votes
6 answers

Getting iOS system uptime, that doesn't pause when asleep

I'm looking for a way to get an absolute, always-incrementing system uptime on iOS. It should return the time since the device was last rebooted, and not be affected by changes to the system date. All the methods I can find either pause when the…
Russell Quinn
  • 1,330
  • 1
  • 11
  • 14
49
votes
1 answer

How does Docker for Windows run Linux containers?

In the old versions of Docker for Windows, I remember it explicitly said it used a linux VM for the kernel. But since the new stable version (released in July 2016 I think), it says Docker for Windows is a native Windows application with a native…
MrVoodoo
  • 1,042
  • 1
  • 15
  • 25
49
votes
1 answer

What is kthreadd process and children and how it is different from init and children

I wanted to know what is kthread and why it does not take any memory and has no open files. I wrote some code which will simply print the PID of the currently running processes in a parent child tree format along with some additional information…
phoxis
  • 60,131
  • 14
  • 81
  • 117
48
votes
5 answers

Relationship between a kernel and a user thread

Is there a relationship between a kernel and a user thread? Some operating system textbooks said that "maps one (many) user thread to one (many) kernel thread". What does map means here?
Pwn
  • 3,387
  • 11
  • 38
  • 42
48
votes
9 answers

What kind of C is an operating system written in?

It makes sense that something like an operating system would be written in C. But how much of it, and what kind of C? I mean, in C, if you needed some heap memory, you would call malloc. But, does an OS even have a heap? As far as I know, malloc…
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
46
votes
4 answers

How do I programmatically disable hardware prefetching?

I would like to programmatically disable hardware prefetching. From Optimizing Application Performance on Intel® Core™ Microarchitecture Using Hardware-Implemented Prefetchers and How to Choose between Hardware and Software Prefetch on 32-Bit…
Carlos
  • 1,455
  • 2
  • 14
  • 15
46
votes
1 answer

What's in include/uapi of kernel source project

Can someone please give me a document to describe the kernel source folders about their structure, functionality and how they are organized? Specifically, what's the use of of the folder include/uapi/**? Thanks.
Qylin
  • 1,501
  • 1
  • 16
  • 26
46
votes
9 answers

How can I programmatically manage iptables rules on the fly?

I need to query existing rules, as well as being able to easily add and delete rules. I haven't found any API's for doing this. Is there something that I'm missing? The closest I've come to a solution is using iptables-save | iptables-xml for…
Ycros
  • 1,720
  • 2
  • 14
  • 10
45
votes
7 answers

Reset ipython kernel

I was wondering if there is a way to restart the ipython kernel without closing it, like the kernel restart function that exists in the notebook. I tried %reset but that doesn't seem to clear the imports.
greole
  • 4,523
  • 5
  • 29
  • 49
45
votes
1 answer

What does "proto kernel" means in Unix Routing Table?

I've been searching this in linux-ip.net and the whole internet but does appears nothing. What does the "proto kernel" part means in a Routing Table? Just an example: [root@tristan]# ip route show table local local 192.168.99.35 dev eth0 proto…
Alejandro Sanz Díaz
  • 7,842
  • 4
  • 17
  • 23
43
votes
8 answers

Install Python 3.8 kernel in Google Colaboratory

I try to install a new Python version (3.8) using conda. !wget -O mini.sh https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh !chmod +x mini.sh !bash ./mini.sh -b -f -p /usr/local This works fine. I can call !python script.py…
korakot
  • 37,818
  • 16
  • 123
  • 144
41
votes
3 answers

Mac OS X virtual audio driver

I want to create a virtual audio device that gets audio data from the default output (which is an output IOAudioStream) and converts it to an input IOAudioStream. I went through most of the examples I could find, however they only implement a…
UpL1nK
  • 559
  • 1
  • 6
  • 14