The nice command on Linux and Unix can be used by non-root users to set a nice v
ID: 3911029 • Letter: T
Question
The nice command on Linux and Unix can be used by non-root users to set a nice value for a process that is positive or 0, but only root (or users with the proper permission) can set a nice value that is negative. Which of the following explanations is the right one ?
A. The nice field in the kernel task structure is unsigned int and cannot accept negative values.
B. A negative nice value gives a process extended access rights to OS resources, equivalent to a switch to kernel mode. This is dangerous if available to regular users.
C. Regular users can abuse the nice command and could assign a high priority (and more CPU time) to a process possibly in detriment to system tasks .
Explanation / Answer
Answer: B
The nice field in the kernel task structure can hold unsigned and signed int value. The value can range from -20 to 19. The default nice value is 0 and lower (negative) value indicate higher priority and access to more OS resources.
Regular user do NOT have permission to increase the priority and abuse the stability of the system.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.