Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LINUX 1. Which of the following commands can quickly identify the child processe

ID: 652127 • Letter: L

Question

LINUX

1. Which of the following commands can quickly identify the child processes started by a particular process?

pstree

ps

ls -ep

top

2. The action of one process starting another process is referred to as ________ .

forking

parenting

child bearing

birthing

3. Which of the following statements concerning processes is true?

All background processes append " & " to the PID

A parent process can have only one child

A child process can have only one parent process

Each process is given a PPID that is used to uniquely identitfy it.

4. Which of the following does not run in a terminal?

Rogue

Program

Daemon

Zombie

5. When you run the ps -ef command, how can daemon processes be recognized?

There is an ? in the S (status) column.

There is a d in the S (status) column

There is an * in the S (status) column.

The terminal is listed as tty0

6. As daemon process are not associated with terminals, you must use the -e switch with the ps command to view them.

a.

pstree

b.

ps

c.

ls -ep

d.

top

Explanation / Answer

===================================================================================1. Which of the following commands can quickly identify the child processes started by a particular process?
   a.   pstree
   b.   ps
   c.   ls -ep
   d.   top

Ans:
   a.   pstree

Explanation:
   pstree displays processes in tree format.Child threads of a process are found under the parent process and
   are shown with the process name in curly braces
  
   Command:
           pstree pid
   Example:

   init-+-getty
|-getty
|-getty
`-getty
===================================================================================2. The action of one process starting another process is referred to as ________ .
   a.   forking
   b.   parenting
   c.   child bearing
   d.   birthing

Ans:
   a.   forking

  
Explanation:
   fork() creates a new process by duplicating the calling process.
   The new process, referred to as the child, is an exact duplicate of the calling process,
   referred to as the parent,
===================================================================================3. Which of the following statements concerning processes is true?
   a.   All background processes append " & " to the PID
   b.   A parent process can have only one child
   c.   A child process can have only one parent process
   d.   Each process is given a PPID that is used to uniquely identitfy it.

Ans:
   c.   A child process can have only one parent process
   d.   Each process is given a PPID that is used to uniquely identitfy it.

  
Explanation:
   Both option c and d are correct.
   A child process have only one parent process.
   Each process have unique PPID.
===================================================================================

4. Which of the following does not run in a terminal?

   a.   Rogue
   b.   Program
   c.   Daemon
   d.   Zombie
Ans:
   c.   Daemon  

Explanation:
   A daemon is a type of program on linux operating systems that runs unobtrusively in the background,
   rather than under the direct control of a user, waiting to be activated by the occurance of a specific event or condition.

===================================================================================5. When you run the ps -ef command, how can daemon processes be recognized?
   a.   There is an ? in the S (status) column.
   b.   There is a d in the S (status) column
   c.   There is an * in the S (status) column.
   d.   The terminal is listed as tty0
Ans:
   a.   There is an ? in the S (status) column.

Explanation:
   Daemon processes have ? in status.
   command to fetch daemom porcesses.
   Example:
       ps -eo 'tty,pid,comm' | grep ^?

===================================================================================6. As daemon process are not associated with terminals, you must use the -e switch with the ps command to view them.
    a. True
   b   False
Ans:
   True

  
Explanation:
   You must use -e command to view daemon processed.
   Example:
       ps -eo 'tty,pid,comm' | grep ^?
===================================================================================