High Quality
Open the downloaded document, and select print from the file menu (PDF reader required).
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....................................................................................................12
2.1 Task Structure and Process Table....................................................................................................12
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..................................................................................................................................24
2.7 Bottom Halves.................................................................................................................................24
2.8 Task Queues.....................................................................................................................................25
2.9 Tasklets............................................................................................................................................26
2.10 Softirqs...........................................................................................................................................26
2.11 How System Calls Are Implemented on i386 Architecture?.........................................................26
2.12 Atomic Operations.........................................................................................................................27
2.13 Spinlocks, Read−write Spinlocks and Big−Reader Spinlocks......................................................28
2.14 Semaphores and read/write Semaphores.......................................................................................30
2.15 Kernel Support for Loading Modules............................................................................................31
3. Virtual Filesystem (VFS)...................................................................................................................34
3.1 Inode Caches and Interaction with Dcache......................................................................................34
3.2 Filesystem Registration/Unregistration...........................................................................................37
3.3 File Descriptor Management............................................................................................................39
3.4 File Structure Management..............................................................................................................40
3.5 Superblock and Mountpoint Management.......................................................................................43
3.6 Example Virtual Filesystem: pipefs.................................................................................................46
3.7 Example Disk Filesystem: BFS.......................................................................................................48
3.8 Execution Domains and Binary Formats.........................................................................................50
4. Linux Page Cache..............................................................................................................................51
5. IPC mechanisms................................................................................................................................54
5.1 Semaphores.....................................................................................................................................54
Semaphore System Call Interfaces..........................................................................................54
sys_semget()............................................................................................................................54
sys_semctl().............................................................................................................................54
sys_semop().............................................................................................................................54
Non−blocking Semaphore Operations.....................................................................................55
Failing Semaphore Operations.................................................................................................55
Blocking Semaphore Operations.............................................................................................55
Semaphore Specific Support Structures..................................................................................56
struct sem_array.......................................................................................................................56
struct sem.................................................................................................................................56
struct seminfo...........................................................................................................................56
struct semid64_ds....................................................................................................................57
struct sem_queue......................................................................................................................57
struct sembuf............................................................................................................................57
struct sem_undo.......................................................................................................................58
Semaphore Support Functions.................................................................................................58
newary()...................................................................................................................................58
freeary()...................................................................................................................................58
semctl_down().........................................................................................................................59
IPC_RMID...............................................................................................................................59
IPC_SET..................................................................................................................................59
semctl_nolock().......................................................................................................................59
IPC_INFO and SEM_INFO.....................................................................................................59
SEM_STAT.............................................................................................................................59
semctl_main()..........................................................................................................................59
GETALL..................................................................................................................................59
SETALL...................................................................................................................................59
IPC_STAT...............................................................................................................................60
GETVAL.................................................................................................................................60
GETPID...................................................................................................................................60
GETNCNT...............................................................................................................................60
GETZCNT...............................................................................................................................60
SETVAL..................................................................................................................................60
count_semncnt().......................................................................................................................61
count_semzcnt().......................................................................................................................61
update_queue().........................................................................................................................61
try_atomic_semop().................................................................................................................61
sem_revalidate().......................................................................................................................62
freeundos()...............................................................................................................................62
alloc_undo().............................................................................................................................62
sem_exit()................................................................................................................................62
5.2 Message queues..............................................................................................................................62
Message System Call Interfaces..............................................................................................63
sys_msgget()............................................................................................................................63
sys_msgctl().............................................................................................................................63
IPC_INFO ( or MSG_INFO)...................................................................................................63
IPC_STAT ( or MSG_STAT)..................................................................................................63
IPC_SET..................................................................................................................................63
IPC_RMID...............................................................................................................................63
sys_msgsnd()...........................................................................................................................64
sys_msgrcv()............................................................................................................................64
Add a Comment