Week 9 Comprehension Flashcards
When the same program is executed twice it will have the same PID.
True
False
FALSE
What will be in (1), (2), (3), (4)? #! /bin/bash # # Kill a specified process # Usage: killp function kill_a_process () { echo "DEBUG: PID= (3) KILLSIG= (4)" } kill_a_process (1) (2) (1) $1, (2) $2, (3) $3, (4) $4 (1) $1, (2) $2, (3) $1, (4) $2 (1) $1, (2) $2, (3) $2, (4) $1 (1) $2, (2) $1, (3) $2, (4) $1
(1) $1, (2) $2, (3) $2, (4) $1
How do you place a command that’s running in the foreground into the background?
Type CTRL+b followed by bg and press the enter key.
Type CTRL+c followed by bg and press the enter key.
Type CTRL+d followed by bg and press the enter key.
Type CTRL+z followed by bg and press the enter key.
Type CTRL+z followed by bg and press the enter key.
How do you start a sleep command to run in the background? $ bg | sleep $ sleep | bg $ sleep % $ sleep &
$ sleep &
Find the match.
SIGHUP SIGINT SIGKILL SIGTERM
2 15 9 1
Find the match.
SIGHUP = 1
SIGINT = 2
SIGKILL = 9
SIGTERM = 15
What value will be displayed at (1) and (2)? $ ls file1 (file1 exists) $ echo "$?" (1) $ ls file2 (file2 does not exist) $ echo "$?" 2 $ echo "$?" (2)
(1) 0, (2) 0
(1) 0, (2) 2
(1) 1, (2) 2
(1) $1, (2) $2
(1) 0, (2) 0
Which commands can you use to view process information? (Select two) lsps ps ptree top
ps
top
When will the following entry in the user crontab be executed?
1 2 3 4 * /bin/go_catch_Pokemon
1:02 am on March 4
January 2nd at 3:04 am
Monday, February 3rd at 4:00 am
1 minute after 2 am on the 3rd of April
1 minute after 2 am on the 3rd of April
Which statements are true? (Select two)
The root user can set a priority to a process
The lower the nice value is, the higher the chance will be for the specified process to receive more time slice.
The higher the nice value is, the lower the process priority value will be.
An owner of a process can “be nice” to other processes by increasing the nice value.
The lower the nice value is, the higher the chance will be for the specified process to receive more time slice.
An owner of a process can “be nice” to other processes by increasing the nice value.
Which one is NOT a Linux scheduling tool?
anat
at
anacron
cron
anat
Which command entered without arguments is used to display a list of processes running in the current shell?
a. pgrep
b. list
c. pid
d. ps
PS
Which of the following statements is true? (Choose all that apply.)
a. If /etc/at.allow exists, only users listed in it can use the at command.
b. If /etc/cron.allow exists, only users listed in it can use the cron command.
c. If /etc/cron.deny exists and /etc/cron. allow does not exist, any user not listed in /etc/cron.deny can use the cron command.
d. If /etc/cron.allow and /etc/cron.deny exist, only users listed in the former can use the cron command, and any users listed in the latter are denied access to the cron command.
e. If a user is listed in both /etc/cron.allow and /etc/cron.deny, then /etc/cron.deny takes precedence and the user cannot access the crontab command.
d. If /etc/cron.allow and /etc/cron.deny exist, only users listed in the former can use the cron command, and any users listed in the latter are denied access to the cron command.
e. If a user is listed in both /etc/cron.allow and /etc/cron.deny, then /etc/cron.deny takes precedence and the user cannot access the crontab command.
Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system?
a. /etc/crontab
b. /etc/cron/username
c. /var/spool/cron
d. /var/spool/cron/username
d./var/spool/cron/username
Which process has a PID of 1 and a PPID of 0?
a. the kernel itself
b. ps
c. init/systemd
d. top
c. init/systemd
A process spawning or initiating another process is referred to as _________.
a. a child process
b. forking
c. branching
d. parenting
b. forking