Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam LFCS topic 1 question 70 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 70
Topic #: 1
[All LFCS Questions]

Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?

  • A. /usr/bin/prog is executed with a nice level of -5.
  • B. /usr/bin/prog is executed with a nice level of 5.
  • C. /usr/bin/prog is executed with a priority of -5.
  • D. /usr/bin/prog is executed with a priority of 5.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
MPA3333
1 month ago
https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ So the nice value is 5, so it's A.
upvoted 1 times
MPA3333
1 month ago
Sorry, it's B. (a positive value), my typo
upvoted 1 times
...
...
EliteAllen
4 months ago
Selected Answer: B
B. /usr/bin/prog is executed with a nice level of 5. The -5 here indicates that the nice value is being increased by 5, which means that /usr/bin/prog will be less prioritized than other processes with lower nice values. The higher the nice value, the lower the CPU scheduling priority of the process. Remember that a negative nice value would require root privileges to apply, and it would mean a higher priority, not lower.
upvoted 2 times
...
Strib
10 months, 3 weeks ago
Selected Answer: A
A. /usr/bin/prog is executed with a nice level of -5. Explanation: The nice command is used to execute a program with an adjusted scheduling priority (nice value). The nice value ranges from -20 to +19, where lower values indicate higher priority. In the given command, nice -5 /usr/bin/prog, the value -5 is specified as the nice level. This means that the program /usr/bin/prog will be executed with a nice level of -5, indicating a higher priority compared to the default value (usually 0). So, option A is correct: /usr/bin/prog is executed with a nice level of -5.
upvoted 2 times
...
Ivandrago
2 years, 4 months ago
B is correct. to set -5 use nice --5 or nice -n 5
upvoted 1 times
...
vuk
3 years, 2 months ago
According to Ubuntu 20.04 the answer here is correct. The process has Nice level of 5 with that command.
upvoted 1 times
Borbz
3 years, 2 months ago
Isn't the default NICE level 0? The first one is a nice value (niceness) which ranges from -20 (highest priority value) to 19 (lowest priority value) and the default is 0. if the default nice level is 0 and we execute a nice -5, the result should be -5. I'm I wrong? this is the second question i see about NICE levels and it seems everyone is assuming the default nice level to be 10 instead of 0. Can anyone clarify?
upvoted 1 times
Borbz
3 years, 2 months ago
Forget my previous reply, the command "nice -5" will actually increase the nice to 5, so answer B is correct. tested in lab.
upvoted 1 times
...
Funkslinger
2 years, 2 months ago
Default nice if command is used is 10, original priority or nice level if nice command is never used is 0, neutral.
upvoted 1 times
...
...
...
ignou143
3 years, 4 months ago
D would right answer. Any guess?
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...