Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 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.
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 ?

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

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

the kernel module named xyz in C that lists current processestasks in a Linux system based on given ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Labor and Employment Law Text and Cases

Authors: David Twomey

15th edition

1133188281, 978-1133711841, 1133711847, 978-1285247632, 978-1133188285

More Books

Students also viewed these Operating System questions

Question

22. Why is tPA not helpful in cases of hemorrhagepg109

Answered: 1 week ago