Questions tagged [interrupt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
42
votes
1answer
79k views

What are software and hardware interrupts, and how are they processed?

I am not sure if I understand the concept of hardware and software interrupts. If I understand correctly, the purpose of a hardware interrupt is to get some attention of the CPU, part of implementing ...
33
votes
4answers
76k views

How is an Interrupt handled in Linux?

I just know that Interrupt is a hardware signal assertion caused in a processor pin. But I would like to know how Linux OS handles it. What all are the things that happen when an interrupt occurs?
19
votes
4answers
13k views

Why can't ed be exited with C-c?

The program ed, a minimal text editor, cannot be exited by sending it an interrupt through using Ctrl-C, instead printing the error message "?" to the console. Why doesn't ed just exit when it ...
15
votes
3answers
9k views

What is the relationship between system calls, message passing, and interrupts?

I am reading the Wikipedia article for process management. My focus is on Linux. I cannot figure out the relation and differences between system call, message passing and interrupt, in their concepts ...
14
votes
3answers
21k views

How does the Linux kernel handle shared IRQs?

According to what I've read so far, "when the kernel receives an interrupt, all the registered handlers are invoked." I understand that the registered handlers for each IRQ can be viewed via /proc/...
11
votes
3answers
5k views

How does make continue compilation?

I know that I can interrupt a make process anytime without having to recompile the entire source tree again. As I know, make only compiles a target if it's not compiled yet, or the source code is ...
9
votes
1answer
24k views

How to debug causes of excessive ksoftirqd resource usage?

man ksoftirqd indicates that: If ksoftirqd is taking more than a tiny percentage of CPU time, this indicates the machine is under heavy soft interrupt load. I'm working with a Debian Wheezy ...
8
votes
4answers
9k views

Ctrl + c will not kill process

I have looked for answers and so far have found nothing to answer my question. I am currently logging in to my Ubuntu server and upon running a process I can not run any of the interrupts on it. Here ...
7
votes
1answer
2k views

Interrupt sequence CTRL+C does not work for user

In any terminal operating under GNOME, if I press Ctrl+C, I only see a question mark. Same goes for Ctrl+Z. The output of stty -a | grep intr is: intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D;...
6
votes
1answer
10k views

What happens after a page fault?

When a page fault occurs in a Linux system, the interrupt-handler has to figure out the reason why the page fault happened. But how ? Is there anywhere a special number for that !? If yes, where is ...
6
votes
4answers
5k views

How can I handle SIGINT trap with a user prompt in shell script?

I am trying to handle SIGINT/CTRL+C interrupt in such a way that if a user accidentally presses ctrl-c, he is prompted with a message, "Do you wish to quit?(y/n)". If he enters yes, then exit the ...
6
votes
3answers
6k views

Making a IRQ SMP Affinity change permanent

I have to change the smp_affinity of a interrupt permanently. The following code needs to be executed when the server reboots: echo "1" > /proc/irq/152/smp_affinity_list echo "2" > /proc/irq/...
5
votes
2answers
10k views

How to generate signal interrupt on a file descriptor in Linux?

How can I generate a signal interrupt on a file descriptor in Linux? Motivation is to generate a interrupt in userland as we have in microcontrollers. I'll have file descriptor for I/O, and want to ...
5
votes
4answers
6k views

Is there a utility that interprets /proc/interrupts data in time?

is there something out there ? Like top is for ps
5
votes
1answer
3k views

Ctrl+c and Ctrl+z to interrupt/suspend jobs

To kill a hanging job, I use Ctrl+c, to send an interrupt signal to the hanging job. Sometimes this wouldn't stop the job, at least not immediately. I can then use Ctrl+z to suspend the job and then ...
5
votes
1answer
2k views

Programmatically determine the IRQs associated with a network interface

What is the most reliable way to programmatically determine the IRQs associated with a network interface, given the name of the interface (e.g. eth0)? I'm okay with a best-effort approach, but I'd ...
5
votes
2answers
5k views

What determines whether an interrupt is IO-APIC-edge or IO-APIC-level?

Looking at the contents of /proc/interrupts on an x86 Linux, I see that some of the interrupts are IO-APIC-edge while others are IO-APIC-level. I wonder what determines the interrupt type, is it the ...
4
votes
3answers
5k views

'fast interrupts' in Linux

as far as I know, Linux has 'fast interrupts', those that were requested with SA_INTERRUPT flag; fast interrupts are executed with all other interrupts disabled on the current CPU. But how does it ...
4
votes
2answers
4k views

re-entrency of interrupts in Linux

I was reading "Linux device drivers, 3rd edition" and don't completely understand a part describing interrupt handlers. I would like to clarify: are the interrupt handlers in Linux nonpreemptible? ...
4
votes
1answer
1k views

What does `/proc/irq/…/spurious` contain?

Here is the output from cat /proc/irq/79/spurious: count 28 unhandled 0 last_unhandled 0 ms What are these parameters indicating here — count, last_unhandled? Is this count indicating the number of ...
4
votes
1answer
2k views

Does each network packet cause an interrupt to CPU?

While I know that lot of packet processing(CRC calculations, packet segmentation handling, etc) can be offloaded to NIC, then does each packet still cause an interrupt to CPU? Is there a difference if ...
4
votes
2answers
1k views

How to programmatically detect when a device raises an interrupt?

How to programmatically detect when a device raises an interrupt? This can be when a device is connected or disconnected. And also this case: for example: when a finger is held over a fingerprint ...
4
votes
1answer
3k views

Are time interrupts always followed by a scheduler call?

When a timer interrupt occurred the ISR is called to service the interrupt. Is it okay to assume that every timer interrupt ends with a call to the scheduler on which process should continue running ...
4
votes
1answer
256 views

Saving data from kernel module into userspace

I have been playing around kernel programming for a while and want to create this simple data acquiring interface with some custom hardware. For portability and reusability, I do the whole thing on my ...
4
votes
1answer
3k views

What does Linux's “nointremap” option do?

Ubuntu 12.10 alpha 2 works perfectly on my new 11" 2012 Macbook Air, but only when I boot with the "nointremap" option. Supposedly this is not good to use as a permanent solution. What exactly does ...
4
votes
1answer
335 views

Interrupt shell command line expansion

Warning: DO NOT attempt the commands listed in this question without knowing their implications. Sorry if this is a duplicate. I am surprised to learn that a command as simple as echo $(yes) ...
4
votes
2answers
3k views

change interrupt smp_affinity

As you can see below, nvidia is sharing the intrerrupt and the interrupt is using only CPU0, how can I change the interrupt for nvidia, and how can I make it use both CPU's ? Here is an article ...
4
votes
1answer
532 views

Apart from USR1 and USR2, which signals can I safely use for custom interrupting behavior? (in python)

I have a complex application with USR1 and USR2 already defined as having a well-defined and not replaceable purpose. There are tons of different signals in linux. Might there be another one (maybe a ...
4
votes
0answers
2k views

“Remote function call interrupts” (CAL in /proc interrupts). What is it?

I'm running a test program which generates a large number of threads and asynchronous I/O. I'm seeing very high counts of these interrupts in /proc/interrupts, the program cannot scale beyond a ...
3
votes
1answer
1k views

Why doesn't SIGINT work on a background process in a script?

I have the following in a script: yes >/dev/null & pid=$! echo $pid sleep 2 kill -INT $pid sleep 2 ps aux | grep yes When I run it, the output shows that yes is still running by the end of ...
3
votes
1answer
3k views

Are threads which are executing blocking system calls awoken by interrupts?

I've been reading a bit about threads and interrupts. And there is a sections which says that parallel programing using threads is simpler because we don't have to worry about interrupts. However, ...
3
votes
1answer
74 views

What's the policy determining which CPU handles which interrupt in the Linux Kernel?

I've been reading Linux Kernel Development and there's something that's not entirely clear to me -- when an interrupt is triggered by the hardware, what's the criterion to decide on which CPU to run ...
3
votes
1answer
147 views

How to ignore interrupts with piped commands

In the following chain of piped commands, when an interrupt is sent with Ctrl-C, ping is able to print its summary statistics before exiting, as long as tee has the -i (ignore interrupts) flag: ping -...
3
votes
2answers
3k views

The interrupt timeline for a single process doing output

I'm studying the book 'Operating System Concepts' 9th edition. In the first chapter, part 1.2.1 computer system operation, I can't understand the figure 1.3: Can any one make a quick interpretation ...
3
votes
1answer
3k views

When is `irqbalance` needed in a Linux VM under VMware?

I have a Linux farm in VMware Enterprise 5.5. The VMs are (mostly) 64-bit amd64 Debian Jessie servers with SysVinit and not systemd. The VMs have open-vm-tools installed. I paravirtualized their ...
3
votes
2answers
1k views

Is there any Syscall table just like Interrupt Table?

Are the system calls like fork(), exit() saved in some kind of function pointer table , just like the Interrupt Descriptor Table ? where does my OS go when I call my fork() or exit() ? I guess this ...
3
votes
1answer
740 views

Minimizing hardware interrupts

I am using a modified Linux kernel as a soft real-time OS, on a system that has an architecture like this: CPU1 and CPU2 have 8 cores each. I have 4 processes that need to be run with minimum jitter, ...
3
votes
1answer
2k views

Why EC2 instance spends all its time in “IRQ” and what to do about it?

I have an m1.small EC2 instance that is mostly just running Apache as a web server for several simple PHP web sites (that use RDS as a database). The server is constantly with a very high load average ...
3
votes
0answers
83 views

Is there a way to route interrupts from two Ethernet interfaces to separate cores?

I have a 10G ethernet adapter from Intel with two ethernet ports (x550-T2) installed in PCIe port of a Xilinx FPGA board running petalinux. I am testing network bandwidth by running simultaneous ...
3
votes
0answers
2k views

What is the difference between Local timer interrupts and the timer?

When I do cat /proc/interrupts on my multicore x86_64 desktop PC (kernel 3.16) I see this: 0: 16 0 IO-APIC-edge timer LOC: 529283 401319 Local timer interrupts When ...
2
votes
2answers
664 views

Main stacks in Linux

What are the main stacks in Linux? What I mean is, for example when an interrupt occurs what stack will be used for it, and what is the difference between user process and kernel process stacks?
2
votes
2answers
6k views

Can system calls be interrupted?

Please comment on the following sentence: On the standard Linux kernel without the rt patch, interrupts can't interrupt ongoing system calls. The reason why our machine doesn't stop working ...
2
votes
1answer
3k views

How does keyboard interrupt ends up as process signal

I'm studying the linux kernel right know with O'Reilly's Understanding Linux Kernel and lately covered the signal and interrupt handling chapter sticking to some basic 2.4 linux version and diving ...
2
votes
1answer
31 views

How to deduce the nature of an interrupt from its number?

I'm trying to boot/install Linux for learning purposes, using an older PC (HP Pavilion Elite m9660de). The following message is the first thing that shows up when booting (Ubuntu and Fedora, both from ...
2
votes
1answer
119 views

How to restrict interrupt signal to just the child process?

I have a bunch of log files and I want to do a tail -f on them in a loop such that when I press Ctrl-C, the current tail -f gets killed and I proceed to the next log file: for log in *.log; do ...
2
votes
2answers
139 views

What happens when a new hardware is connected for first time in Linux?

Suppose, I have connected a device to a PC. Question: How does the Linux OS (Ubuntu) realizes that a new hardware device is connected? Answer: The newly connected device raises an Interrupt (and ...
2
votes
1answer
2k views

What is the functionality of SCHED_SOFTIRQ in linux?

Who raises this softirq? Is it raised on every time tick( based on timer interrupt?) Does this make the kernel to shedule a runnable process? If yes, how does the handlers of lower priority softirqs ...
2
votes
1answer
3k views

How to know if an IRQ value is free to use

If we add a device that does not support PNP (Plug-an Play), the manufacturer will hopefully provide explicit directions on how to assign IRQ values for it. However, if we don't know what IRQ value ...
2
votes
1answer
1k views

Generate interrupts for purpose of stress testing

I'm testing the quality of a generated PWM signal on a Raspbery Pi. I would like to test how it behaves if there are lots of interrupts coming. Is there a way to fake interrupts or force 2000 ...
2
votes
0answers
30 views

What mechanism is used by Linux (or hardware) to ensure that any interrupt capable device does not cause too many interrupts?

At the level of interrupts, one would think that there has to some way for a maximum rate to be defined. Otherwise, a malicious device might be able to slow down the system, by continuously giving off ...