Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run processes in the background, kill them using the kill and killall commands,

Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run processes in the background, kill them using the kill and killall commands, and change their priorities using the nice and renice commands. 1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type sleep 6000 and press Enter to start the sleep com- mand, which waits 6000 seconds in the foreground. Do you get your prompt back after you enter this command? Why? Send the process an INT signal by typing the Ctrl+c key combination. 3. At the command prompt, type sleep 6000& and press Enter to start the sleep com- mand, which waits 6000 seconds in the background. Observe the background Job ID and PID that is returned.

4. Bring the background sleep process to the foreground by typing fg %1 at the command prompt, then press Enter. Send the process an INT signal by typing the Ctrl+c key combination.

5. Place another sleep command in memory by typing the sleep 6000& command and pressing Enter. Repeat this command three more times to place a total of four sleep commands in memory.

6. At the command prompt, type jobs and press Enter to view the jobs running in the background. What does the + symbol indicate?

7. At the command prompt, type kill % and press Enter to terminate the most recent pro- cess and view the output.

8. At the command prompt, type kill %1 and press Enter to terminate background job #1 and view the output.

9. At the command prompt, type killall sleep and press Enter to terminate the remaining sleep processes in memory. Verify that there are no more sleep processes in memory by typing the jobs command, then press Enter.

10. Place a sleep command in memory by typing sleep 6000& at a command prompt and pressing Enter.

11. Place a sleep command in memory with a lower priority by typing nice n 19 sleep 6000& at a command prompt and pressing Enter.

12. Verify that these two processes have different nice values by typing the command ps el | grep sleep at the command prompt and pressing Enter. Record the PID of the process with a nice value of 0: .

13. At the command prompt, type renice +10 PID (where PID is the PID you recorded in the previous question) to change the priority of the process. Type the command ps el | grep sleep and press Enter to verify the new priority.

14. Type exit and press Enter to log out of your shell.

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

More Books

Students also viewed these Databases questions

Question

13. You always should try to make a good first impression.

Answered: 1 week ago