Home
You may like this!
36.
Which of the following commands creates a display of processes, showing the parent-child relationships through links between their names?
  • A.
    ps --forest
  • B.
    ps aux
  • C.
    ps -e
  • D.
    ps --tree
  • E.
    All of the above
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
The --forest option to ps shows parent-child relationships by creating visual links between process names in the ps output, making option A correct. (Listing 2.4 shows this effect.) Options B and C are both valid ps commands, but neither creates the specified effect. Option D describes a fictitious ps option. Since options B, C, and D are incorrect, option E is also necessarily incorrect.
Report
Name Email  
37.
You use top to examine the CPU time being consumed by various processes on your system. You discover that one process, dfcomp, is consuming more than 90 percent of your system’s CPU time. What can you conclude?
  • A.
    Very little; dfcomp could be legitimately consuming that much CPU time, or it could be an unauthorized or malfunctioning program.
  • B.
    No program should consume 90 percent of available CPU time; dfcomp is clearly malfunctioning and should be terminated.
  • C.
    This is normal; dfcomp is the kernel’s main scheduling process, and it consumes any unused CPU time.
  • D.
    This behavior is normal if your CPU is less powerful than a 2.5GHz EM64T Pentium, but on newer systems, no program should consume 90 percent of CPU time.
  • E.
    This behavior is normal if your CPU has at least four cores, but on systems with fewer cores than this, no program should consume 90 percent of CPU time.
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
CPU-intensive programs routinely consume 90 percent or more of available CPU time, but not all systems run such programs. Furthermore, some types of program bugs can create such CPU loads. Thus, option A is correct, and you must investigate the matter more. What is dfcomp? Is it designed as a CPU-intensive program? Is it consuming this much CPU time consistently, or was this a brief burst of activity? Options B, C, D, and E all jump to conclusions or present fictitious reasons for the behavior being normal or abnormal.
Report
Name Email  
38.
You type jobs at a bash command prompt and receive a new command prompt with no intervening output. What can you conclude?
  • A.
    The total CPU time used by your processes is negligible (below 0.1).
  • B.
    No processes are running under your username except the shell you’re using.
  • C.
    The jobs shell is installed and working correctly on the system.
  • D.
    The system has crashed; jobs normally returns a large number of running processes.
  • E.
    No background processes are running that were launched from the shell you’re using.
  • Answer & Explanation
  • Report
Answer : [E]
Explanation :
The jobs command summarizes processes that were launched from your current shell. When no such processes are running, jobs returns nothing, so option E is correct. The jobs command doesn’t check or summarize CPU load, so option A is incorrect. The jobs command also doesn’t check for processes run from shells other than the current one, so option B is incorrect (processes running under your username could have been launched from another shell or from a GUI environment). There is no standard jobs shell in Linux, so option C is incorrect. Because the jobs output is limited to your own processes in the shell you’re running, a blank output does not indicate a crashed system, making option D incorrect.
Report
Name Email  
39.
Which two of the following commands are equivalent to one another? (Select two.)
  • A.
    nice --value 10 crunch
  • B.
    nice -n -10 crunch
  • C.
    nice -10 crunch
  • D.
    nice 10 crunch
  • E.
    nice crunch
  • Answer & Explanation
  • Report
Answer : [C, E]
Explanation :
The nice command launches a program (crunch in this example) with increased or decreased priority. The default priority when none is specified is 10, and the nice -10 crunch command also sets the priority to 10, so options C and E are equivalent. Option A isn’t a valid nice command because nice has no --value option. Option B is a valid nice command, but it sets the priority to –10 rather than 10. Despite the similarity in form of options C and D, option D is not a valid nice command, and so is incorrect. (When passing a numeric value to nice, you must use a preceding dash, -, or -n.)
Report
Name Email  
40.
Which of the following are restrictions on ordinary users’ abilities to run renice? (Select two.)
  • A.
    Users may not modify the priorities of processes that are already running.
  • B.
    Users may not modify the priority of their programs launched from anything but their current shells.
  • C.
    Users may not decrease the priority (that is, increase the priority value) of their own processes.
  • D.
    Users may not modify the priorities of other users’ processes.
  • E.
    Users may not increase the priority (that is, decrease the priority value) of their own processes.
  • Answer & Explanation
  • Report
Answer : [D, E]
Explanation :
Linux insulates users’ actions from one another, and this rule applies to renice; only root may modify the priority of other users’ processes, so option D is correct. Similarly, only root may increase the priority of a process, in order to prevent users from setting their processes to maximum priority, thus stealing CPU time from others, so option E is correct. Option A correctly describes nice, but not renice; the whole point of renice is to be able to change the priorities of existing processes. Contrary to option B, renice doesn’t care about the shell from which renice or the target program was launched. Users may use renice to decrease their own processes’ priorities, contrary to option C.
Report
Name Email