Differences

This shows you the differences between two versions of the page.

linux-kernel-internals-2013-2014 [2014/02/22 13:00] (current)
segoon created
Line 1: Line 1:
 +===== Спецкурс "Внутреннее устройство ядра Линукс" =====
 +Проходит в 16-20 по вторникам в аудитории 779.
 +
 +Лекторы: доцент Столяров Андрей Викторович, аспирант Куликов Василий Владимирович (segooon AT gmail.com).
 +
 +По окончании курса предполагается сдача экзамена.
 +
 +==== Описание ====
 +
 +В курсе рассматриваются основы архитектуры ядра Linux, его модель разработки, типовые проблемы, с которыми сталкивается программист ядра, методы их решения.  Основные темы: задачи ОС, адресное пространство процесса, взаимодействие между режимом ядра и пользователя, синхронизация, планирование и контекст выполнения, виртуальная файловая система, загрузка ядра.
 +
 +==== Лекции ====
 +
 +Предполагаемый список тем:
 +
 +  - Роль операционной системы.
 +  - Общая информация о Linux.
 +  - Адресное пространство процесса.
 +  - Режим пользователя и супервизора.
 +  - Синхронизация и синхронизационные примитивы.
 +  - Модули ядра.
 +  - Единицы планирования и контекст исполнения.
 +  - Виртуальная файловая система.
 +  - Загрузка ОС.
 +
 +
 +==== Рекомендуемая литература и сетевые источники ====
 +
 +  * Д. Бовет, М. Чезати.  Ядро Linux. Издательство: БХВ-Петербург.  (англ.: Understanding the Linux Kernel) (http://www.ozon.ru/context/detail/id/3589107/)
 +  * Robert Love.  Linux Kernel Development (3rd Edition).  Publisher: Addison-Wesley Professional  (http://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/0672329468)
 +  * Michael Kerrisk.  The Linux Programming Interface.  Publisher: No Starch Press.  http://man7.org/tlpi/
 +  * Linux: сетевая архитектура. Структура и реализация сетевых протоколов в ядре. Издательство: КУДИЦ-Образ.  (http://www.ozon.ru/context/detail/id/2441431/)
 +  * Intel® 64 and IA-32 Architectures Software Developer Manuals (http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html)
 +  * https://www.kernel.org/
 +  * https://lkml.org/
 +  * https://lwn.net/
 +  * http://kernelnewbies.org/
 +
 +=== Литература и материалы к лекции 3 (адресное пространство процесса) ===
 +
 +  * Ядро Linux (Главы 2, 9).
 +  * Linux Kernel Development (Глава 15).
 +  * The Linux Programming Interface (Глава 49).
 +  * Intel® 64 and IA-32 Architectures Software Developer Manuals (Глава 4).
 +  * [[http://manpages.ubuntu.com/manpages/precise/en/man5/proc.5.html|proc(5)]].
 +  * Системные вызовы: [[http://manpages.ubuntu.com/manpages/precise/en/man2/mmap.2.html|mmap(2)]], [[http://manpages.ubuntu.com/manpages/precise/en/man2/mprotect.2.html|mprotect(2)]], [[http://manpages.ubuntu.com/manpages/precise/en/man2/brk.2.html|brk(2)]], [[http://manpages.ubuntu.com/manpages/precise/en/man2/ipc.2.html|ipc(2)]].
 +  * Структуры и функции ядра: [[https://github.com/torvalds/linux/blob/v3.8/include/linux/mm_types.h#L324|mm_struct]],     [[https://github.com/torvalds/linux/blob/v3.8/include/linux/mm_types.h#L227|vm_area_struct]],    [[https://github.com/torvalds/linux/blob/v3.8/include/linux/mm.h#L191|vm_operations_struct]],    [[https://github.com/torvalds/linux/blob/v3.8/arch/x86/mm/fault.c#L1005|__do_page_fault]],     [[https://github.com/torvalds/linux/blob/v3.8/mm/memory.c#L3672|handle_mm_fault]].
 +
 +=== Литература и материалы к лекции 4 (Режим пользователя и супервизора) ===
 +
 +  * Ядро Linux (Глава 4).
 +  * Linux Kernel Development (Глава 5).
 +  * Intel® 64 and IA-32 Architectures Software Developer Manuals (Главы 5, 6).
 +  * [[https://github.com/torvalds/linux/blob/v3.8/arch/x86/kernel/entry_64.S#L576|system_call]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/arch/x86/include/asm/uaccess.h#L161|get_user()]], [[https://github.com/torvalds/linux/blob/v3.8/arch/x86/mm/extable.c#L17|fixup_exception()]]
 +
 +=== Литература и материалы к лекции 5 (Синхронизация и синхронизационные примитивы) ===
 +
 +  * Ядро Linux (Глава 5).
 +  * Linux Kernel Development (Глава 15).
 +  * Intel® 64 and IA-32 Architectures Software Developer Manuals (Глава 8, 8.1-8.3).
 +  * Примитивы: [[https://github.com/torvalds/linux/blob/v3.8/Documentation/atomic_ops.txt|atomic_t, barriers]], [[https://github.com/torvalds/linux/blob/v3.8/Documentation/spinlocks.txt|spinlock_t]], [[https://github.com/torvalds/linux/blob/v3.8/Documentation/mutex-design.txt#L116|mutex]]
 +  * RCU:
 +    * [[https://github.com/torvalds/linux/blob/v3.8/Documentation/RCU/rcu.txt]]
 +    * [[https://lwn.net/Articles/262464/]]
 +    * [[https://lwn.net/Kernel/Index/#Read-copy-update]]
 +
 +=== Литература и материалы к лекции 6 (модули ядра) ===
 +
 +  * Ядро Linux (Приложение 2)
 +  * Linux Kernel Development (Глава 17, Глава 6)
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/module.h#L100|MODULE_LICENSE,MODULE_AUTHOR,MODULE_DESCRIPTION]]
 +
 +=== Литература и материалы к лекции 7 (контекст исполнения и единицы планирования) ===
 +
 +  * Ядро Linux (Глава 3, Глава 4)
 +  * Linux Kernel Development (Глава 3, Глава 7, Глава 8)
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/sched.h#L144|process states (TASK_XXX)]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/sched.h#L1238|struct task_struct]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/interrupt.h#L412|XXX_SOFTIRQ]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/interrupt.h#L450|raise_softirq*()]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/interrupt.h#L446|open_softirq()]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/kthread.h#L22|kthread_run()]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/kthread.h#L41|kthread_stop()]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/kthread.h#L42|kthread_should_stop()]], [[https://github.com/torvalds/linux/blob/v3.8/kernel/kthread.c#L143|kthreadd()]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/interrupt.h#L129|request_irq()]]
 +
 +=== Литература и материалы к лекции 8 (виртуальная файловая система) ===
 +
 +  * Ядро Linux (Глава 12, Глава 14)
 +  * Linux Kernel Development (Глава 13, Глава 14)
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs_struct.h#L8|struct fs_struct]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fdtable.h#L46|struct files_struct]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L761|struct file]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L1515|struct file_operations]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L521|struct inode]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L1546|struct inode_operations]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/dcache.h#L103|struct dentry]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L406|struct address_space]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L1234|struct super_block]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L1590|struct super_operations]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L1802|struct file_system_type]], [[https://github.com/torvalds/linux/blob/v3.8/include/linux/fs.h#L431|struct block_device]]
 +
 +=== Литература и материалы к лекции 9 (загрузка ОС) ===
 +
 +  * Ядро Linux (Приложение 1)
 +  * [[https://github.com/torvalds/linux/blob/v3.8/init/main.c#L468|start_kernel()]], [[https://github.com/torvalds/linux/blob/v3.8/init/main.c#L807|kernel_init()]], [[https://github.com/torvalds/linux/blob/v3.8/Documentation/init.txt|init errors]]
 +  * [[https://github.com/torvalds/linux/blob/v3.8/Documentation/initrd.txt|initrd]], [[https://github.com/torvalds/linux/blob/v3.8/Documentation/x86/boot.txt|boot header]]
 +  * [[http://devicetree.org/Device_Tree_Usage|device tree here]], [[https://github.com/torvalds/linux/blob/v3.8/Documentation/devicetree/usage-model.txt|and here]]
 +
 +=== Дополнительное задание ====
 +
 +[[linux-kernel-internals/task|Страница задания]]
 +
 +==== Экзамен ====
 +
 +[[linux-kernel-internals/exam|Страница Экзамена]]
 
linux-kernel-internals-2013-2014.txt · Last modified: 2014/02/22 13:00 by segoon
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki