This topic is really big, just have a general understanding, if the detailed analysis is very difficult, roughly speaking, an operating system consists of: process scheduling, memory management, device driver, file system, network, where process scheduling requires CPU, memory management needs RAM, file system access needs memory (such as hard disk, NAND flash, etc.), network access requires NIC, Linux system from bottom to bottom overall:
For an application, if a hardware operation is involved, then follow the steps in turn, and the application layer will first invoke the functions provided by the C library (such as open, read, write), and then these actions will trigger a soft interrupt (Swi interrupt) to enter the kernel space (Kernel spaces), Due to the interface of the VFS (vitual file system) provided by the kernel, the device driver is called in turn, which implements the operation of the hardware, taking the application layer operation LED hardware as an example, the following operations are performed in turn:
Follow the code to analyze the process in detail, and this will not be said
Linux device-driven overall architecture