随笔分类 -  Linux Kernel

ULK --- Chap 4: Tasklets (Note)
摘要:Tasklets are the preferred way to implement deferrable functions in I/O drivers. As already explained,tasklets are built on top of two softirqs named ... 阅读全文

posted @ 2015-12-03 07:34 Persistence

ULK --- Chap 4: ksoftirqd kernel threads (Note)
摘要:In recent kernel versions, each CPU has its own ksoftirqd/n kernel thread (where n is thelogical number of CPU). Each ksoftirqd/n kernel thread runs t... 阅读全文

posted @ 2015-12-03 01:46 Persistence

ULK --- Chap 4: Softirqs and Tasklets (Note)
摘要:We mentioned earlier in the section "Interrupt Handling" that several tasks among those executedby the kernel are not critical: they can be deferred f... 阅读全文

posted @ 2015-12-03 01:16 Persistence

ULK --- Chap 4: Nested Execution of Exception and Interrupt Handlers
摘要:Every interrupt or exception gives rise to a kernel control path or separate sequence of instructions thatexecute in Kernel Mode on behalf of the curr... 阅读全文

posted @ 2015-12-02 02:08 Persistence

ULK --- Chap 4: Interrupt Descriptor Table
摘要:A system table called Interrupt Descriptor Table (IDT) associates each interrupt or exception vector withthe address of the corresponding interrupt or... 阅读全文

posted @ 2015-12-02 00:32 Persistence

ULK --- Chap 4: IRQs and Interrupts (Note)
摘要:Each hardware device controller capable of issuing interrupt requests usually has a singleoutput line designed as the Interrupt ReQuest (IRQ) line. Al... 阅读全文

posted @ 2015-11-26 11:52 Persistence

ULK --- Chap 4: Interrupts and Exceptions (Note)
摘要:The Intel documentation classifies interrupts and exceptions as follows:1. Interrupts:Maskable interrupts: All Interrupt ReQuests (IRQs) issued by I/O... 阅读全文

posted @ 2015-11-26 05:18 Persistence

ULK --- Chap 4: Interrupts and Exceptions
摘要:An interrupt is usually defined as an event that alters the sequence of instructions executed by aprocessor. Such events correspond to electrical sign... 阅读全文

posted @ 2015-11-25 12:42 Persistence

ULK --- Chap3 Processes: Performing the Process Switch
摘要:A process switch may occur at just one one well-defined point: the schedule() function, which is discussedat length in Chapter 7. Here, we are only co... 阅读全文

posted @ 2015-11-13 11:01 Persistence

ULK --- Chap3 Processes: Process Switch
摘要:To control the execution of process, the kernel must be able to suspend the execution of the processrunning on the CPU and resume the execution of som... 阅读全文

posted @ 2015-11-13 06:32 Persistence

ULK --- Chap3 Processes: Handling Wait Queues
摘要:A new wait queue head may be defined by using the DECLARE_WAIT_QUEUE_HEAD(name) macro,which statically declares a new wait queue head variable called ... 阅读全文

posted @ 2015-11-10 12:39 Persistence

ULK --- Chap3 Processes: How Processes Are Organized
摘要:The runqueue lists group all processes in a TASK_RUNNING state. When it comes to groupingprocesses in other states, the various states call for differ... 阅读全文

posted @ 2015-11-09 09:07 Persistence

ULK --- Chap3 Processes: Relationships Among Processes
摘要:Processes created by a program have a parent/child relationship. When a process creates multiple children,these children have sibling relationships. S... 阅读全文

posted @ 2015-11-09 08:32 Persistence

ULK --- Chap3 Processes: Lists of Tasking_Running processes
摘要:When looking for a new process to run on a CPU, the kernel has to consider only the runnable processes(that is, the processes in the TASK_RUNNING stat... 阅读全文

posted @ 2015-11-09 06:37 Persistence

ULK --- Chap3 Processes: Doubly linked lists
摘要:Before moving to and describing how the kernel keeps track of the various processes in the system,we would like to emphasize the role of special data ... 阅读全文

posted @ 2015-11-09 05:27 Persistence 阅读(240) 评论(0) 推荐(0)

ULK --- Chap3 Processes: Process Descriptor Handling
摘要:Processes are dynamic entities whose lifetimes range from a few milliseconds to months. Thus, thekernel must be able to handle many processes at the s... 阅读全文

posted @ 2015-11-05 08:38 Persistence

ULK --- Chap3 Processes: Identifying a Process
摘要:As a general rule, each execution context that can be independently scheduled must have its ownprocess descriptor; therefore, even lightweight process... 阅读全文

posted @ 2015-11-05 06:18 Persistence

ULK --- Chap3 Processes
摘要:The concept of a process is fundamental to any multiprogramming operating system. A processis usually defined as an instance of a program in execution... 阅读全文

posted @ 2015-11-05 01:48 Persistence

Operating System: Three Easy Pieces --- LDE (Note)
摘要:ASIDE: Why System Calls Look Like Procedure Calls?You may wonder why a call to a system call, such as open() or read() looks exactly likea typical pro... 阅读全文

posted @ 2015-10-27 12:30 Persistence 阅读(247) 评论(0) 推荐(0)

Operating System: Three Easy Pieces --- Locks (Note)
摘要:From the introduction to concurrency, we saw one of the fundamental problems in concurrentprogramming: we would like to execute a series of instructio... 阅读全文

posted @ 2015-10-26 11:52 Persistence

导航