Timers.
[cascardo/kernel/slides/.git] / 08time / time
1 %Time Management
2 %Thadeu Cascardo
3
4 # Tickes, Jiffies
5
6 * The timer ticks with a frequency, interrupting the system
7 * Necessary for preemptive scheduling, using a time slice
8 * Linux counts the number of ticks in the *jiffies* variable
9 * It's interrupted *HZ* times in a second
10
11 # Busy waiting
12
13 * time\\_after
14 * time\\_before
15 * cpu\\_relax
16 * udelay
17
18 # Scheduling
19
20 * schedule
21 * set\\_current\\_state
22 * TASK\\_INTERRUPTIBLE
23 * TASK\\_UNINTERRUPTIBLE
24 * TASK\\_RUNNING
25 * schedule\\_timeout
26 * schedule\\_timeout\\_interruptible
27 * msleep
28 * msleep\\_interruptible
29
30 # Timers
31
32 * linux/timer.h
33 * struct timer\\_list
34         - unsigned long expires
35         - void function(unsigned long)
36         - unsigned long data
37 * init\\_timer
38 * TIMER\\_INITIALIZER
39 * add\\_timer
40 * del\\_timer
41 * mod\\_timer
42 * del\\_timer\\_sync
43
44 # Work queues
45
46 # Delayed work
47
48 # Tasklets
49
50 # Wait queue
51
52 # Completion