Web Advertising | Loans | Problem Mortgage | Personal Loans | Credit Cards
Info for all *read me* IRQ, PNP, Sharing [Archive] - PCMech Forums

PDA

View Full Version : Info for all *read me* IRQ, PNP, Sharing


Toaster
07-31-2000, 09:03 PM
Hi folks,
I keep seeing this type post over and over and thought i`d go into some detail to shed light on "system resources". These resources are finite and when exhausted *will* cause problems when another device/adaptor is installed. PNP or "plug and pray" is a BIOS function that attempts to allocate resources automaticaly. In many cases it works and works well. However, sometimes it does not.
Each PNP capable device has a "perferred" setting, a secondary setting, a tertiary setting and a fall back setting in which all control is handed over to the BIOS and a PNP O/S (like win9x and many others).
When there are free interupts available, the device requests a particular interupt. If it`s available, the requested interupt is allocated to that device and all is well.
However, when a requested interupt is already allocated, the device reverts to a secondary choice and if this is not available a tertiary interupt request is made. Failing this, the device hands control to the system BIOS and O/S and "takes what it gets". This is not the best solution because the device may "jocky" for its primary choice by contantly quizzing the O/S and BIOS. Should a perferred IRQ (Interupt) become available, the device is granted access to the IRQ. Otherwise it keeps "jokeying" and quizzing waisting CPU time and using system bus bandwidth. This can cost well above 20% of CPU time, iv`e seen over 40% on several occaision. If a device gets its primary choice, the system becomes stable and the device doesn`t jocky for it`s primary IRQ request. Often, if the device is granted its secondary IRQ request the system stabilizes and minimal "jockying" is done.
Here is a list of common IRQ`s and ones you CAN NOT change. Those marked with "*" are system IRQ`s and those unmarked are "user device" available IRQ`s:

(*) IRQ0=system timer
This IRQ does NOT appear on the I/O bus and CAN NOT be allocated by the user.
(*) IRQ1=system keyboard
Same details as IRQ0.
IRQ2=Interupt controller and a "gateway" to 16bit IRQ`s (10 and up). Most adaptors dont allow you to allocate this IRQ, some do.
If a device allows this IRQ to be used, it often if not always is "rerouted" to IRQ9.
IRQ3= async port/serial port. This IRQ can be disabled in many BIOS`s and may be reclaimed.
It is common for this IRQ to be associated with Comm2 when comm2`s address is 2F8.
IRQ4= async port/serial port. Same details as IRQ3 except if associated with a comm port, its address should be 3F8. Otherwise the function and "usability" of IRQ3 and 4 are identical.
IRQ5= open for add-on devices. This is the primary IRQ for sound cards and LPT2. If you do NOT have a second parr. port, assign your sond card to this IRQ for optimum compatability with gaming software.
*ANY* "soundblaster" sound card should be associated with this IRQ as a primary IRQ.
(*)IRQ6= Floppy interface static IRQ.
This IRQ is not available on the I/O bus *unless* any onboard floppy controller is disabled and a floppy controller is installed in an I/O slot. Otherwise, this is a "system" IRQ and can NOT be otherwise allocated to any device.
IRQ7= Primary LPT (printer) port.
This IRQ is a "standard" IRQ on almost all systems. It DOES appear on the bus and can be allocated if any onboard device does not claim it. Some devices co-exist with IRQ7 *AND* the installed LPT port because on many systems the LPT port is not always "active".
This varies from manufacturer to manufacturer.
(*)IRQ8 RTC (real time clock)
This IRQ does NOT appear on the I/O bus and can NOT be allocated for user devices. This is the "system" clock to keep CMOS time and accessing CMOS data.
IRQ9= Cascade to IRQ2. The "gateway" to 8bit IRQ`s. This IRQ DOES appear on the I/O bus and on many systems it may be allocated by the user for devices.
Most systems allow the use of this IRQ, some do not. I found this to be an IDEAL IRQ for net cards and most SCSI cards that allow its use. This is what I call a "low latency" IRQ because it`s actually allocated by the system but has ample "time" remaining for user use.
Sond card should not be allocated here except those that use an IRQ for "soundblaster" copatability. (midi)
IRQ10= open for user use.
This is a "free" IRQ. It is often the first choice of net cards and vid-cards. All devices can use this IRQ that require a "high" IRQ. This is the start of the "high" or 16bit IRQ`s. (low IRQ`s are 9 and lower)
SCSI cards, add-in IDE cards, vid-cards amongst others consider this IRQ a "primary" choice. "hard set" net cards often default to this IRQ. Soundblaster 16bit and higher cards use this as a secondary IRQ and perform well should IRQ5 be not available.
This could be called a "general purpose" IRQ as most 16bit and higher device perform well here.
IRQ11=Open or "free" for add-on devices.
Same as for IRQ10. Video often "jokeys" for this IRQ and is considered a secondary choice for many devices. This is NOT a suitable choise for sound cards because the card will "jokey" for its primary choise and eat CPU cycles. Great for, SCSI, video and net card umongst many others. Another "general purpose" IRQ.
IRQ12= Actually a free IRQ but the computer community assigned the mouse port to this IRQ. This can be disabled in BIOS as it appears on the I/O bus. Mouse "aware" programs look to this IRQ for the presence of a "pointing device". It is VERY unwise to share or otherwise "move" the pointing device from this IRQ unless a serial mouse is used. In this case, IRQ12 can be freed and made available.
(*)IRQ13= Numeric data processor.
The math chip within your CPU REQUIRES this IRQ to function. It does NOT appear on the I/O bus and can NOT be allocated. This is a hold back from "IBM compatible" days as all software looks to this IRQ for "high math" support. There are a few exceptions to this, but not with "todays" systems.
IRQ14= Primary hard disk controller.
All software calls this IRQ for disk activity. Another hold back from the IMB-AT days when a hard disk controller HAD TO HAVE this IRQ to enable the system to boot from a HDD. Only BIOS controlled HDD controllers can escape this. SCSI and other interfaces that have "on board" BIOS support can access the HDD with other then this IRQ. This IRQ is available on the I/O bus.
(again there are exceptions but I wont go into it to retain clarity)
IRQ15=free interupt UNLESS a secondary hard disk port/controller is installed.
This is in basics the same as IRQ14 in every function. However, a secondary HDD controller/port is almost always allocated here. Should this IRQ be free on your system because you choose not to use the secondary port, many devices will "jocky" for this IRQ because it is services FIRST and gets more then its share of CPU time.
If available, SCSI and other "controller" type devices will attempt to allocate this IRQ for its uses. Net cards often attempt to claim this IRQ.
IRQ`s are "prioritized" in that the higher IRQ`s are serviced first by the CPU to give a device using this IRQ a chance for the I/O bus to move data.
Ideal choices are SCSI, IDE, and "other" high latency devices.

I hope this was useful.
These IRQ`s date back to the 286 and have since gone unchanged. While big surprizes are in store a year or so down the road, this is the way it is......for now.

Tuf
07-31-2000, 11:18 PM
Thanks Toaster...this post should be offered as a story on PC Mech and would help out alot of the guys that are trying to add an enormous amount of gizmos to thier PC's.

Toaster
08-01-2000, 06:37 AM
Thanks Tuff.
When my fingers heal from the previous post, I`ll explore "sharing" or IRQ`s and explore DMA channels.

(what part of OK?)

fredwest
08-01-2000, 10:04 AM
Hi Toaster,
That was a phenominal post and I read every word of it!

For me, anyway, it has shed a lot of light on IRQ assignments and why some can't be changed by the user.

I have saved it for future reference. I know I may need it sooner rather than later http://www.pcmech.com/ubb/biggrin.gif.

Once again thanks for a sharing this info with us! I know we 'mere mortals' here really appreciate the time it took for you to write it..... http://www.pcmech.com/ubb/eek.gif

I personally think it should be considered for 'The Hall of Fame'!


Yours

Declan (aka fredwest) http://www.pcmech.com/ubb/smile.gif

bailey
08-01-2000, 02:25 PM
great post, it should be in my book somewhere.
gave me a better understanding of what my system is doing behind my back.
thanks.

Gintaras
08-01-2000, 03:06 PM
Thanks Toaster,

I have a Q:
If to setup IRQ's manually, each IRQ on my PC BIOS has 2 options:
Legacy ISA or PCI/ISA.

I would like to setup IRQ's manually in BIOS, so I should set:
PNP OS installed: NO
Force Update ESCD: Enabled?
Resources Controlled By: MANUALLY?

How it should be with those PCI/ISA or Legacy ISA?
I just have some guesses about this 2, but not sure.

Thanks again for great post.

Xayd
08-01-2000, 06:38 PM
Any IRQ set to "Legacy ISA" means that a PnP device can't use that IRQ. If you have devices that you want to jumper for a certain IRQ, set that IRQ to "Legacy ISA". You wanna leave the "open" IRQ's as PCI/ISA for your devices that can't be jumpered.

Open ones are 5,9,10,11, and 15 if you don't have an external hard drive controller. If you do have an external hard drive controller, it needs 15 for priority.

Xayd

Xayd
08-01-2000, 06:40 PM
And yes on your resource/pnp os questions. Those are the correct settings you should use.

Xayd

Toaster
08-01-2000, 07:20 PM
Hey there Hal (and others),
USB is a "low latency" device in my opinion.
The sharing of a USB interupt should be possible as you noticed.
USB has 2 different options, legacy and driver assist. Legacy is where the BIOS adds support via onboard drivers and IRQ mapping.
The "driver assist" is where the USB hardware is operated almost soley via software but at higher latency. One can use the "soft modem" and "hardware modem" and analogy and get an idea thats roughly the same.
Per spec, USB doesn`t *require* an IRQ but uses it to boost performance. Since most USB devices don`t move a great deal of data at any given time, increased latency isn`t seen or noticed because the USB interface isn`t fully utilized. Were you using the USB interface at +90% you would notice a performance drop or even instability at high data rates. This equates back to sharing and the "latency" of the devices sharing the IRQ.
The higher the "latency" the less likely a trouble free sharing. To test this theory, try moving as much data as possible while another device using the same IRQ also is utilized more fully. Now, some systems utilize USB hardware differently and results may vary wildly depending on the way the USB hardware is configured/designed into the system board. A simple USB modem or printer uses very little CPU time because data rates are below 60kb/sec and often MUCH lower.
This is not the case with SERIAL ports because not only does the CPU have to manage the port but whats connected to the port as well. This is why sharing IRQ`s with a serial port usually meets with problematic performance and instabilities.
Don`t confuse say Comm-x and Comm-x using the same IRQ but also using differing addresses. In this, each device is active in turn and not at the same time. This was a commonplace problem with modems set to Comm4 and a serial mouse on Comm1. When the modem started to dial, the mouse pointer became either erratic or the mouse ceased to function or the modem failed to function and the mouse worked.
What I term "sharing" is the ability for multiple devices to use the same IRQ but not "conflict" when BOTH devices become active.
While BOTH devices *DON`T* actually become active at the same time, they actually use the "time" the other isn`t using at that particular time. You cant actually have 2 devices sharing the same IRQ at the same time without a problem. The trick is using "unused" Interupt time, hence the term "latency". If one sets things correctly and the devices co-exist well, the "sharing" becomes invisable because EACH device uses a "portion" on the IRQ "time" and the CPU can service each IRQ request without "triggering" the other device(s). Each device will have a unique address and when that device becomes INACTIVE the other device becomes ACTIVE and then repeats. Each taking turn and using only a portion of CPU Interupt time. So, your not actually sharing the IRQ, you are simply taking advantage of the available "off" time to enable another device.


Whew...my fingers hurt.... http://www.pcmech.com/ubb/biggrin.gif

LawyerRon
08-01-2000, 07:35 PM
I nominate this post (not mine, Toaster's) for the Hall of Fame.

Thanks for the info Toaster, your comments carry great weight with me.

------------------
"To speak ill of others is a dishonest way of praising ourselves"

Toaster
08-01-2000, 07:40 PM
Hi folks, thanks for the kind words.
In about 95%+ systems, PNP via O/S is enabled. To assign IRQ`s manually there are two differing ways to achieve the same result. Lets explore them.
To manually assign IRQ`s do the following:
1. Set in BIOS to assign resources "MANUALLY".
2. Set PNP aware O/S to "NO".
3. Start the system and once stabilized, go to the system icon within control panel and assign these resources to your likeing.
***alternate method also a perferred method**
This is applicable to PCI based peripherals and ISA toward the end of this method.
1. In BIOS (if available) set to assign resources manually.
2. Set PNP aware o/s to "no".
3. In probably the same screen a list of PCI slots and associated IRQ`s should be listed.
Assign ONE interupt to a particular PCI slot in the order given in BIOS with the add-on card in the slot you are assigning.
4. Repeat the above process for each add`l device/slot. Be aware that most AGP equiped boards assign the s
ame IRQ for AGP and slot1.
5. If any ISA cards are installed, deallocate these by choosing in BIOS to set ISA slots to "ISA devices NOT PCI" or the system will attempt to allocate these resorces.
If you have a ISA soundcard and or a hardware modem make certain that these resorces are set to ISA and not PCI.
6. Restart the O/S and with minimal setting up all should work provided you didn`t double up on any given resourse.

********************************************
Interupt sharing.
First some background.
There are 2 primary types of Interupts, one is "level" triggered and one is "edge" triggered. A "level" triggered IRQ is one that is "enabled" when a given device raises is "IRQ Request" to a given "level" or voltage above or below digital ground.
An "edge" triggered IRQ is one that "enables" when the voltage BEGINS to change states. In this the beginning of the IRQ Request signal "edge" is a request for service via the Interupt.
(an Interupt is basicly a way for a device to say "I need the bus to move data")
Sharing of IRQ`s is something that has to be experimented. For some it works well and some not at all. The whole idea is that many IRQ`s are only active for a short while then they relinquish the bus to another device(s). In sharing an IRQ, you choose a device that has a different IRQ request "time" then another device also using the IRQ. If all goes well, the 2 devices share the IRQ and there is no performance hit and the devices work normally. Now why it may NOT work with your or other systems. When Micky$oft designed their O/S they wanted it to be as user friendly as possible. To make it this user friendly, they made you give up "flexiblity".
In this, the O/S attempts to allocate resources for you on what it thinks is the best method. Since IRQ sharing is generally a "no-no", Win9x will not allow sharing of IRQ`s unless the following is TRUE:
1. The device using the IRQ is OFF more then its ON.
2. Additional device(s) using the same IRQ must also perform as above.
These devices that are OFF more then ON are called "low latency" devices (my terms) because they "fire" the IRQ only when needed and not until. This is very common to many LPT ports.
Certain devices are "high latency" in that they consume many CPU cycles to do their task. These devices are comm ports and HDD controller interfaces.
Low latency devices are SCSI cards of many types, net cards, many video cards and a few other devices/interfaces.
The following interfaces/devices SHOULD NOT BE SHARED:
1. comm ports
2.sound cards
3.mouse ports
4. HDD controllers other then SCSI.
There are a few exceptions, but these should keep you out of trouble.

An easy "share" is many video types of AGP and the first PCI slot. Choose a net card to try first if you use one. Another is SCSI cards and net cards using IRQ9. I currently have 3 devices sharing IRQ9 with no ill effect. One is a TNT2 vid-card a SCSI card and a net card. Net cards often share well in my experiences EXCEPT 100 Base T cards.
Sharing of IRQ`s is something to experiment with because it can be done when you find 2 "peaceful" devices. Back-up your system and make one change at a time. If there are several open IRQ`s the devices WONT share in some cases. You should NOT share when its not necissary and only when its absolutely needed. In most books they say NO to IRQ sharing. I personally buy my devices knowing how their IRQ`s are "fired" so that they have a better chance of sharing.
DO not share soundcard IRQ`s because these devices are a very high latency device as are "soft modems" of many kinds.

When my fingers heal...we`ll take a stab at DMA channels and an optimum way to allocate them.

I hope this answers many of your questions and if you need further assistance, post your questions here.


By the way, an IRQ is a devices way to say "I need the bus and CPU time to move/process data"
IRQ stands for "Interupt ReQuest" and it does just like the name implies. It "Requests" the CPU to "interupt" what its doing to sevice a "request" made by a given device wanting CPU/bus time.

[This message has been edited by Toaster (edited 08-02-2000).]

HAL9000
08-01-2000, 08:30 PM
Awesome explanation Toaster, but I want to throw one question in there that is unanswered. Where in that hierarchy would be the most suitable place for the USB IRQ, and what is your opinion on it being shared with another device. I do currently have it shared and so far it doesn't really seem to matter.

------------------
If it ain't broke, you're not pushing hard enough!

HAL9000
08-02-2000, 04:41 PM
Kinda what I though, your opinion cinches it. BTW, I hope you have a good WPM typing speed to spit all that out http://www.pcmech.com/ubb/biggrin.gif

------------------
If it ain't broke, you're not pushing hard enough!

eltano1
08-02-2000, 04:58 PM
WOW, Hat off for you, Toaster, now give your fingers a well deserve break. From me and many others that we are still learning from this forum,and from people like you, THANKS. http://www.pcmech.com/ubb/wink.gif

Toaster
08-02-2000, 08:48 PM
Hi folks and your quite welcome.
I know in my topic that I may have contridicted myself but I wanted to give as much information as possible without "loosing" peoples train of thought.
As far as my typing skills, well, If I have my "true blue" 10 year old IBM keyboard, I type reasonably fast. Put me on a newer keyboard and my typing skill drop to sub "hunt and peck" mode. http://www.pcmech.com/ubb/biggrin.gif
(dont ask me why, I just love older IBM keyboards, must be the click?)
At any rate, it was well worth typing to get the responses that it was useful and appreciated. Thanks to one and all.
BTW, I said that you CANT use 2 or more devices concurrently using 1 IRQ. This is sorta true and sorta not. One of those wonderful "gray areas" we love to exploit.
I said "can`t" because in most cases, you truely cant truely "share" an IRQ. But of course, there are exceptions to almost any rule.
Next up, DMA channels......that is, when my fingers heal somewhat. http://www.pcmech.com/ubb/biggrin.gif

I dont care if he`s a brilliant General, is he lucky? -Julius Ceasar-

HAL9000
08-03-2000, 04:24 PM
Hey Toaster... ever try an Omni keyboard. I normally type about 45wpm, get me on an Omni and I shoot that up to about 80wpm. Not sure why only on an Omni, it just has a nice feel.

------------------
If it ain't broke, you're not pushing hard enough!

Toaster
08-03-2000, 07:27 PM
Hal, can`t say I have nor ever heard of the Omni keyboard. I really can`t explain it, I just love the old IBM 101 keyboards. We`re talking tuff here and when it gets dirty, I simply take it into the shower and wash this ol puppy out. Inside of a few drying hours, it`s like new and ready for even more punishment.


********************************************
DMA channels, DMA and associated uses.

DMA is "Direct Memory Access".
What this is, is the ability for add-on peripherals and some "system" components to use memory addresses without CPU intervention. A classic example is a "soundblaster" sound card. These require 1 IRQ and 1 DMA channel. The 16 bit and higher SB cards require 2 DMA channels. To improve system performance and peripheral performance it was found that if a device were able to "use" memory as a "scratch" area without CPU intervention, performance increases markedly.
In the SB example, the card can move data in and out of memory to do its "work" without CPU intervention thus freeing the CPU for other tasks. When the SB card compiles it`s data it signals the CPU via an IRQ that its ready for bus/CPU time and you hear the sound. The wonderful thing about DMA channels is that there are 7 to choose from and whats better is that DMA channels can be shared if need be. Its rather unusual to NEED to share DMA channels because so few devices use them.
The only reason WHY a device would need to use DMA is because it has no "local" processing memory to "calculate" its coming task. In most systems, a printer port *may* be using a DMA, a soundcard and your lowly floppy drive(s). Each of these devices would require oodles of CPU time to perform the same task but is performed faster via DMA and using fewer CPU cycles to boot.
Why dont more devices use DMA? Well, its not necissary really because most peripherals have "local" memory and the intelligence to perform calculations "on-board". With all the "smart" devices such as video cards and such have oodles of onboard memory and a "local" ASIC (Application Specific Integrated Curcuit) or in less blown up terms a CPU designed for a specific task(s). So all this is now done "locally" and the device simply notifies the system via an IRQ that its ready for CPU/bus time. Local meaning "onboard" the device and not using "outboard" resources to do calculations and commencing data transfers. SCSI cards use DMA to "que" commands between processes and to "latch" on the bus for longer intervals by "buffering" commands, dropping the IRQ, enabling the IRQ and starting a transaction, disabling the transfer and IRQ and buffering the next transfer/command que and repeating the cycle.
So, it seems that the device is holding the interupt longer but actually stores commands/que`s for the next transfer. This acts like an uninterupted transfer because the buffer is always full with new data whilst moving previous data. UDMA IDE drives work in a similar fashion.
So basicly, DMA is sort of like a community "scratch pad" and a "check valve" to meter throughput in a steady flow fashion.
There is very little to worry about here because there are ample DMA channels to go around.


Whatcha think...should the next be CACHE, MEMORY, or?

Electron
08-09-2000, 02:41 PM
Hi Toaster,
Great post, so much information.
Would appreciate more info on Cache or if it's not going too far, chipsets (what FSB is best on what, or more specifically what chipsets support what FSB).
For example:-
I recently bought an Abit BE6-II 440BX chipset board with 133Mhz FSB PIII, only to find no end of problems.
Going through the forums i have been told that the BX chipset only supports 100Mhz FSB, althought the tech support at the shop assured me this board would support 133Mhz FSB. This all leaves me a little confused.
Thanks.

[This message has been edited by Electron (edited 08-10-2000).]

Zneter
08-09-2000, 07:59 PM
Great post TOASTER this information would
have saved me alot of late hours the past few days

Zneter

Toaster
08-10-2000, 06:56 PM
Shortly I`ll go into detail on cache and system board chipsets. Watch for `em.
Thanks folks for your support.

Electron
08-11-2000, 01:20 PM
Thanks Toaster. Look forward to it.

Jenni
09-10-2000, 08:27 PM
WOW! What an awesome post. That explains why my sound card got choppy and acted weird on IRQ 9, and why I could change a PNP modem to the IRQ I wanted it to be on, restart, and have it be somewhere else again! I'll definitely be printing this one out and saving it for future reference!

Alfie
09-11-2000, 10:06 PM
Helpful info,Toaster.
Hope all read it and learn.
I'm still a little confused as to usb sharing an irq with other devices,is it okay?
Or is it one of those things where, its okay if it works?:)

Toaster
09-22-2000, 11:00 AM
I`m moving this to the front of the line so that folks could view it. Sharing of resources is something to avoid if at all possible but some devices permit it without ill effect.
There are exceptions to every rule in computers and hardware but these should serve well as a guide.
I`m prepping to do an indepth look at chipsets and cache. Expect this when my time permits.