CS698Z - Linux Kernel Programming Try for yourselves (before next class)

1. Examine different fields in the structure task_struct (declared in include/linux/sched.h). Try to make sense of different elements present in the task_struct.

2. Write a C program to trigger divide-by-zero exception. Find out the signal delivered to the user program. Write a signal-handler for the signal (man signal).

3. (If you don't know pthreads) Create a C program to create multiple threads using pthreads library (man pthreads). See if you can access a static pointer malloc'ed in one thread from another thread.

exceptions and system calls

1)  https://lwn.net/Articles/604287/

2)  https://lwn.net/Articles/604515/

3)  Soares et.al. osdi 2010

4)  cpu-rings-privilege-and-protection

interrupts

1)  http://www.xml.com/ldd/chapter/book/ch09.html

2)  tldp-tlk (a tad outdated, but concepts apply)

kernel threads

1)  https://lwn.net/Articles/65178/

2)  KSM-kerneldoc