Any2Quiz
Quizzes / Computer Science / Languages / Shell

Process Management Quiz - Languages Shell

Free practice quiz: Process Management (Languages Shell). 51 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

This Languages Shell practice quiz has 51 multiple-choice questions on Process Management, and 51 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.

Start quiz: 51 questions, free

Sample questions

  1. Which command is used to list all processes currently running on a Linux system, including those owned by other users and those in a defunct state?

    Show answer

    Answer: A. ps aux

    `ps aux` is a comprehensive command that displays processes from all users (`a`), processes not associated with a terminal (`x`), and processes in a user-oriented format (`u`). `ps -ef` is similar but uses a different formatting style. `top` and `htop` are interactive process viewers, not static listing commands.

  2. Which signal is typically generated when you press Ctrl+C in a terminal?

    Show answer

    Answer: A. SIGINT

    Pressing Ctrl+C in a terminal sends the SIGINT (Interrupt) signal to the foreground process group. This is commonly used to interrupt or terminate a running program. SIGQUIT (Ctrl+\) is similar but typically causes a core dump. SIGTERM is a graceful termination signal, and SIGKILL is a forceful termination signal.

  3. What is the primary mechanism by which a parent process waits for a child process to complete in a shell environment?

    Show answer

    Answer: A. The `wait` command or system call.

    The `wait` command (in shells) or the `wait()` system call (in programming) is used by a parent process to pause its execution until one of its child processes terminates. It also allows the parent to retrieve the exit status of the child. `fork` creates the child, `sleep` pauses execution without regard to children, and SIGCHLD is sent to the parent when a child status changes, but `wait` is the explicit waiting mechanism.

  4. What is the purpose of the `jobs` command in a shell like Bash?

    Show answer

    Answer: A. To list all jobs (processes) currently managed by the shell session.

    The `jobs` command lists the processes that are currently running in the background or have been stopped within the current shell session. It helps manage these jobs (e.g., bringing them to the foreground or resuming them).

  5. Which command allows you to change the priority of a process that is *already running*?

    Show answer

    Answer: A. renice

    The `renice` command is specifically designed to modify the scheduling priority (niceness) of processes that are already executing. The `nice` command sets the priority when a new process is started.

Take the full quiz

More questions in this quiz

Answers and explanations are in the full quiz.

  1. What does the 'S' state in the output of the `ps` command typically indicate for a process?
  2. Which signal is commonly used to gracefully terminate a process in Linux?
  3. What is the primary function of the `nice` command in Linux?
  4. A process in the 'Z' state (Zombie state) typically indicates:
  5. Which command allows you to send a signal to a specific process by its Process ID (PID)?
  6. What is the default niceness value for a process started by a normal user?
  7. If a parent process terminates before its child processes, what happens to the orphaned child processes?
  8. Which of the following `ps` output format specifiers indicates the CPU utilization of a process?
  9. What does the `renice` command do?
  10. What is the significance of the `+` sign preceding the PID in the output of `ps -ax` on some systems?
  11. Which of the following commands would be most appropriate for killing a process that is not responding to SIGTERM?
  12. The output of `top` displays a list of processes. What does the value in the 'NI' column represent?
  13. Which of the following is NOT a valid state for a process as typically shown by `ps`?
  14. What does the `pstree` command do?
  15. Which combination of options with the `ps` command is most likely to show processes belonging to all users, including those without a controlling terminal, and display them in a user-oriented format?
  16. What is the effect of sending SIGSTOP (signal 19) to a process?
  17. If a process is in the 'D' state (Uninterruptible Sleep), it means:
  18. Which utility provides a real-time, interactive view of running processes and system resource usage, allowing users to sort and kill processes?
  19. In the context of process management, what is a 'daemon' process?
  20. Which `ps` output format specifier typically shows the process's controlling terminal (TTY)?
  21. What is the primary purpose of the `/proc` filesystem in Linux regarding process management?
  22. Which signal is used to ask a process to reload its configuration file without restarting?
  23. What does the output `[ ]` around a process name in `top` or `ps` typically indicate?
  24. Which command can be used to monitor the resource usage of specific processes by PID or user?
  25. What is the 'nice' value range in Linux, and which end of the range indicates higher priority?
  26. Which option is used with `ps` to display processes in a full format listing, showing parent PID, CPU time, start time, etc.?
  27. What does the command `kill -0 <PID>` do?
  28. Which signal is commonly associated with the `fg` (foreground) command in a shell?
  29. What is the purpose of the `nohup` command?
  30. If a process starts with a UID of 0 in the `ps` output, what does it signify?
  31. Which of these commands would you use to find the Process ID (PID) of a running process named 'my_server'?
  32. What does the `SIGCHLD` signal typically indicate to a parent process?
  33. When using `htop`, what does pressing 'F9' typically allow you to do?
  34. What is the standard output stream that a process usually writes to by default?
  35. Which shell command is used to display the command-line arguments passed to a script or program?
  36. What does the asterisk (*) next to a process name in `top` often indicate?
  37. What is the typical default behavior of redirecting standard output (`>`) in the shell?
  38. Which signal would you send to a process to attempt to terminate it gracefully, allowing it to clean up resources?
  39. What does the `pkill` command do?
  40. In the `ps` command's output, what does the `STAT` column entry 'T' usually represent?
  41. What is the primary function of the `killall` command?
  42. If you execute `command > file.txt 2>&1`, what does this redirection achieve?
  43. What does the `nice` value of 19 signify for a process?
  44. What is the purpose of the `exec` command in a shell script?
  45. Which command provides a summary of system processes, including PID, PPID, user, CPU usage, and memory usage, similar to `ps aux` but often with more interactive features?
  46. What does the `SCHED_FIFO` scheduling policy in Linux typically imply for a process?

More quizzes

Browse all Shell quizzes

More to play

Daily ChallengeA new quiz every day. Keep your streak.HangmanGuess the word, letter by letter.Story QuestLearn through short interactive stories.All quizzesCBSE, ICSE, competitive exams and more.