Hacker News new | ask | show | jobs
by witnesser 1415 days ago
I have a long time question. All interruptions in docker container are supposed to be soft interruption, that means different than a network io events backed up by physical hardware. Correct me if wrong. I remember a professor explaining soft/hard interrupt, if you don't handle my events, I wont' turn off that red LED. Given so. Do we observe exceptional amount of signal missings in a container? If true, how they are handled?

My understanding, interruptions is in essence signal processing. hard means hardware chip guartantee the reliablity. soft means signal are just memory address that can be easy wiped out.

1 comments

Docker containers don't have their own kernels. They share the kernel with the host operating system, and the host kernel handles interrupts. The Docker container is just a group of processes started in a particular way so they have a different view of the filesystem, the network, and so forth. Like any other userspace process, they get UNIX signals, but they don't get hardware interrupts, which are handled by the kernel.

For this project, in order to have a kernel to debug, they run a separate kernel inside the qemu virtual machine emulator. qemu is a normal userspace process, and therefore that process can run inside a Docker container. So the kernel being debugged has interrupts, but the "hardware" generating those interrupts (and all the other "hardware," including the CPU itself) is all just software emulating a PC.