CS430 Lab 1: Linux Kernel Scavanger Hunt
Due Thursday, August 31, by the end of the day
The Linux kernel source code is available from kernel.org, or on isoptera in /usr/src. It's also available online. For CS430, you will have to become somewhat familiar with this code, with the goal of understanding how to program inside an operating system.
The task in Lab this week is a scavanger hunt, where you must find the following:
The above examples refer to the source code on /usr/src/linux-source-3.2 on isoptera. This is probably the same as the generic Linux 3.2 source code. In some cases, Linux distributions use modified kernel source code, especially when specialized. Generally Linux distributions contain a mechanism to obtain the same source code used for the (binary) kernel. For Debian and Ubuntu, It's provided as a package called "linux-source", and this is how the source code on isoptera was obtained.
- 5 places where a function pointer stored in a struct member. example: fs/btrfs/export.c lines 311-316. These must all be in different structure instances, but more than one may be from the same type of struct.
- 5 places where a function pointer stored in a struct is used to call a function. example: fs/exportfs/expfs.c line 148
- 5 places where a bitwise operator is used. example: arch/x86/pci/common.c line 611
- An amusing comment. example: arch/sparc/include/asm line 41
Extensive modification is more likely on distributions such as SteamOS or Android, which have a specific purpose other than general computing.
Turning in the assignment
Send me an e-mail with an explanation of where you found the above items.