Follow the instructions below and implement a module print_self. This module identifies the current process at the
Question:
Follow the instructions below and implement a module print_self. This module identifies the current process at the user-level and print out various information of the process.
Implement the print_self module and print out the following:
• Process name, id, and state;
• The same above information of its parent processes until init.
To keep things clean, I recommend that you create different sub-directories for different modules and create a different Makefile
1. The macro current returns a pointer to the task struct of the current running process. When you load your module, which process is recognized as current?
2. In old kernels the mother of all processes is called init. In newer kernels, what is it called and what do you see from your module’s output?
3. To see the different states of a process, Map the numeric state to its string state, e.g., print TASK RUNNING if state is 0. From your module’s output, which state(s) are observed?
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill