nerdexam
CompTIACompTIA

XK0-005 · Question #1108

XK0-005 Question #1108: Real Exam Question with Answer & Explanation

The correct answer is A: renice. To reduce the impact of a resource-intensive, long-running script without stopping it, the renice command should be used. This command modifies the scheduling priority (niceness) of a running process, allowing it to yield CPU time to other processes.

System Management

Question

An administrator notices that a long-running script, /home/user/script.sh, is taking up a large number of system resources. The administrator does not know the script's function. Which of the following commands should the administrator use to minimize the script's impact on system resources?

Options

  • Arenice
  • Bkill
  • Cbg
  • Dnohup

Explanation

To reduce the impact of a resource-intensive, long-running script without stopping it, the renice command should be used. This command modifies the scheduling priority (niceness) of a running process, allowing it to yield CPU time to other processes.

Common mistakes.

  • B. The kill command is used to terminate processes, which would stop the script entirely rather than minimizing its resource impact while allowing it to continue running.
  • C. The bg command resumes a suspended job in the background; it does not change its resource consumption or priority.
  • D. The nohup command is used to run a command such that it ignores HUP (hangup) signals, typically preventing it from terminating when the controlling terminal is closed, but it does not affect resource priority.

Concept tested. Adjusting process scheduling priority

Reference. https://manpages.ubuntu.com/manpages/jammy/man1/renice.1.html

Topics

#Process management#Resource management#Linux commands#System administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions