Modern Age: The start_kernel( ) Function

The start_kernel( ) function completes the initialization of the Linux kernel. Nearly every kernel component is initialized by this function; we mention just a few of them:

  • The page tables are initialized by invoking the paging_init( ) function (see Section 2.5.5 in Chapter 2).

  • The page descriptors are initialized by the mem_init( ) function (see Section 6.1 in Chapter 6).

  • The final initialization of the IDT is performed by invoking trap_init( ) (see the section Section 4.5 in Chapter 4) and init_IRQ( ) (see Section 4.6.2 in Chapter 4).

  • The slab allocator is initialized by the kmem_cache_init( ) and kmem_cache_sizes_init( ) functions (see Section 6.2.4 in Chapter 6).

  • The system date and time are initialized by the time_init( ) function (see Section 5.1.1 in Chapter 5).

  • The kernel thread for process 1 is created by invoking the kernel_thread( ) function. In turn, this kernel thread creates the other kernel threads and executes the /sbin/init program, as described in Section 3.3.2 in Chapter 3.

Besides the "Linux version 2.2.14 . . . " message, which is displayed right after the beginning of start_kernel( ), many other messages are displayed in this last phase both by the init functions and by the kernel threads. At the end, the familiar login prompt appears on the console (or in the graphical screen if the X Window System is launched at startup), telling the user that the Linux kernel is up and running.

Get Understanding the Linux Kernel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.