Question: PLEASE EXPLAIN THE CODE In this assignment you will write a LKM for the Linux kernel that displays the following details for all the processes

 PLEASE EXPLAIN THE CODE In this assignment you will write a

PLEASE EXPLAIN THE CODE

In this assignment you will write a LKM for the Linux kernel that displays the following details for all the processes whose PID is greater than an integer given by the user as a module parameter: [26 points] PROCESS NAME PID STATE PRIORITY STATIC-PRIORITY 1 NORMAL-PRIORITY As shown below, the PID is given as arguments while inserting the module in the kernel. Bonnavanna-POURSUS DESKTOP abhinav abhinav - HP - ProBook-45205:-/Desktops sudo insmod ./Process-1.ko inp_pid-3500 abhinav abhinav HP - ProBook-45205:-/Desktops | The next screenshot shows the required details for a process, its child processes (may have 0 or more), and its parent process. You are expected to keep a similar format (not an exact one) for your output which is readable. Your programs must compile and run under Xubuntu (or another variant of Ubuntu) 18.04. 120 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120 O abhinav@abhinav-HP-ProBook-4520s: -/Desktop [21665.443053] kworker/1:1 14723 1 o [21605.443053] PARENT [21605.443055] kthreadd 2 1 [21605.443055] [21605.443856] PROCESS PID STATE [21605.443857] kworker/8:2 14733 1 [21605.4430597 PARENT 2 1 [21605.44306@j kthreadd [21605.443061 PROCESS PID STATE S" |[21605.443862] kworker/u16:2 [21605.443063] 14980 1 PARENT [21665.443063) kthreadd 2 2 1 [21605.443064] [21665.443665] PROCESS PID STATE [21605.443867] kworker/u16:3 15407 1 1 [21665.443868] PARENT [21665.443069) kthreadd 2 1 [21605.443070] [21605.443871] PROCESS PID STATE [21605.443071] kworker/u16:0 15800 1 [21605.443873] PARENT 121605.443074] kthreadd 2 1 |[21665.443075] [21605.443076] PROCESS PID STATE [21665.443078] sudo 16711 1 [21605.443079] CHILD 16718 [21605.443886] sudo 1 P 21605.443880] PARENT PRIO 120 ST_PRIO NORM_PRIO 120 126 120 120 120 PRIO 120 ST PRIO NORM_PRIO 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120 In this assignment you will write a LKM for the Linux kernel that displays the following details for all the processes whose PID is greater than an integer given by the user as a module parameter: [26 points] PROCESS NAME PID STATE PRIORITY STATIC-PRIORITY 1 NORMAL-PRIORITY As shown below, the PID is given as arguments while inserting the module in the kernel. Bonnavanna-POURSUS DESKTOP abhinav abhinav - HP - ProBook-45205:-/Desktops sudo insmod ./Process-1.ko inp_pid-3500 abhinav abhinav HP - ProBook-45205:-/Desktops | The next screenshot shows the required details for a process, its child processes (may have 0 or more), and its parent process. You are expected to keep a similar format (not an exact one) for your output which is readable. Your programs must compile and run under Xubuntu (or another variant of Ubuntu) 18.04. 120 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120 O abhinav@abhinav-HP-ProBook-4520s: -/Desktop [21665.443053] kworker/1:1 14723 1 o [21605.443053] PARENT [21605.443055] kthreadd 2 1 [21605.443055] [21605.443856] PROCESS PID STATE [21605.443857] kworker/8:2 14733 1 [21605.4430597 PARENT 2 1 [21605.44306@j kthreadd [21605.443061 PROCESS PID STATE S" |[21605.443862] kworker/u16:2 [21605.443063] 14980 1 PARENT [21665.443063) kthreadd 2 2 1 [21605.443064] [21665.443665] PROCESS PID STATE [21605.443867] kworker/u16:3 15407 1 1 [21665.443868] PARENT [21665.443069) kthreadd 2 1 [21605.443070] [21605.443871] PROCESS PID STATE [21605.443071] kworker/u16:0 15800 1 [21605.443873] PARENT 121605.443074] kthreadd 2 1 |[21665.443075] [21605.443076] PROCESS PID STATE [21665.443078] sudo 16711 1 [21605.443079] CHILD 16718 [21605.443886] sudo 1 P 21605.443880] PARENT PRIO 120 ST_PRIO NORM_PRIO 120 126 120 120 120 PRIO 120 ST PRIO NORM_PRIO 120 120 120 120 120 PRIO 120 ST_PRIO NORM_PRIO 120 120 120 120 120

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!