1.
Which command entered without arguments is used
to display a list of processes running in the current shell?
Correct Answer
D. Ps
Explanation
The correct answer is "ps". The "ps" command is used to display a list of processes running in the current shell. It provides information such as the process ID (PID), parent process ID (PPID), CPU and memory usage, and other details about the running processes. By entering "ps" without any arguments, it will display a list of all processes running in the current shell session.
2.
The term used to describe a process spawning or
initiating another process is referred to as_________.
Correct Answer
B. Forking
Explanation
Forking is the term used to describe a process spawning or initiating another process. When a process forks, it creates a copy of itself, resulting in two separate processes - the parent process and the child process. The child process is an exact copy of the parent process, and both processes continue their execution independently from the point of forking. This concept is commonly used in operating systems to create new processes and manage concurrency.
3.
How can you bypass the wait function and send a
user process to the background?
Correct Answer
D. You can use the Ctrl+z key combination and the bg command.
Explanation
The Ctrl+z key combination is used to suspend a process, and the bg command is used to send the suspended process to the background. This allows the user to bypass the wait function and continue executing other commands while the process runs in the background.
4.
The at command is used to _______________.
Correct Answer
C. Schedule processes to run at a single instance in the future
Explanation
The at command is used to schedule processes to run at a single instance in the future. It allows users to specify a specific time and date for a process to run, and the process will execute only once at that scheduled time. This is useful for tasks that need to be performed at a specific time, such as running a backup or performing system maintenance.
5.
What command is used to view and modify user jobs
scheduled to run with cron?
Correct Answer
A. Crontab
Explanation
The crontab command is used to view and modify user jobs that are scheduled to run with cron. Cron is a time-based job scheduler in Unix-like operating systems, and it allows users to schedule and automate recurring tasks. By using the crontab command, users can view the current cron jobs and make modifications to them as needed. This command provides a simple and efficient way to manage scheduled tasks in the system.
6.
Every process has a process ID and a__________.
Correct Answer
D. Parent process ID
Explanation
Every process in an operating system has a unique process ID assigned to it, which helps in identifying and managing the process. In the context of the given question, the process being referred to is likely a child process that has been created using the fork system call. When a child process is created, it inherits the process ID of its parent process. Therefore, the correct answer is "parent process ID."
7.
The killall command terminates _____________.
Correct Answer
D. All instances of a process with the same name
Explanation
The killall command terminates all instances of a process with the same name. This means that if there are multiple processes running with the same name, the killall command will terminate all of them at once. It is a useful command when you want to stop all processes with a specific name, rather than having to manually terminate each one individually.
8.
Nice values are used to affect process priorities
using a range between _____________.
Correct Answer
D. –20 and 19
Explanation
Nice values are used to affect process priorities by assigning a value within a range. The range for nice values is typically between -20 and 19. A lower nice value indicates a higher priority for the process, while a higher nice value indicates a lower priority. In this case, the correct answer is –20 and 19, as it correctly represents the range of nice values used to affect process priorities.
9.
What is the name given to a process not
associated with a terminal?
Correct Answer
D. Daemon process
Explanation
A daemon process refers to a process that runs in the background without being associated with a terminal. It is typically started during system boot and performs various tasks such as handling network services, monitoring hardware devices, or performing scheduled tasks. Unlike user processes that are initiated by users and run in the foreground, daemon processes operate independently and do not require user interaction.
10.
To kill a process running in the background, you
must place a % character before its process ID. True or False?
Correct Answer
B. False
Explanation
To kill a process running in the background, you do not need to place a % character before its process ID. This statement is false. In most operating systems, including Unix-like systems, to kill a process, you typically use the "kill" command followed by the process ID, without the need for any special characters. The % character is not required for this purpose.
11.
What kill level signal cannot be trapped?
Correct Answer
B. 9
Explanation
A kill level signal of 9 cannot be trapped because it represents a signal that is used to terminate a process abruptly. In most operating systems, a kill level signal with a value of 9, also known as SIGKILL, cannot be caught or ignored by a process. When a process receives a SIGKILL signal, it is immediately terminated without any opportunity to clean up or handle the signal. Therefore, a kill level signal of 9 cannot be trapped or intercepted by a process.
12.
A runaway process that is faulty and consuming
mass amounts of system resources ___________.
Correct Answer
D. Is a rogue process
Explanation
A runaway process that is faulty and consuming mass amounts of system resources is considered a rogue process. This term is used to describe a process that is behaving abnormally and using excessive resources, causing disruptions and potentially impacting the overall system performance. Unlike a zombie process, which is a process that has completed execution but still has an entry in the process table, a rogue process is actively running and causing problems.
13.
Which command is used to gain real-time
information about processes running on the system with the most processor-intensive
processes listed at the beginning of the list?
Correct Answer
C. Top
Explanation
The correct answer is "top". The "top" command is used to display real-time information about processes running on the system. It provides a dynamic view of the system's processes, with the most processor-intensive processes listed at the beginning of the list. This command is commonly used for monitoring system performance and identifying resource-intensive processes.