Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Description In the first part of this project, you will implement a new kernel module to list all the processes and their scheduling information)

image text in transcribed

2. Description In the first part of this project, you will implement a new kernel module to list all the processes and their scheduling information) that belong to a given user in the system. This simple task will help you learn the key kernel data structures and macros for process management. Specifically, your kernel module should implement the following: a. Your kernel module should take the UID of the user as the only command-line argument b. Your kernel module should search the system for all the processes that belong to the given user and return the required information of each process, including the process ID (PID), priority (PRIO), scheduler class (CLS), and the executable name (CMD), to the user-space program. The priority of a process is used for scheduling processes. Generally speaking, a process with a higher priority will run before a lower priority process. The scheduler class is the algorithm used to select the next process and uses the process priority to make this selection. The default scheduler for linux processes is the Completely Fair Scheduler (CFS). C. Your kernel module should then format the information and print the output to the kernel log. The output should look like the following: PID 10 11 12 9816 9823 10085 10086 10097 NAME migration/ watchdog/0 watchdog/1 systemd (sd-pam) sshd sshd sftp-server PRIO 0 0 0 120 120 120 120 120 POLICY SCHED_FIFO SCHED_FIFO SCHED_FIFO SCHED NORMAL SCHED NORMAL SCHED NORMAL SCHED NORMAL SCHED NORMAL 2. Description In the first part of this project, you will implement a new kernel module to list all the processes and their scheduling information) that belong to a given user in the system. This simple task will help you learn the key kernel data structures and macros for process management. Specifically, your kernel module should implement the following: a. Your kernel module should take the UID of the user as the only command-line argument b. Your kernel module should search the system for all the processes that belong to the given user and return the required information of each process, including the process ID (PID), priority (PRIO), scheduler class (CLS), and the executable name (CMD), to the user-space program. The priority of a process is used for scheduling processes. Generally speaking, a process with a higher priority will run before a lower priority process. The scheduler class is the algorithm used to select the next process and uses the process priority to make this selection. The default scheduler for linux processes is the Completely Fair Scheduler (CFS). C. Your kernel module should then format the information and print the output to the kernel log. The output should look like the following: PID 10 11 12 9816 9823 10085 10086 10097 NAME migration/ watchdog/0 watchdog/1 systemd (sd-pam) sshd sshd sftp-server PRIO 0 0 0 120 120 120 120 120 POLICY SCHED_FIFO SCHED_FIFO SCHED_FIFO SCHED NORMAL SCHED NORMAL SCHED NORMAL SCHED NORMAL SCHED NORMAL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago