Process Scheduling Flashcards

1
Q

What command is used to influence process scheduling

A

nice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many possible nice values are there

A

40 values from -20 to 19

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Highest priority nice value

A

-20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Lowest priority nice value

A

19

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What nice values can user set

A

0 to 19, the lowest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Determine how many cpus are on the hosts

A

lscpu -p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Write a command to consume cpu cycles

A

dd if=/dev/zero of=/dev/null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Default nice value

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you change the nice value of a process?

A

You renice it. Example: renice 8 7464

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

set the niceness of the process with PID 1234 to 10.

A

renice 10 1234
renice -n -15 3434

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Start a process with a given priority

A

nice -n -4 dd if=/dev/zero of=/dev/null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Wrong way to modify systemd values

A

do it in /usr/lib/systemd/system

DO NOT DO THIS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Right way to modify systemd values

A

Copy config file from /usr/lib/systemd/system to /etc/systemd/system and modify the copy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Using grep find how many cpus you have

A
grep -c '^processor' /proc/cpuinfo
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Determine the nice value of a process

A
ps -o pid,nice,cmd -p [PID]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly