Page 52 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 52
Unit 2: Red Hat Linux 9 Basics
A process can be killed only if we are having permission for it, that is, if we attain permission to Notes
take control of the processes of another user or if it is running under your user account.
This is considered as a security aspect which makes sure that the processes of a user are secured
from being ended by other users. The root, that is, super user is the only exception. As we can
see in Figure 2.25, the user known as sandipb has full access and control over every process that
can be seen in the process list.
The top program needs a signal number to send to the process.
A special message that is sent to the process by the existing process is known as a kill signal. On
accepting the default option of 15, then a signal is sent to the target process which asks it to shut
down on its own. This signal is known as SIGTERM.
Thus, the target process shuts down cleanly after saving all unsaved information. If it is observed
that the program is neglecting this signal, the process can be repeated by sending the signal
number of 9 rather. This will terminate the process and thus it will not get shut down on its own.
2.6.4 Understanding Run Levels
On starting the computer, the operating system loads and starts off the first process. This
first process is known as the init process. Then the init process starts off any necessary
sub-processes. This is done before the computer is used by the user. The operating system
needs some processes to start off after the booting process. These processes are specified by
means of run levels. We can define a run level as a state of the machine, which finds out the
processes to be run.
We have discussed below various run levels which are numbered from 0 to 6:
z z Run level 0: It indicates the stopped state of a machine. If we set the new run level to be 0
when changing run levels, then, it successfully stops the machine.
z z Run level 1: It indicates the single user mode. At run level 1, the machine gets into a super
user Mode. Thus external users cannot make use of the machine and every networking
function gets disabled at this level. Another name for this level is the system maintenance
mode as it is usually used to recuperate from severe system problems.
z z Run level 2: At this level, numerous users are allowed to log in to the machine via virtual
terminals and other login devices. However, it still does not make any networking function
active.
z z Run level 3: All the networking processes are allowed to be started at this level. Thus, all
resources of the system can be used in an efficient manner.
z z Run level 4: This level is considered as unused. We can use it to define your own custom
run level.
z z Run level 5: At this level, the X-server process is allowed to be started and the associated
desktop can be loaded so that users can use the system with a GUI.
z z Run level 6: It indicates the machine’s rebooting state. We can make use of this level to
restart the machine.
z z The current run level of the computer can be determined by making use of the program
run level. This provides two numbers, which symbolize the previous as well as current run
levels.
z z We can change the present run level by utilizing the program telinit. This program is
required to be accomplished as root, and takes a single argument, that is, the run level to
boot to.
Example: We can execute the command telinit 6 to reboot the system.
LOVELY PROFESSIONAL UNIVERSITY 45