35
System Resources System Resources

1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

Embed Size (px)

Citation preview

Page 1: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

1

System ResourcesSystem Resources

Page 2: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

2

System ResourcesSystem Resources

Interrupt Request (IRQ) ChannelsInterrupt Request (IRQ) Channels

Direct Memory Access (DMA) ChannelsDirect Memory Access (DMA) Channels

I/O Port AddressesI/O Port Addresses

Memory AddressesMemory Addresses

Page 3: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

3

Interrupt Requests (IRQs)Interrupt Requests (IRQs)

Page 4: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

4

Interrupts (IRQs)Interrupts (IRQs)

Used to signal the processor that a hardware Used to signal the processor that a hardware device needs attention.device needs attention.

Used by keyboard, mouse, modem, floppy drive, Used by keyboard, mouse, modem, floppy drive, hard drive, sound card, network card, etc.hard drive, sound card, network card, etc.

Diverts the CPU to a software driver that Diverts the CPU to a software driver that services the device that generated the interrupt.services the device that generated the interrupt.

After servicing the interrupt, the CPU returns to After servicing the interrupt, the CPU returns to whatever it was doing at the time of the interrupt.whatever it was doing at the time of the interrupt.

Page 5: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)
Page 6: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

Device needs attention.Device needs attention.

Page 7: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

Interrupt Controller notifies the CPU.Interrupt Controller notifies the CPU.

Page 8: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

The CPU stores its status in memory...The CPU stores its status in memory...

Page 9: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

… and takes care of the Interrupt.… and takes care of the Interrupt.

Page 10: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

It then retrieves its status from memoryand picks up where it left off.

It then retrieves its status from memoryand picks up where it left off.

Page 11: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

11

8259APIC

To CPU

System Timer IRQ0

Keyboard Controller IRQ1

Available IRQ2

Serial Port 2 (COM2) IRQ3

Serial Port 1 (COM1) IRQ4

Hard Disk Controller IRQ5

Floppy Disk Controller IRQ6

Parallel Port 1 (LPT1) IRQ7

Hardware Interrupts for IBM PC/XTHardware Interrupts for IBM PC/XT

Page 12: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

12

8259APIC

To CPU

System Timer IRQ0

Keyboard Controller IRQ1

Available IRQ2

Serial Port 2 (COM2) IRQ3

Serial Port 1 (COM1) IRQ4

Hard Disk Controller IRQ5

Floppy Disk Controller IRQ6

Parallel Port 1 (LPT1) IRQ7

Interrupt Priority for IBM PC/XTInterrupt Priority for IBM PC/XT

LowestPriority

LowestPriority

HighestPriority

HighestPriority

Page 13: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

13

To CPU

8259APIC

IRQ0

IRQ1

IRQ2

IRQ3

IRQ4

IRQ5

IRQ6

IRQ7

Hardware Interrupts for IBM ATHardware Interrupts for IBM AT

8259APIC

IRQ8

IRQ9

IRQ10

IRQ11

IRQ12

IRQ13

IRQ14

IRQ15

Page 14: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

14

Default Assignments (IRQs 0-7)Default Assignments (IRQs 0-7) IRQ0IRQ0 System TimerSystem Timer

IRQ1IRQ1 Keyboard ControllerKeyboard Controller

IRQ2IRQ2 Cascade to 2nd PICCascade to 2nd PIC

IRQ3IRQ3 Serial Port 2 (COM2)Serial Port 2 (COM2)

IRQ4IRQ4 Serial Port 1 (COM1)Serial Port 1 (COM1)

IRQ5IRQ5 Sound Card or Parallel Port 2 (LPT2)Sound Card or Parallel Port 2 (LPT2)

IRQ6IRQ6 Floppy Drive ControllerFloppy Drive Controller

IRQ7IRQ7 Parallel Port 1 (LPT1)Parallel Port 1 (LPT1)

Page 15: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

15

Default Assignments (IRQs 8-15) Default Assignments (IRQs 8-15)

IRQ8IRQ8 Real Time ClockReal Time Clock

IRQ9IRQ9 AvailableAvailable

IRQ10IRQ10 AvailableAvailable

IRQ11IRQ11 AvailableAvailable

IRQ12IRQ12 PS/2 MousePS/2 Mouse

IRQ13IRQ13 Math CoprocessorMath Coprocessor

IRQ14IRQ14 Primary IDEPrimary IDE

IRQ15IRQ15 Secondary IDESecondary IDE

Page 16: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

16

To CPU

8259APIC

IRQ0

IRQ1

IRQ2

IRQ3

IRQ4

IRQ5

IRQ6

IRQ7

Interrupt Priority for IBM ATInterrupt Priority for IBM AT

8259APIC

IRQ8

IRQ9

IRQ10

IRQ11

IRQ12

IRQ13

IRQ14

IRQ15

HighestPriority

HighestPriority

LowestPriority

LowestPriority

Page 17: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

17

Priority of InterruptsPriority of Interrupts

IRQ0IRQ0

IRQ1IRQ1

– IRQ8IRQ8

– IRQ9IRQ9

– IRQ10IRQ10

– IRQ11IRQ11

– IRQ12IRQ12

– IRQ13IRQ13

– IRQ14IRQ14

– IRQ15IRQ15

IRQ3IRQ3

IRQ4IRQ4

IRQ5IRQ5

IRQ6IRQ6

IRQ7IRQ7IRQ

2

Page 18: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

18

What did you do with boards that What did you do with boards that required IRQ2?required IRQ2?

You used IRQ9 instead.You used IRQ9 instead.

Some boards still use the IRQ2 label.Some boards still use the IRQ2 label.

Others use a dual IRQ2/IRQ9 label.Others use a dual IRQ2/IRQ9 label.

Page 19: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

19

IRQ ConflictsIRQ Conflicts

Occur when two devices try to use the same Occur when two devices try to use the same interrupt line.interrupt line.

Will cause one or both devices to Will cause one or both devices to malfunction or the system to hang.malfunction or the system to hang.

Are resolved by changing the IRQ Are resolved by changing the IRQ assignment of one of the devices.assignment of one of the devices.

Page 20: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

20

Direct Memory Access (DMA) Direct Memory Access (DMA)

Page 21: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

DMA allows the floppy controller to transfer data directly to memory.DMA allows the floppy controller to transfer data directly to memory.

Floppy Controller

Page 22: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

Without DMA, the CPU grabs a couple of bytes...Without DMA, the CPU grabs a couple of bytes...

Floppy Controller Floppy Drive

Page 23: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

… and stores them in memory… and stores them in memory

Floppy Controller Floppy Drive

Page 24: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

DMA allows the floppy controller to transfer data directly to memory.DMA allows the floppy controller to transfer data directly to memory.

Floppy Controller Floppy Drive

Page 25: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

25

ISA/PCI Default DMA-Channel ISA/PCI Default DMA-Channel AssignmentsAssignments

0 Available None1 Available 8-bit sound2 Floppy Drive Controller3 Available LPT1 in ECP Mode4 Cascade to first DMA Controller5 Available 16-bit Sound6 Available ISA SCSI Adapter7 Available

DMA Standard Function Recommended Use

Page 26: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

26

DMA conflicts occur if two DMA conflicts occur if two devices try to use the same DMA devices try to use the same DMA

channel.channel.

Page 27: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

27

I/O Port AddressesI/O Port Addresses

Page 28: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

28

What are I/O port addresses?What are I/O port addresses?

It’s the way the CPU tells its peripherals apart.It’s the way the CPU tells its peripherals apart.

It can be thought of as hardware addresses.It can be thought of as hardware addresses.

These addresses are totally separate from memory These addresses are totally separate from memory addresses.addresses.

There are 64 K of I/O port addresses.There are 64 K of I/O port addresses.

In Hexadecimal, their addresses are 0000-FFFF.In Hexadecimal, their addresses are 0000-FFFF.

Page 29: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

29

Some Common I/O Port Some Common I/O Port Addresses.Addresses.

0060-00640060-0064 KeyboardKeyboard

02F8-02FF02F8-02FF Serial Port 2 (COM2)Serial Port 2 (COM2)

0378-037F0378-037F Parallel Port 1 (LPT1)Parallel Port 1 (LPT1)

03F8-03FF03F8-03FF Serial Port 1 (COM1)Serial Port 1 (COM1)

Page 30: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

30

Memory AddressesMemory Addresses

Page 31: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

31

Memory AddressesMemory Addresses

ROM Addresses - Many boards include ROM Addresses - Many boards include some of their software in ROM.some of their software in ROM.

RAM Addresses - Many devices require a RAM Addresses - Many devices require a small buffer RAM to hold data temporarily.small buffer RAM to hold data temporarily.

Page 32: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

32

What is a Resource Conflict?What is a Resource Conflict?

Page 33: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

33

Resource conflicts occur when two Resource conflicts occur when two devices attempt to use the same:devices attempt to use the same:

IRQ lineIRQ line

DMA channelDMA channel

I/O port addressI/O port address

ROM addressROM address

RAM addressRAM address

Page 34: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

34

What are the symptoms of a What are the symptoms of a resource conflict?resource conflict?

The system hangs.The system hangs.

A device (mouse, keyboard, printer, etc.) A device (mouse, keyboard, printer, etc.) doesn’t work.doesn’t work.

The monitor displays funny characters.The monitor displays funny characters.

The printer prints funny characters.The printer prints funny characters.

Page 35: 1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

35

Resolving Resource ConflictsResolving Resource Conflicts Find out which devices are conflicting.Find out which devices are conflicting.

– Manual or Instruction SheetManual or Instruction Sheet

– Software DiagnosticsSoftware Diagnostics

Change the resources of one of the conflicting devices.Change the resources of one of the conflicting devices.

– JumpersJumpers

– SetupSetup

– Control Panel (Windows 3.11)Control Panel (Windows 3.11)

– Device Manager (Windows 95 or 98) Device Manager (Windows 95 or 98)