Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

In this assignment, you need to write a kernel module named xyz that lists current processes/tasks in a Linux system based on given selection criteria. Remember that the Process Control Block (PCB) in

In this assignment, you need to write a kernel module named xyz that lists current processes/tasks in a Linux system based on given selection criteria. Remember that the Process Control Block (PCB) in Linux is represented by the structure task_struct, which is found in the <linux/sched.h> include file. In your code, you are required to iterate over all the current processes in the system using a Depth-First Search (DFS) tree. Also, use list_for_each(…) macro in your solution in order to direct your DFS.  

Your code output should appear in the kernel log buffer that can be viewed by using the dmesg command. Verify your code by comparing the contents of the kernel log buffer with the output of the following command ps -eLf that lists all processes including threads in the system.  

i. Print name and ID of all current processes in the system. (25 pts.) ii. Print information about of the processes into the kernel log that fits to below queries  a. What are the name, ID and priority value of the processes having ID <  100 ? (25 pts.)  

b. If the process named “gedit” exist in the system, what is its parent process name and ID ? (25 pts.) c. What are the name and ID of the processes whose states are runnable ? (25 pts.) 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question