Полезная информация Вопрос как установить пароль на папку решается легко.

next up previous contents
Next: How the kernel sees Up: Tour of the kernel Previous: Booting the system

Spinning the wheel

After dealing with all the tricky questions, start_kernel() initializes all the parts of the kernel, specifically:

Finally, the kernel is ready to move_to_user_mode(), in order to fork the init process, whose code is in the same source file. Process number 0 then, the so-called idle task, keeps running in an infinite idle loop.

The init process tries to execute /etc/init, or /bin/init, or /sbin/init.

If none of them succeeds, code is provided to execute ``/bin/sh /etc/rc'' and fork a root shell on the first terminal. This code dates back to 0.01, when the OS was made by the kernel alone, and no login process was available.

After exec()ing the init program from one of the standard places (let's assume we have one of them), the kernel has no direct control on the program flow. Its role, from now on is to provide processes with system calls, as well as servicing asynchronous events (such as hardware interrupts). Multitasking has been setup, and it is now init who manages multiuser access by fork()ing system daemons and login processes.

Being the kernel in charge of providing services, the tour will proceed by looking at those services (the ``system calls''), as well as by providing general ideas about the underlying data structures and code organization.



Converted on:
Mon Apr 1 10:20:16 EST 1996