• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
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\u2212write Spinlocks and Big\u2212Reader 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

Linux Kernel 2.4 Internals
i
Table of Contents
Linux Kernel 2.4 Internals

sys_semop().............................................................................................................................53
Non\u2212blocking 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
IPC_INFO and SEM_INFO...........................................................................................................58
SEM_STAT....................................................................................................................................58
semctl_main().................................................................................................................................58
GETALL........................................................................................................................................58
SETALL.........................................................................................................................................58
IPC_STAT......................................................................................................................................59
GETVAL........................................................................................................................................59
GETPID..........................................................................................................................................59
GETNCNT.....................................................................................................................................59
GETZCNT......................................................................................................................................59
SETVAL.........................................................................................................................................59
count_semncnt().............................................................................................................................59
count_semzcnt().............................................................................................................................59
update_queue()...............................................................................................................................59
try_atomic_semop()........................................................................................................................60
sem_revalidate().............................................................................................................................60
freeundos()......................................................................................................................................60
alloc_undo()....................................................................................................................................61
sem_exit().......................................................................................................................................61
5.2 Message queues..............................................................................................................................61
Message System Call Interfaces.....................................................................................................61
sys_msgget()...................................................................................................................................61
sys_msgctl()....................................................................................................................................62
IPC_INFO ( or MSG_INFO).........................................................................................................62
IPC_STAT ( or MSG_STAT)........................................................................................................62
IPC_SET.........................................................................................................................................62
IPC_RMID.....................................................................................................................................62
sys_msgsnd()..................................................................................................................................62

Linux Kernel 2.4 Internals
ii
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...