Question: When programs run, the system needs to track information about them. Think about in Windows, looking at what's currently running using the task manager. In

 When programs run, the system needs to track information about them.

When programs run, the system needs to track information about them. Think about in Windows, looking at what's currently running using the task manager. In Linux and MacOS, there's a command called ' ps. Linux actually provides a way to look at even more information. a. Open a terminal, and run 'ps -uww'. Include the output of this command as your answer to (a). b. 'bash' is the program running in your terminal that you're running commands in. What is the user id of the person running bash? c. What is the process id (a.k.a. pid) of the 'bash' program? d. There's a special folder in Linux called '/proc' which has all kinds of interesting info in it, including special information about running programs. Replace > in the following command with your answer to (c), and include the output for your answer to (d). cat /proc//cmdline e. Try this as well, and describe what happens: echo "Hello" >/ proc/ /fd/1 f. Open a second terminal (keep your current one open as well). Run this in the new terminal, and describe what happens: echo "Hello" > proc/>/fd/1 g. There's some additional options to p that allow seeing all programs running on the system, including those being run by other users. Run 'ps -auxww`'. What is the process id (pid) of the running program called '/sbin/init

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!