Linux Kernel 2.4 Internals Linux Kernel 2.4 Internals Table of Contents

Linux Kernel 2.4 Internals Linux Kernel 2.4 Internals Table of Contents

Linux Kernel 2.4 Internals Linux Kernel 2.4 Internals Table of Contents Linux Kernel 2.4 Internals.................................................................................................................................1 Tigran Aivazian tigran@veritas.com.......................................................................................................1 1. Booting.................................................................................................................................................1 2. Process and Interrupt Management......................................................................................................1 3. Virtual Filesystem (VFS).....................................................................................................................2 4. Linux Page Cache................................................................................................................................2 5. IPC mechanisms..................................................................................................................................2 1. Booting.................................................................................................................................................2 1.1 Building the Linux Kernel Image......................................................................................................2 1.2 Booting: Overview.............................................................................................................................3 1.3 Booting: BIOS POST.........................................................................................................................4 1.4 Booting: bootsector and setup............................................................................................................4 1.5 Using LILO as a bootloader...............................................................................................................7 1.6 High level initialisation......................................................................................................................7 1.7 SMP Bootup on x86...........................................................................................................................9 1.8 Freeing initialisation data and code...................................................................................................9 1.9 Processing kernel command line.....................................................................................................10 2. Process and Interrupt Management....................................................................................................11 2.1 Task Structure and Process Table....................................................................................................11 2.2 Creation and termination of tasks and kernel threads......................................................................15 2.3 Linux Scheduler...............................................................................................................................17 2.4 Linux linked list implementation.....................................................................................................19 2.5 Wait Queues.....................................................................................................................................21 2.6 Kernel Timers..................................................................................................................................23 2.7 Bottom Halves.................................................................................................................................23 2.8 Task Queues.....................................................................................................................................24 2.9 Tasklets............................................................................................................................................25 2.10 Softirqs...........................................................................................................................................25 2.11 How System Calls Are Implemented on i386 Architecture?.........................................................25 2.12 Atomic Operations.........................................................................................................................26 2.13 Spinlocks, Read−write Spinlocks and Big−Reader Spinlocks......................................................27 2.14 Semaphores and read/write Semaphores.......................................................................................29 2.15 Kernel Support for Loading Modules............................................................................................30 3. Virtual Filesystem (VFS)...................................................................................................................33 3.1 Inode Caches and Interaction with Dcache......................................................................................33 3.2 Filesystem Registration/Unregistration...........................................................................................36 3.3 File Descriptor Management............................................................................................................38 3.4 File Structure Management..............................................................................................................39 3.5 Superblock and Mountpoint Management.......................................................................................42 3.6 Example Virtual Filesystem: pipefs.................................................................................................45 3.7 Example Disk Filesystem: BFS.......................................................................................................47 3.8 Execution Domains and Binary Formats.........................................................................................48 4. Linux Page Cache..............................................................................................................................50 5. IPC mechanisms................................................................................................................................52 5.1 Semaphores.....................................................................................................................................52 Semaphore System Call Interfaces.................................................................................................53 sys_semget()...................................................................................................................................53 sys_semctl()....................................................................................................................................53 i Linux Kernel 2.4 Internals Table of Contents Linux Kernel 2.4 Internals sys_semop().............................................................................................................................53 Non−blocking Semaphore Operations...........................................................................................53 Failing Semaphore Operations.......................................................................................................54 Blocking Semaphore Operations....................................................................................................54 Semaphore Specific Support Structures.........................................................................................55 struct sem_array.............................................................................................................................55 struct sem........................................................................................................................................55 struct seminfo.................................................................................................................................55 struct semid64_ds...........................................................................................................................55 struct sem_queue............................................................................................................................56 struct sembuf..................................................................................................................................56 struct sem_undo..............................................................................................................................56 Semaphore Support Functions........................................................................................................56 newary()..........................................................................................................................................57 freeary()..........................................................................................................................................57 semctl_down()................................................................................................................................57 IPC_RMID.....................................................................................................................................57 IPC_SET.........................................................................................................................................57 semctl_nolock()..............................................................................................................................58

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    82 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us