System Process Management

Managing Linux processes, including monitoring, prioritizing, and controlling system resources

Category
Linux
Level
intermediate
Languages
en → en
Cards
54
Markdown
System Process Management (.md)

Flashcards (54)

#Front (Term / Question)Back (Definition / Answer)ExampleMultiple-Choice Options
1What is the purpose of the 'lsof' command?'lsof' lists open files and the processes that opened them, useful for monitoring resource usage.
2What is a process group?A process group is a collection of one or more processes that can be managed together, often used for job control.
3What is a daemon process?A daemon process is a background process that runs independently of user control, often providing services.
4What is the difference between SIGTERM and SIGKILL?SIGTERM requests a process to terminate gracefully, while SIGKILL forces it to terminate immediately.
5What is the 'nice' command used for?'nice' is used to start a process with a specified priority, influencing its scheduling.
6What is the role of the scheduler in process management?The scheduler determines which processes run at any given time and allocates CPU time to them.
7What is the purpose of the 'systemctl' command?'systemctl' is used to manage system services and processes in systems using systemd.
8What is a child process?A child process is a process created by another process (the parent) using the fork system call.
9What are semaphores used for?Semaphores are synchronization tools used to control access to shared resources by multiple processes.
10What does the 'strace' command do?'strace' traces system calls and signals received by a process, useful for debugging.
11What is the difference between a process and a thread?A process is an independent program in execution, while a thread is a smaller unit of a process that can run concurrently.
12What does the 'top' command do in Linux?'top' provides a dynamic, real-time view of the system's processes, including CPU and memory usage.
13What is a zombie process?A zombie process is a process that has completed execution but still has an entry in the process table, usually because its parent process has not read its exit status.
14What is the purpose of the 'ulimit' command?'ulimit' sets user-level resource limits for processes, such as maximum file size or number of processes.
15What is the difference between foreground and background processes?Foreground processes interact with the user directly, while background processes run independently without user interaction.
16How can you monitor system resource usage by processes?You can use commands like 'top', 'htop', or 'vmstat' to monitor system resource usage by processes.
17What is the purpose of the 'nohup' command?'nohup' allows a command to continue running in the background even after the user has logged out.
18What is a parent process?A parent process is a process that creates one or more child processes.
19What is the exec family of functions?The exec family of functions replaces the current process image with a new process image, effectively running a new program.
20What is a race condition?A race condition occurs when two or more processes access shared resources simultaneously, leading to unpredictable results.
21What is a session in process management?A session is a collection of process groups, typically associated with a user login session.
22What is the purpose of the 'nice' command?'nice' is used to start a process with a specified priority, influencing its scheduling.
23What is the purpose of the 'pstree' command?'pstree' displays running processes in a tree format, showing the parent-child relationships.
24How can you change the priority of a running process?You can change the priority of a running process using the 'renice' command.
25What does the 'nice' command do when used with a negative value?Using 'nice' with a negative value increases the priority of a process, allowing it to receive more CPU time.
26What is a process in the context of operating systems?A process is an instance of a program in execution, which includes the program code, its current activity, and the resources allocated to it.
27What is a thread in relation to processes?A thread is the smallest unit of processing that can be scheduled by an operating system, and it runs within a process.
28What is the significance of the 'waitpid' function?'waitpid' waits for a specific child process to change state, allowing the parent to retrieve its exit status.
29What is a process tree?A process tree is a hierarchical representation of processes, showing parent-child relationships.
30What is a fork in process management?A fork is a system call that creates a new process by duplicating the existing process.
31What is context switching?Context switching is the process of saving the state of a currently running process and loading the state of another process.
32What is the purpose of the 'at' command?'at' schedules a command to be run at a specific time in the future.
33What does the 'bg' command do?'bg' resumes a suspended job in the background.
34What is a mutex?A mutex (mutual exclusion) is a locking mechanism that prevents multiple processes from accessing a resource simultaneously.
35What does the 'ps aux' command display?'ps aux' displays detailed information about all running processes, including user, PID, CPU, and memory usage.
36How can you view detailed information about a specific process?You can use the 'ps -p <PID> -o' command to view detailed information about a specific process.
37What is the 'fg' command used for?'fg' brings a background job to the foreground.
38What is a process control block (PCB)?A PCB is a data structure maintained by the operating system that contains information about a process, including its state, PID, and resource usage.
39What does the 'nice' value represent?The 'nice' value represents the priority of a process, with lower values indicating higher priority.
40What is the purpose of the 'kill' command?'kill' is used to terminate a process by sending it a signal, typically SIGTERM or SIGKILL.
41What is a process ID (PID)?A process ID (PID) is a unique identifier assigned to each process running on a system.
42What is the significance of the 'init' process?'init' is the first process started by the Linux kernel and is responsible for starting and managing system processes.
43What does the 'nice' command do?'nice' starts a process with a specified priority, allowing you to influence its scheduling.
44What is process affinity?Process affinity binds a process to a specific CPU or set of CPUs, optimizing performance by reducing context switching.
45What is a process state?A process state indicates the current status of a process, such as running, waiting, or terminated.
46What does the 'jobs' command do?'jobs' lists the active jobs in the current shell session, showing their status.
47What is the 'kill -9' command?'kill -9' sends the SIGKILL signal to a process, forcing it to terminate immediately.
48What does the 'wait' command do?'wait' waits for a specified process to complete before continuing execution.
49What is the purpose of the 'disown' command?'disown' removes a job from the shell's job table, allowing it to continue running after the shell is closed.
50What is a process scheduler?A process scheduler is a component of the operating system that manages the execution of processes.
51What is the purpose of process synchronization?Process synchronization ensures that multiple processes can operate concurrently without conflicting with each other.
52What is inter-process communication (IPC)?IPC is a mechanism that allows processes to communicate and synchronize their actions.
53What command is used to list all running processes in Linux?The command 'ps' is used to list all running processes in Linux.
54What is the 'killall' command used for?'killall' terminates all processes with a specified name.