LFCS Certification Process and Job Scheduling 2 — Questions and Answers
Question 1: Which command sends a SIGSTOP signal to suspend a running process with PID 1234?
- kill -STOP 1234 (Correct answer)
- kill -9 1234
- kill -TERM 1234
- kill -HUP 1234
Correct answer: kill -STOP 1234
SIGSTOP (signal 19) pauses a process; it cannot be caught or ignored, unlike SIGTSTP sent by Ctrl+Z.
Question 2: What does the `renice` command do in Linux?
- Changes the priority of an already-running process (Correct answer)
- Starts a new process with a specified priority
- Kills a process and restarts it with lower priority
- Lists processes sorted by niceness value
Correct answer: Changes the priority of an already-running process
`renice` alters the scheduling priority of one or more running processes without restarting them.
Question 3: A systemd timer unit is configured with `OnCalendar=daily`. What does this mean?
- The associated service runs once every 24 hours at midnight (Correct answer)
- The service runs whenever the system is idle
- The service runs at system boot daily
- The timer activates only when a calendar event file changes
Correct answer: The associated service runs once every 24 hours at midnight
`OnCalendar=daily` is equivalent to `*-*-* 00:00:00`, triggering the service at midnight each day.
Question 4: Which file would you edit to schedule a cron job that runs as the `www-data` user?
- /etc/cron.d/myjob (Correct answer)
- /var/spool/cron/crontabs/root
- /etc/crontab only
- /etc/cron.hourly/myjob
Correct answer: /etc/cron.d/myjob
Files in `/etc/cron.d/` support a username field, allowing jobs to run as a specific user like `www-data`.
Question 5: What is the output of `ps aux` showing in the STAT column value `Z`?
- A zombie process that has finished but not been reaped (Correct answer)
- A process in uninterruptible sleep
- A process suspended by a signal
- A process running with real-time priority
Correct answer: A zombie process that has finished but not been reaped
A 'Z' (zombie) process has exited but its parent has not yet called `wait()` to collect its exit status.
Question 6: Which `systemctl` subcommand lists all active timers along with their next trigger time?
- systemctl list-timers (Correct answer)
- systemctl list-units --type=timer
- systemctl show timers
- systemctl status timer.target
Correct answer: systemctl list-timers
`systemctl list-timers` displays all active timers, their last trigger, and their next scheduled activation.
Question 7: A process has a nice value of -10. What can you infer about its scheduling?
- It receives more CPU time than processes with higher nice values (Correct answer)
- It is deprioritized compared to processes with nice value 0
- It runs only in real-time scheduling class
- It is restricted to a single CPU core
Correct answer: It receives more CPU time than processes with higher nice values
Lower (more negative) nice values grant higher scheduling priority, so -10 gets more CPU than nice 0 or positive values.
Which command sends a SIGSTOP signal to suspend a running process with PID 1234?