Courseiva
mediumMultiple Choice

XK0-006 Practice Question: A systems administrator needs to ensure that a…

A systems administrator needs to ensure that a custom service runs with a specific priority on a Linux server. Which command should the administrator use to achieve this?

⚠ Common exam trap

Many exam-takers confuse `nice` (for CPU priority at launch) with `renice` (for adjusting an already running process) or `ionice` (for I/O priority), leading them to select an option that does not set the priority at service start.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

nice -n -10 /usr/local/bin/myservice

The `nice` command adjusts the CPU scheduling priority of a process at launch time. Using `nice -n -10` sets a higher priority (lower nice value) for the new service, ensuring it runs with the specified priority from the start. This directly meets the requirement to run a custom service with a specific priority.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    renice -10 -p 1234

    Why it's wrong here

    renice alters the nice value, which affects CPU scheduling priority, not the service's configured priority persistently. It is tempting because nice values do set CPU priority, but the scenario requires setting it for a custom service, which systemd handles via unit directives rather than a running PID.

  • ✗

    ionice -c 2 -n 0 -p 1234

    Why it's wrong here

    ionice sets I/O scheduling class and priority, leaving CPU scheduling untouched. It is tempting because it does adjust process priority, but only for disk access; a service needing CPU priority requires a CPU-scheduling mechanism, not the I/O scheduler.

  • ✓

    nice -n -10 /usr/local/bin/myservice

    Why this is correct

    nice -n -10 launches the process with an explicit scheduling niceness of -10, raising its CPU priority relative to default-nice processes. This satisfies the stem's requirement to run the custom service at a specific priority, though negative values require root privileges.

  • ✗

    chrt -r 99 /usr/local/bin/myservice

    Why it's wrong here

    chrt applies a real-time scheduling policy to a running process, which can starve other tasks and is not the standard way to set a service's priority. It is tempting because it does control scheduling, but it would be correct only for genuine real-time workloads, not general service priority.

About these practice questions

This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.