Skip to main content

Process, Priority, & Singnal concepts in Red Hat

Process, Priority, & Singnal concepts 

A process is an instance of a running program. Processes have their own address space in memory, thread of execution, and characteristics such as security context, environment and current priority. The Linux kernel tracks every aspect of a process by its process ID number (or PID). Information about each process is advertised by the kernel to user programs through the /proc/PID directories.

When a process starts another program, the new program is called its child process. Child process can have their own children, and so on. When a parent process exits all of its descendant processes also exit.

Signals
The Operating system communicates to processes through signals. These signals report events or error situations to processes. One typical signal is SIGTERM, which terminates the process; it asks it to exit cleanly. Another is SIGKILL, which kills the process; the process is required to exit immediately.

Process scheduling
Only one process at a time may be executing per logical processing unit on its CPUs. Therefore, every process which is ready to run has a scheduling priority: a ranking among ready processes determine which should should get to run next.
The Linux process scheduler divides CPU time into time slices, in which each process will get a turn to run on a logical processing unit, higher priority first. The formula for calculating this priority is complex, but users can affect the priority by setting the niceness value for a process.
Niceness values range from -20 to +19, which indicates how much of a bonus or penalty to assign to the priority. Most processes run with a niceness value of 0 (no change). Smaller numbers are higher priority. Processes with a higher priority will run first in each time slice, and will run longer before its turn to run ends.

Note: carefully the effect of niceness. If all ready processes have the same priority, they will share the processor equally. priority only has an effect when two processes at different priority levels are competing for CPU time.

Monitor Processes by CPU or Memory Consumption
The GNOME System Monitor (gnome-system-monitor) is a utility which makes it easy to observe which processes are running on the system and what resources they are currently using. It also provides a means to terminate or kill processes and to adjust their current niceness values.


Q1. There is a process running on your system with the name process101. you will first adjust its nice value, then terminate the process, using System Monitor. Change the nice value of process101 to 7. Write down the steps you took to make that happen.
Ans. 1. launch System Monitor by selecting Application->System Tools->System Monitor.
         2. Higlight the process in question.
         3. Selecting Edit->Change Priority
         4. Adjust the slider to the desired priority.
         5. Click the Change Priority button.
         6. Verify the priority in the Nice column.
Now terminate the process101 
         1. Launch System Monitor by selecting Application->System Tools->System Monitor.
         2. Highlight the process in question.
         3. Click the End Process button in the bottom-right corner.
         4. If the process does not terminate.
             A. Highlight the process.
             B. Select Edit->Kill Process.
             C. Click on the Kill Process button in the dialog box to confirm.






Comments

Popular posts from this blog

Red Hat Enterprise version list

Red Hat Enterprise Linux 6 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 6 Update 4 TBA TBA TBA RHEL 6 Update 3 2012-06-20 2012-06-19 RHSA-2012-0862 2.6.32-279 RHEL 6 Update 2 2011-12-06 2011-12-06 RHEA-2011:1743 2.6.32-220 RHEL 6 Update 1 2011-05-19 2011-05-19 RHEA-2011:0540 2.6.32-131.0.15 RHEL 6 GA 2010-11-09 - 2.6.32-71 Codename: Santiago (based on a mix of Fedora 12, Fedora 13, and several modifications) Red Hat Enterprise Linux 5 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 5 Update 9 TBA TBA TBA RHEL 5 Update 8 02/20/2012 02/20/2012 RHEA-2012:0315 2.6.18-308 RHEL 5 Update 7 07/21/2011 07/20/2011 RHEA-2011:0977 2.6.18-274 RHEL 5 Update 6 01/13/2011 01/12/2011 RHEA-2011:0020 2.6.18-238 RHEL 5 Update 5 03/30/2010 03/30/2010 RHEA-2010:0207 2.6.18-194 RHEL 5 Update 4 09/02/2009 09/02/2009 ...

Installation Red Hat Enterprise & make standered partition

First of all select DVD and reboot your computer. After Booting from DVD you will get below screen. Select  Install or Upgrade an Existing System and press Enter. If you get the following screen then let Anaconda take another step. Select your preferred  Language and Select  Keyboard Layout . In Following Screen you will be able to see 4 Installation Methods, Let me explain Methods here:- Local CD/DVD – It is obvious that If you use CD/DVD media then Choose this option. Hard Drive – Select this if you have dumped your source into any other Linux partition. NFS Directory – You can select this option if you have configured NFS server. URL – Select this if you want to install using FTP or HTTP Source link. So for step by step installation of RHEL 6 I had  Local CD/DVD Installation Method. If you are not sure about your media then select  OK to verify else select  Skip . If your media is fine till now it will take ...

MBR, Primary, Extended & Logical partition in Red Hat

MBR, Primary, Extended & Logical partition in Red Hat Hard disk and storage device are normally divided up into smaller chunks called partitions. So that different parts of it can be formatted with different file system or used for different purposes. For example, one partition could contain user home directories while another could contain system data and logs; by placing the data in two separate file system on two separate partitions, even if a user fills up the home directories partition with data, the system data partition may have space. Most Red Hat Enterprise Linux system on the x86 and x86-64 processor architectures use the MBR partitioning format for their hard disk. This is the same format that is used by most Microsoft Windows systems, and dates back to the IBM PC.                              Storage device: /dev/sda In this format, the first sector of the disk is reser...