General discussion

Locked

I/O interrupts

By neilmay2 ·
If an I/O device interrupts the CPU. What sequence of events could possibly follow??

Cheers

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

What ???

by astral_traveller In reply to I/O interrupts

What kind of question is theese senior ??? Do you have I/O probleems ??? Or are have you "gone fishing" for probable causes ??? As anyone who deals with technology knows, There are certain words you use daily. The answers to any technology related problems absolutely must contain the words,...Sometimes, Should, Probably, Maybe, Strange and last but not least, I've never seen that before !!! Use a hand full of PC jargon carefully mixed with these words and you ...Sometimes get it fixed, It should work for 75% of the time, Probably more, Maybe less. Strange this, but, Then I've never seen this before...Does that answer it. ( Maybe ??? )

Collapse -

What ???

by astral_traveller In reply to I/O interrupts

What kind of question is theese senior ??? Do you have I/O probleems ??? Or are have you "gone fishing" for probable causes ??? As anyone who deals with technology knows, There are certain words you use daily. The answers to any technology related problems absolutely must contain the words,...Sometimes, Should, Probably, Maybe, Strange and last but not least, I've never seen that before !!! Use a hand full of PC jargon carefully mixed with these words and you ...Sometimes get it fixed, It should work for 75% of the time, Probably more, Maybe less. Strange this, but, Then I've never seen this before...Does that answer it. ( Maybe ??? )

Collapse -

What ???

by astral_traveller In reply to I/O interrupts

What kind of question is theese senior ??? Do you have I/O probleems ??? Or are have you "gone fishing" for probable causes ??? As anyone who deals with technology knows, There are certain words you must use daily. The answers to any technology related problems absolutely must contain the words,...Sometimes, Should, Probably, Maybe, Strange and last but not least, I've never seen that before !!! Use a hand full of PC jargon carefully mixed with these words and you ...Sometimes get it fixed, It should work for 75% of the time, Probably more, Maybe less. Strange this, but, Then I've never seen this before...Does that answer it. ( Maybe ??? )Or you could study a MOBO manual and look at the board flow charts / diagrams, look at how the architecture is integrated with the different bus types, the rest will depend on the I/O peripherals.

Collapse -

What ???

by astral_traveller In reply to I/O interrupts

What kind of question is theese senior ??? Do you have I/O probleems ??? Or are have you "gone fishing" for probable causes ??? As anyone who deals with technology knows, There are certain words you must use daily. The answers to any technology related problems absolutely must contain the words,...Sometimes, Should, Probably, Maybe, Strange and last but not least, I've never seen that before !!! Use a hand full of PC jargon carefully mixed with these words and you ...Sometimes get it fixed, It should work for 75% of the time, Probably more, Maybe less. Strange this, but, Then I've never seen this before...Does that answer it. ( Maybe ??? )Or you could study a MOBO manual and look at the board flow charts / diagrams, look at how the architecture is integrated with the different bus types, the rest will depend on the I/O peripherals.

Collapse -

Interrupt Basics

by TheChas In reply to I/O interrupts

Technically, the CPU itself directly handles only real hardware interrupts.
Many "house-keeping" tasks are hard coded into the logic structure of the CPU.

Basically, a hardware interrupt causes the CPU to pause the active process.

Then the CPU checks the priority of the new interrupt.

If the new interrupt has a lower priority than the process the CPU was running, the CPU returns to that process.

If the new interrupt has a higher priority, the CPU services the interrupt.

The specifics of the interrupt determine what the CPU does to service the interrupt.
It could be as simple as incrementing a counter, or as complex as re-writing a large portion of the Hard Drive (virtual memory refresh)

Software interrupts are handled by the BIOS and / or operating system and running programs / processes / services.

While the sequence is similar, and the CPU ultimately processes the request, software interrupts have a very complex flow chart.

On a Windows based PC, the sequence of events can vary each time the interrupt calls. A micro-second difference in timing can change the sequence of events.

Chas

Collapse -

Be careful!

by admin In reply to I/O interrupts

If the CPU is interrupted it may get too hot and even damage the motherboard.

Collapse -

Interrupts

by GuruOfDos In reply to I/O interrupts

In any system, events happen at certain specific times. Other events happen as and when. To look for an event (e.g., mouse click, clock timer 'tick', or keypress) a computer can use two methods:

1) Polling
2) Interrupts

Polling means the CPU has to stop what it is doing on a frequent basis to run a loop of code that checks status of system devices. This is time consuming when every event has to be looked for, even thought it may be very infrequent.

The second method is to use interrupts. When an event occurs, a signal is sent to the processor to inform it that an 'event' has happened. Depending on the priority, the CPU will stop what it is doing, then run an interrupt handler to process this event. When the event has been processed, the CPU then resumes from where it left off.

There are two kinds of hardware interrupt - Maskable and Non Maskable. Maskable interrupts can be prevented by code...non-maskable ones (NMI's) can't. One key NMI is the process used to 'refresh' the memory at set intervals....if this was masked, the system RAM would lose data!

The Interrupt Controller (once a discreet chip, but now part of the chipset) processes the interrupts and signals the processor.

Hardware ints (IRQ's) come from various devices. IRQ2 is the keyboard, IRQ3/4 for serial Comms, 5/7 for sound/printer and 14/15 for hdc's. The lower the number, the higher the priority.

When an int occurs, the CPU pushes the current program instruction pointer (IP), register contents and status flags onto the stack. The Int controller in conjunction with an Int Address Table in memory then tells the CPU to execute code at a particular address. This is the handler. The CPU executes this routine (gets a valid key, refreshes the DRAM, increments the system time or whatever) then restores the CPU IP, registers etc, then the CPU can continue what it was doing before the interrupt.

Collapse -

software interrupts

by neilmay2 In reply to Interrupts

Can any one give me a specific situation relating to a software interrupt.
thanx

Collapse -

Software Interrupt

by GuruOfDos In reply to software interrupts

Yes....an example of a software interrupt is INT 21. This is the DOS interrupt call for various services. By passing a parameter in AL and other parameters in other registers, various DOS services can be called (output a string to screen, output single character to screen, etc).

Many simple routines are built into BIOS or DOS and can be called by the INT command to save having to re-write code for the most basic functions.

DOS maintains an INT table in memory with addresses and segments of INT routines. Programmers can either call these routines directly or change these call addresses to run custom code. One example is to add hotkeys or other functionality to the keyboard INT routine. For example if a program needs to perform tasks triggered by the keyboard, the INT routine for the keyboard handler can be remapped to a new address, where a routine can be added to intercept particular keystrokes. The routine, on terminating, then passes control to the original INT routine to allow processing of normal keyboard events.

This technique is uses on the Vine Micros Multivideo Card. Running a TSR program allows various keys to toggle various features of the card, i.e. ALT-D (toggle digitiser), ALT-O (toggle overlay), ALT-F (freeze image).

Collapse -

Software Interrupt

by GuruOfDos In reply to software interrupts

Yes....an example of a software interrupt is INT 21. This is the DOS interrupt call for various services. By passing a parameter in AL and other parameters in other registers, various DOS services can be called (output a string to screen, output single character to screen, etc).

Many simple routines are built into BIOS or DOS and can be called by the INT command to save having to re-write code for the most basic functions.

DOS maintains an INT table in memory with addresses and segments of INT routines. Programmers can either call these routines directly or change these call addresses to run custom code. One example is to add hotkeys or other functionality to the keyboard INT routine. For example if a program needs to perform tasks triggered by the keyboard, the INT routine for the keyboard handler can be remapped to a new address, where a routine can be added to intercept particular keystrokes. The routine, on terminating, then passes control to the original INT routine to allow processing of normal keyboard events.

This technique is uses on the Vine Micros Multivideo Card. Running a TSR program allows various keys to toggle various features of the card, i.e. ALT-D (toggle digitiser), ALT-O (toggle overlay), ALT-F (freeze image).

Back to Community Forum
11 total posts (Page 1 of 2)   01 | 02   Next

General Discussion Forums