Question: In XV6 system Implement the system call pstate in xv6. Similar to the Unix command ps, it prints out the state of the current user
In XV6 system

Implement the system call pstate in xv6. Similar to the Unix command ps, it prints out the state of the current user processes. For simplicity, there is no argument to the command. - Consider only those user processes in SLEEPING, RUNNING, or RUNNABLE state. - The display for each process should include process id, process name, process state, and parent name. - Use (init) for the parent name of the init process. - The command also prints out the total number of the processes that are currently in SLEEPING, RUNNING, or RUNNABLE state. - The command also prints out the status of each CPU, where the status is either idle or the name of the current process it is running. - sh.c should not be modified. - There will be a penalty for any unnecessary modifications to xv6. - The implementation of additional user programs (like the pi in the sample run) for testing purpose is not mandatory
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
