Interrupts and Bottom Halves in Linux Kernel

所在平台: Udemy

课程主页: https://www.udemy.com/course/interrupts-and-bottom-halves-in-deep/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**Linux 内核中断与底半部解析** 本课程深入探讨 Linux 内核中断和底半部机制,旨在帮助您理解和掌握关键的内核编程概念。 **学习内容概览:** * **中断与异常:** * 中断和异常的类型:电平触发、边沿触发、陷阱、故障。 * 可编程中断控制器 (PIC) 和高级可编程中断控制器 (APIC):IO APIC、Local APIC。 * 使用 CPUID 指令探索 x86 CPU 信息。 * 中断发生时的详细流程。 * CPU 如何找到中断处理程序:中断请求 (IRQ)、中断向量、中断描述符表 (IDT)。 * **Linux 内核中断处理:** * 中断共享、返回值、IRQ Affinity。 * Linux 键盘、鼠标、以太网中断驱动示例。 * 编写 Linux 内核键盘记录器,记录所有键入字符。 * 中断的启用与禁用。 * 在中断处理程序中加入 sleep 和 delay 的影响。 * **顶半部与底半部:** * **底半部的多种实现方式:** * Threaded IRQs * Softirqs * Tasklets (包括高优先级 Tasklets) * Workqueues (系统 Workqueues 和自定义 Workqueues) * **Softirqs、Tasklets 和 Workqueues 的区别。** * **相关文件:** /proc/cpuinfo, /proc/interrupts, /proc/irq, /proc/softirqs。 * **关键 API/宏/结构体:** * 中断注册与管理:`request_irq`, `irq_handler_t`, `request_threaded_irq`。 * 中断控制:`local_irq_enable`, `local_irq_disable`, `cli`, `sti`, `local_irq_save`, `local_irq_restore`, `disable_irq`, `enable_irq`, `disable_irq_nosync`, `synchronize_irq`, `in_interrupt`。 * Softirq 操作:`struct softirq_action`, `NR_SOFTIRQS`, `open_softirq`, `raise_softirq`, `in_irq`, `local_softirq_pending`。 * 底半部(General Bottom Halves)控制:`local_bh_enable`, `local_bh_disable`, `spin_lock_bh`, `spin_unlock_bh`。 * Tasklet 操作:`struct tasklet_struct`, `DECLARE_TASKLET`, `DECLARE_TASKLET_DISABLED`, `tasklet_init`, `tasklet_schedule`, `tasklet_hi_schedule`, `tasklet_trylock`, `tasklet_unlock`, `tasklet_disable`, `tasklet_disable_nosync`, `tasklet_enable`, `tasklet_kill`。 * Workqueue 操作:`struct workqueue_struct`, `struct work_struct`, `DECLARE_WORK`, `INIT_WORK`, `queue_work`, `queue_work_on`, `schedule_work`, `schedule_work_on`, `cancel_work_sync`, `flush_work`。 * Delayed Workqueue 操作:`struct delayed_work`, `DELAYED_DECLARED_WORK`, `INIT_DELAYED_WORK`, `schedule_delayed_work`, `schedule_delayed_work_on`, `flush_delayed_work`, `cancel_delayed_work`。 * Workqueue 创建与销毁:`alloc_workqueue`, `destroy_workqueue`, `flush_workqueue`, `alloc_ordered_workqueue`。 * **常用命令行工具:** `watch`, `lspci`, `dmesg`。 本课程将为您提供在 Linux 内核环境中处理并发、提高效率以及编写更健壮驱动程序的宝贵技能。

课程评论(0条)

课程详情

What you will learn from this courseInterrupts and ExceptionsTypes of Interrupts and Exceptions: Level Triggerred, Edge Triggerred, Traps, FaultsProgrammable Interrput Controller, Advanced Programmable Interrupt Controller (APIC) - IO APIC, Local APICFind out information about your x86 CPU using CPUID InstructionWhat happens when there is interruptHow does CPU finds the interrupt handler: Interrupt Request, Interrupt Vector and Interrupt Descriptor TableInterrupt Handling and Statistics in Linux Kernel: Interrupt sharing, return values, IRQ AffinityLinux Driver for keyboard, mouse, ethernet interruptsWrite a Keylogger in Linux Kernel which will log all characters typedEnabling/Disabling InterruptsWhat happens when we add sleep and delay in interrupt handlerTop and Bottom Halves: Threaded IRQs,Softirqs, Tasklets and Workqueues (System Workqueues and own workqueues)Differences between softirqs, tasklets and workqueuesFiles/proc/cpuinfo/proc/interrupts/proc/irq/proc/softirqsAPI's/Macros/Structuresrequest_irq, irq_handler_tlocal_irq_enable, local_irq_disable, cli, seilocal_irq_save, local_irq_restoredisable_irq, enable_irqdisable_irq_nosync, synchronize_irqirqs_disabledin_interruptrequest_threaded_irqstruct softirq_action, NR_SOFTIRQSopen_softirq, raise_softirqin_irqlocal_softirq_pendingin_softirqlocal_bh_enable, local_bh_disablespin_lock_bh, spin_unlock_bhstruct tasklet_struct, DECLARE_TASKLET, DECLARE_TASKLET_DISABLED, tasklet_init, tasklet_schedule, tasklet_hi_scheduletasklet_trylock, tasklet_unlock, tasklet_disable, tasklet_disable_nosync, tasklet_enable, tasklet_killstruct workqueue_struct, struct work_struct, DECLARE_WORK, INIT_WORK, queue_work, queue_work_on, schedule_work, schedule_work_on, cancel_work_sync, flush_workstruct delayed_work, DELAYED_DECLARED_WORK, INIT_DELAYED_WORK, schedule_delayed_work, schedule_delayed_work_on, flush_delayed_work, cancel_delayed_workalloc_workqueue, destroy_workqueue, flush_workqueue, alloc_ordered_workqueue,Commandswatchlspcidmesg

课程标签

0人关注该课程

主题相关的课程