Do UNIX signals produce interrupts?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Do UNIX signals produce interrupts?
Prev   Next
# 2  
Old 05-13-2015
Quote:
Originally Posted by Tru69
Do signals actually produce interrupts (traps) to the signaled processes so they immediately see them?
You seem to intuitively underlay your picture of how things work with the x86 architecture. While this is a very wide-spread platform there are very different designs on which UNIX/UNIX-like systems runs with the same ease as on Intel platforms.

A process signal is no interrupt at all, these are two different things.

An "interrupt" is something (in fact a signal) to the processor, usually issued by an "interrupt controller". It makes the processor get out of its current queue, enter another queue and - after finishing it - either return into the old queue or not.

A "signal" (in the sense of UNIX process signals, like SIGINT, etc.) are merely raised flags in the process accounting/scheduling part of the kernel.

To explain on your own example: when a user presses "CTL-C", a keyboard interrupt is issued, because UNIX, as a midrange system, runs usually on interrupt-driven systems (although not necessarily, like z/Linux, which runs on systems not entirely interrupt-driven, aka IBM mainframes). With PCs this is a BIOS interrupt (09 - keyboard), which will be passed to the keyboard driver. This driver will make sense of all the various make- and break-codes issued by the [8602- or similar]-microcontroller and figure out that the user pressed CTL-C (i am following the Intel-architecture here as it seems to be the one you are most familiar with, other systems might work differently but the principle remains the same). The kernel, learning about the user pressed CTL-C raises some flags in its process scheduling/job control part and the next time the process is passed a CPU the process will "know" that a SIGINT signal was sent. Now the process can decide if to handle it or ignore it.

I hope this helps.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A question about signals in Unix

Whats a signal 0. An exhaustive search on signals landed me nowhere. Is it possible to do something like this trap "echo $var" 0. If so what signal does this trap catch ? (2 Replies)
Discussion started by: kinny
2 Replies

2. UNIX for Dummies Questions & Answers

about concept of Interrupts.

Hi all, I am new here ,i want to know about interrupts in detail.What r Interrupts .how they r handeled. Thanx in adavnce. (1 Reply)
Discussion started by: vishwasrao
1 Replies

3. Linux

How to interrupts work queue with signals

Hi masters, I am doing a project to regulate network bandwidth. I am using workqueue to implement packets management (I uses kernel threads inside each of these work queue) , netfilter hooks to implement packet catcher . All my modules individually works fine . But when I run my workqueues,... (1 Reply)
Discussion started by: iamjayanth
1 Replies

4. UNIX for Dummies Questions & Answers

Traps and Interrupts

Well, I don't know where exactly to ask this doubt so I'm asking in the newbie section. I was reading about traps and interrupts when I thought of traps as something that cease the control of the OS from the user and interrupts that cease the control yet provide support for multitasking. Am I right... (3 Replies)
Discussion started by: Legend986
3 Replies

5. UNIX for Advanced & Expert Users

Interrupts problems

Hi, My machine is a Unixware 7.1.3 is a files server, and I had never problem with that machine, but since two days, the machine presents slows problems, i think that the problem is te device interrupts, I had checked all and I dont found it any problem. Any idea? Thanks, (sorry my... (2 Replies)
Discussion started by: By_Jam
2 Replies

6. UNIX for Dummies Questions & Answers

catching interrupts

hey i have been facing a problem,can you tell me if we can catch ctrl d in unix i have tried and sucessfully catched and disabled ctrl-c and ctrl -z but am not sure if we can do the same for CTRL-D, so got any clue mail on he forum or ...i mean c programming in Unix thats what i am working on (1 Reply)
Discussion started by: toughguy2handle
1 Replies

7. Filesystems, Disks and Memory

Does unix use interrupts?

I'm a freshman here and I have a simple question. Does unix use interrupts which is like Dos? Are they the same? Thx.:cool: (6 Replies)
Discussion started by: Frank_M
6 Replies

8. Programming

Signals in Unix Solaris

I am doing a project to stimulate the scheduing policy of an OS under Unix Solaris. Its something like that: A process, say A will communicate to another process, which is the OS, and then execute the system call, pause(); The stimulated OS will then have to use sigsend(); to send a... (1 Reply)
Discussion started by: heljy
1 Replies

9. Programming

Unix/Linux Newbie(ish) Question - IPC/Signals

:) Hello, i have been given the following code to help me learn how to use signals, it won't compile. The problem maybe because this was written for use in Unix and i am trying to compile in Linux. The error i get says that SIGPIPE and SIG_IGN are undeclared. I think that these are defined... (2 Replies)
Discussion started by: theultimatechuf
2 Replies
Login or Register to Ask a Question