Find the answer to your Linux question:
Results 1 to 3 of 3
hi all, any one know what is the difference between signals & interrupts? please let me know......
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2012
    Posts
    42

    difference between sinals & interrupts


    hi all,
    any one know what is the difference between signals & interrupts?


    please let me know...

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,198
    Signals are part of Linux. They can be sent by the kernel to a process or between processes. There are also signals that you can send from your keyboard. Interrupts belong to hardware.A device raises an interrupt when it wants the kernel to attend to it.

    Confusingly one of the signals that you can send to a currently running program is called the interrupt signal (SIGINT). You send it by pressing ctrl-C.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    Actually, Hazel is about 3/4 correct. There are software as well as hardware interrupts. They are both handled in the kernel, which has an IDT (interrupt descriptor table), a set of function vectors that are called when the interrupt occurs. Signals are triggers for software interrupts that get passed back to the user-space code that interrupts (unless masked out) the user-space program. For example, I set up a function in my programs that is called when a SIGINT signal occurs so that it can clean up resources before it exits. The default behavior is to simply kill the program. Another example of a signal handler is in the system 'dd' (disk dump) utility. They can run a long time when writing an entire disc image, so it is written so that the SIGUSR1 signal will cause it to dump to the terminal a progress report. The system 'kill' command is typically used to signal a task. Anyway, here is a nice set of slides in a PDF that covers the subject matter very well: http://cs-pub.bu.edu/fac/richwest/cs...es/wk3_pt2.PDF
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •