Results 1 to 6 of 6

Thread: Processes and Signals in Linux

  1. #1
    Join Date
    Sep 2010
    Posts
    12

    Processes and Signals in Linux

    I know that Linux is a multitasking operating system. This means that many processes can be running simultaneously. The "contemporary" is, when we have a single processor, in fact, frequently alternating simulated the execution of various processes. Multitasking is very important for the Internet, just because a server must respond to multiple requests arrive simultaneously. I am not aware about the processes and signals in Linux. So I thought to take some notes from you guys. Please provide some essential notes about the processes and signals that are observed in Linux operating system. Since, I am not expert in Linux, I am requesting you to mention the information in details.

  2. #2
    Join Date
    Feb 2010
    Posts
    531

    Re: Processes and Signals in Linux

    Multitasking is very important for the Internet, just because a server must respond to multiple requests arrive simultaneously.
    In fact, when a Linux system starts, start some processes, called daemons, which remain in the background to serve the needs of users. With the ps command can examine the processes running at the time. Without any parameters this command displays the running processes for the user who invoked. The parameters of PS are quite different between the various versions of Linux. Here's an example (partial) output possible with Linux:
    $ Ps x
    PID TTY STAT TIME COMMAND
    1? S 0:02 init [3]
    2? SW 0:00 (kflushd)
    3? SW <0:00 (kswapd)
    105? S 0:01 klogd
    116? S 0:00 crond
    128? S 0:00 inetd
    139? S 0:00 lpd
    167? S 0:00 httpd
    179? S 0:00 smbd-D
    188? S 0:00 nmbd-D
    202 2 S 0:00 / sbin / mingetty tty2
    208? S 0:00 update (bdflush)
    274? S 0:02 in.telnetd
    465? S 0:00 bash
    714? R 0:00 ps ax

  3. #3
    Join Date
    Feb 2010
    Posts
    524

    Re: Processes and Signals in Linux

    We can see the various processes running at the time. For each process shows the pid (process identifier), a unique number that is assigned by the system to uniquely identify each process, the terminal it runs on, the state (swapped, Running, or Suspended). We note that the process is init pid 1, which is the process that goes first and starts up the rest. They are also running several demons have a name by convention ending in d. For example, cron is the daemon that sends program execution at certain intervals of time, the Internet super daemon inetd is in charge of running other demons when there is need. In the example we have connected via telnet, inetd, and who sent in.telnetd running, the daemon that allows us the telnet connection. More interesting are the demons' httpd, or the Web Server that makes the car a full member of the World Wide Web, the Samba (smbd and nmbd), which make our Linux file server for Windows and so on. In our example, after we connected via telnet, is playing a shell, bash, from which we have relied on the ps command that generated the output.

  4. #4
    Join Date
    Feb 2010
    Posts
    428

    Re: Processes and Signals in Linux

    Being able to start the demons is very important when you administer a Linux system. Most of the time is very simple: just run the program, which is split into two parts: one is a resident and the other ends, return to the prompt, it is the case of the name server named: just call, and activates the splits daemon (part ends and we return to the prompt, the other is to serve the request). Other programs work the same way but they need some extra switches. For example, the demon of the e-mail, sendmail (which, usually the exception, not a name that ends with d), to split and become a demon must be invoked as sendmail-bd. Other programs simply do not split, and background processes to be made with a shell command. For example, the daemon must be activated with msqld Mini SQL &. The '&' communicates itself to the shell to split the command and send it running in the background.

  5. #5
    Join Date
    Feb 2010
    Posts
    471

    Re: Processes and Signals in Linux

    There is a connection between the processes and permissions. A process has the permissions of the user who started it. If I logged in as foo, for example, will not be able to start the daemon of the mail, the sendmail. In fact, this program is to sort the mail that comes to the various users, and therefore must be able to write in all mailboxes of all users. On the other hand, the users' mailboxes may not be readable at all (for obvious security reasons) then sendmail must have root permissions. For this reason, only root can activate certain demons. Other daemons can be activated by users, such as the httpd which can also be made from any user. Sometimes it is necessary to communicate with a demon, most of the time to finish it. This is done using the kill command, which generally do not really need to "kill" a process (even if it is the most frequently used), but to send a signal. Linux has dozens of different signals, which can be listed using the command kill itself:
    $ Kill-l [partial output]
    1) SIGHUP
    2) SIGINT
    3) SIGQUIT
    9) SIGKILL
    10) SIGUSR1
    11) SIGSEGV
    12) SIGUSR2
    14) SIGALRM
    15) SIGTERM

  6. #6
    Join Date
    Feb 2010
    Posts
    173

    Re: Processes and Signals in Linux

    The list mentioned by the "Sharanya", varies from system to system, these are the most common signals between the various Linux. The kill command takes the PID of the process that you want to send a signal and the signal, which is SIGTERM if not specified. By convention this is the signal that is used by processes to "terminated", but it is said that a process meets crazy. Then it uses the signal number 9, SIGKILL, which is the only one that can not be intercepted, and in fact is the true way to "kill" in a secure manner is a process crashed <pid> kill -9. If you prefer, you can also type kill-KILL <pid> as signal names can be given by name.

Similar Threads

  1. HTC HD2 is always getting low network signals
    By Poeter in forum Portable Devices
    Replies: 5
    Last Post: 27-04-2011, 10:34 PM
  2. Weak antenna signals on iPhone
    By Januarius in forum Portable Devices
    Replies: 4
    Last Post: 08-02-2011, 01:51 AM
  3. Nexus One drops 3G signals alternately
    By Alysa in forum Portable Devices
    Replies: 3
    Last Post: 29-05-2010, 01:34 PM
  4. Replies: 4
    Last Post: 30-04-2010, 03:46 AM
  5. linux command to show processes
    By Aramax in forum Operating Systems
    Replies: 3
    Last Post: 26-05-2009, 11:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,653,303.69104 seconds with 17 queries